Interface DisplayValue

All Known Implementing Classes:
CompoundDisplayValue, ConstantDisplayValue, LocalizedComponentDisplayValue, LocalizedFieldLabel

public interface DisplayValue
Represents an artifact which will be displayed later in the user interface. It should be something mostly static like a translated label, names of objects etc. NEVER should represent editable values like Entity-Field etc. This represents a READ-ONLY value, which has to be evaluated at runtime.

Examples:
Text-Resources, Scripts, Constant texts.

A DisplayValue and all calls to it have to be THREAD-SAFE!!!!
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return if this display-value can be evaluated.
    Evaluate the data-in the current-context.
    Get the raw-data.
  • Method Details

    • getRawData

      String getRawData()
      Get the raw-data. This is a string-representation which should indicate what get evaluated. For example in the case of TextResource this would be the key to the resource.
      It should be used for debug and logs only. It should never be used to actually get the value to display.
      Returns:
      the value, non-null. can be empty
    • evaluate

      String evaluate()
      Evaluate the data-in the current-context.
      Returns:
      the evaluate-result, ready to display
    • canEvaluate

      boolean canEvaluate()
      Return if this display-value can be evaluated. If it cannot, the evaluate()-Method still has to return a string.
      Because this is 'friendly' asking the system if this display value exists, an implementaition may reports this as a value which is optional. For example. The Textresoure-System will add the display-value to the optional-list if this call is made.

      This behind-scenes-notification is not obvious. So maybe this method should be renamed or replaced.
      Returns:
      true/false