Class FunctionVariableImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCustom()
      Gets the custom value assigned to this function variable
      PlaceholderAction getDefinedBy()
      Gets the domain of this function variable
      java.lang.String getKey()
      Gets the key of this function variable
      java.lang.String getLabel()
      Gets the label of this function variable
      java.lang.String getSelectedKey()
      Gets the key of the selected function variable value
      java.util.List<KeyLabel> getValues()
      Gets the key label pairs, which are applicable for this function variable
      void setCustom​(java.lang.String custom)
      Sets the custom value of this function variable
      void setDefinedBy​(PlaceholderAction definedBy)
      Sets the function variable domain
      void setKey​(java.lang.String key)
      Sets the key of this function variable
      void setLabel​(java.lang.String label)
      Sets the label of the function variable
      void setSelectedKey​(java.lang.String selectedKey)
      Sets the key of the selected function variable value
      void setValues​(java.util.List<KeyLabel> values)
      Sets the key value pairs, which are applicable for this function variable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FunctionVariableImpl

        public FunctionVariableImpl()
    • Method Detail

      • getKey

        public java.lang.String getKey()
        Description copied from interface: FunctionVariable

        Gets the key of this function variable

        Specified by:
        getKey in interface FunctionVariable
        Returns:
        the key
      • setKey

        public void setKey​(java.lang.String key)
        Description copied from interface: FunctionVariable

        Sets the key of this function variable

        Specified by:
        setKey in interface FunctionVariable
        Parameters:
        key - the key to set
      • getLabel

        public java.lang.String getLabel()
        Description copied from interface: FunctionVariable

        Gets the label of this function variable

        Purpose of the label is e.g. show in UI. The label is not necessarily unique, this means: function variables should be referred by the key rather than the label.

        Specified by:
        getLabel in interface FunctionVariable
        Returns:
        the label
      • setLabel

        public void setLabel​(java.lang.String label)
        Description copied from interface: FunctionVariable

        Sets the label of the function variable

        Specified by:
        setLabel in interface FunctionVariable
        Parameters:
        label - the label to set
      • getSelectedKey

        public java.lang.String getSelectedKey()
        Description copied from interface: FunctionVariable

        Gets the key of the selected function variable value

        Gets the key of the function variable value, which is selected for this particular placeholder.

        Usually, the selected key is one of the keys defined in the values list for this function variable. If key is empty or null, the default key (i.e. first entry in the list of values) should be used, unless a custom value has been set, in which case FunctionVariable.getCustom() returns a value other than empty or null.

        Specified by:
        getSelectedKey in interface FunctionVariable
        Returns:
        the selectedKey
      • setSelectedKey

        public void setSelectedKey​(java.lang.String selectedKey)
        Description copied from interface: FunctionVariable

        Sets the key of the selected function variable value

        Sets the key of the function variable value, which is selected for this particular placeholder

        To use the default value (i.e. first entry in the list of values) or use the value returned by FunctionVariable.getCustom(), selected key must be set to empty string or null.

        Specified by:
        setSelectedKey in interface FunctionVariable
        Parameters:
        selectedKey - the selectedKey to set
      • getCustom

        public java.lang.String getCustom()
        Description copied from interface: FunctionVariable

        Gets the custom value assigned to this function variable

        Gets the custom value assgined to this function variable, if a custom value has been applied, otherwise returns an empty string or null

        Specified by:
        getCustom in interface FunctionVariable
        Returns:
        the custom
      • setCustom

        public void setCustom​(java.lang.String custom)
        Description copied from interface: FunctionVariable

        Sets the custom value of this function variable

        Sets the custom value of this function variable, if a custom value should be applied. Empty string or null means to use the default value or value defined by FunctionVariable.getSelectedKey() key.

        Specified by:
        setCustom in interface FunctionVariable
        Parameters:
        custom - the custom to set
      • getValues

        public java.util.List<KeyLabel> getValues()
        Description copied from interface: FunctionVariable

        Gets the key label pairs, which are applicable for this function variable

        Usually, one of these values is selected for this function variables via a proper FunctionVariable.getSelectedKey() value, which refers to the key of one of the entries in the values list.

        Specified by:
        getValues in interface FunctionVariable
        Returns:
        the values
      • setValues

        public void setValues​(java.util.List<KeyLabel> values)
        Description copied from interface: FunctionVariable

        Sets the key value pairs, which are applicable for this function variable

        Specified by:
        setValues in interface FunctionVariable
        Parameters:
        values - the values to set