Interface FunctionVariable
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
FunctionVariableImpl
public interface FunctionVariable extends java.io.SerializableInterface for a function variable instance, i.e.: a function variable definition for a particular placeholder including the values actually defined and selected for this particular placeholder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetCustom()Gets the custom value assigned to this function variablePlaceholderActiongetDefinedBy()Gets the domain of this function variablejava.lang.StringgetKey()Gets the key of this function variablejava.lang.StringgetLabel()Gets the label of this function variablejava.lang.StringgetSelectedKey()Gets the key of the selected function variable valuejava.util.List<KeyLabel>getValues()Gets the key label pairs, which are applicable for this function variablevoidsetCustom(java.lang.String custom)Sets the custom value of this function variablevoidsetDefinedBy(PlaceholderAction definedBy)Sets the function variable domainvoidsetKey(java.lang.String key)Sets the key of this function variablevoidsetLabel(java.lang.String label)Sets the label of the function variablevoidsetSelectedKey(java.lang.String key)Sets the key of the selected function variable valuevoidsetValues(java.util.List<KeyLabel> values)Sets the key value pairs, which are applicable for this function variable
-
-
-
Method Detail
-
getKey
java.lang.String getKey()
Gets the key of this function variable
- Returns:
- key (unique identifier) of this function variable
-
setKey
void setKey(java.lang.String key)
Sets the key of this function variable
- Parameters:
key- key (unique identifier) of this function variable
-
getLabel
java.lang.String getLabel()
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.
- Returns:
- label of this function variable.
-
setLabel
void setLabel(java.lang.String label)
Sets the label of the function variable
- Parameters:
label- label of this function variable.
-
getSelectedKey
java.lang.String getSelectedKey()
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
valueslist 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 casegetCustom()returns a value other than empty or null.- Returns:
- key of the selected function variable value
-
setSelectedKey
void setSelectedKey(java.lang.String key)
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
getCustom(), selected key must be set to empty string or null.- Parameters:
key- key of selected value
-
getCustom
java.lang.String getCustom()
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
- Returns:
- custom value of this function variable, empty or null, if no custom value has been applied
-
setCustom
void setCustom(java.lang.String custom)
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
getSelectedKey()key.- Parameters:
custom- new custom value for this function variable, empty or null to clear custom value.
-
getDefinedBy
PlaceholderAction getDefinedBy()
Gets the domain of this function variable
Gets the domain of this function variable. Function variables can be defined either by the
PlaceholderAction.LOAD,PlaceholderAction.SYNCorPlaceholderAction.STOREaction.- Returns:
- the action, which defines this function variable
-
setDefinedBy
void setDefinedBy(PlaceholderAction definedBy)
Sets the function variable domain
Sets the domain of this function variable. Function variables can be defined either by the
PlaceholderAction.LOAD,PlaceholderAction.SYNCorPlaceholderAction.STOREaction.- Parameters:
definedBy- the new domain of this function variable
-
getValues
java.util.List<KeyLabel> getValues()
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
getSelectedKey()value, which refers to the key of one of the entries in thevalueslist.- Returns:
- list of key label pairs applicable for this function variable
-
setValues
void setValues(java.util.List<KeyLabel> values)
Sets the key value pairs, which are applicable for this function variable
- Parameters:
values- new list of key label pairs applicable for this function variable
-
-