Package com.uc4.api.objects
Class ObjectValues
java.lang.Object
com.uc4.api.objects.ObjectValues
This class contains values and PromptSets of executable Objects.
The object that contains an
ObjectValues must implement the
LifecycleSaveAware interface and call the values.cleanAfterSave().-
Method Summary
Modifier and TypeMethodDescriptionReturns an iterator overPromptSetDefinition, Iterates over only non deleted entries.voidAdds a new PromptSet to this object.voidAdds a new key and value to this object.voidAdds a new key,value and ErtUsage to this object.voidClear the internal state after a save was performed on the object.getErtUsage(String validityKeyword) Returns the ertUsage for a given validity keyword The method returnsErtUsage.NONEif the validity keyword does not exist.intReturns an integer which describes how variable values are inherited from its parent.Returns the value for a given validity keyword The method returnsnullif the validity keyword does not exist.Returns an iterator overPromptSetDefinition.intvoidrearrange(List<PromptSetDefinition> orderedPromptSets) This method can be used to rearrange the prompt sets.voidRemoves all entries (Values and PromptSets).voidRemoves all the variables storedvoidRemoves all PromptSets.booleanremoveValue(String validityKeyword) Removes a variable entry The method returnsfalseif the validity keyword was not found.voidsetInheritFromParent(int mode) Sets the inherit mode for thisVariableValuesinstance.voidThis method can be used to update the number of prompt elements based on aPromptSetobject.Returns an iterator over validity keywords.int
-
Method Details
-
valueKeyIterator
Returns an iterator over validity keywords. All validity keywords have the typejava.lang.String- Returns:
- Iterator
-
promptSetIterator
Returns an iterator overPromptSetDefinition.- Returns:
- Iterator
-
activePromptSetIterator
Returns an iterator overPromptSetDefinition, Iterates over only non deleted entries.- Returns:
- Iterator
-
addPromptSet
Adds a new PromptSet to this object. Throws IllegalArgumentException if Object already exists- Parameters:
def- PromptSetDefinition
-
addValue
Adds a new key and value to this object. The parameterreplacecan be used to define if the value should be replaced in case of an already existing validity keyword.- Parameters:
validityKeyword- Keyvalue- Valuereplace- If true the value will be replaced if a key with this name does already exist
-
addValue
Adds a new key,value and ErtUsage to this object. The parameterreplacecan be used to define if the value should be replaced in case of an already existing validity keyword. Created after addition of new column ErtUsage in v11 of AE.- Parameters:
validityKeyword- Keyvalue- ValueertUsage- Acceptable Ert usage Values are 0 to 5, otherwise ertUsage value will be set to 0 i.e its Default Valuereplace- If true the value will be replaced if a key with this name does already exist
-
getValue
Returns the value for a given validity keyword The method returnsnullif the validity keyword does not exist.- Parameters:
validityKeyword- Key- Returns:
- Value or null if the key does not exist
-
getErtUsage
Returns the ertUsage for a given validity keyword The method returnsErtUsage.NONEif the validity keyword does not exist.ErtUsage.NONEis default value of ERT Usage Value.- Parameters:
validityKeyword- Key- Returns:
- ErtUsage or ErtUsage.NONE if the key does not exist.
-
removeValue
Removes a variable entry The method returnsfalseif the validity keyword was not found.- Parameters:
validityKeyword- Key- Returns:
- True if the values was removed
-
removeAllVariablevalues
public void removeAllVariablevalues()Removes all the variables stored -
valueSize
public int valueSize()- Returns:
- Number of entries in the Variable.
-
promptSetSize
public int promptSetSize()- Returns:
- Number of PromptSet entries
-
removeAll
public void removeAll()Removes all entries (Values and PromptSets). -
removePromptSets
public void removePromptSets()Removes all PromptSets. -
cleanAfterSave
public void cleanAfterSave()Clear the internal state after a save was performed on the object. -
setInheritFromParent
public void setInheritFromParent(int mode) Sets the inherit mode for thisVariableValuesinstance. Throws IllegalArgumentException if the parameter value is not 0,1 or 2- 0 ... All values
- 1 ... Defined values only
- 2 ... None
- Parameters:
mode- Inherit mode
-
getInheritFromParent
public int getInheritFromParent()Returns an integer which describes how variable values are inherited from its parent.- 0 ... All values
- 1 ... Defined values only
- 2 ... None
- Returns:
- Inherit mode
-
updateDefinition
This method can be used to update the number of prompt elements based on aPromptSetobject.- Parameters:
set- PromptSet
-
rearrange
This method can be used to rearrange the prompt sets. Throws IllegalArgumentException if the element of the list is not contained in the valid prompt set list.- Parameters:
orderedPromptSets- prompt set List in desired order
-