Package com.uc4.api.objects
Class ObjectValues
- java.lang.Object
-
- com.uc4.api.objects.ObjectValues
-
public final class ObjectValues extends java.lang.ObjectThis class contains values and PromptSets of executable Objects. The object that contains anObjectValuesmust implement theLifecycleSaveAwareinterface and call thevalues.cleanAfterSave().
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<PromptSetDefinition>activePromptSetIterator()Returns an iterator overPromptSetDefinition, Iterates over only non deleted entries.voidaddPromptSet(PromptSetDefinition def)Adds a new PromptSet to this object.voidaddValue(java.lang.String validityKeyword, java.lang.String value, boolean replace)Adds a new key and value to this object.voidaddValue(java.lang.String validityKeyword, java.lang.String value, java.lang.String ertUsage, boolean replace)Adds a new key,value and ErtUsage to this object.voidcleanAfterSave()Clear the internal state after a save was performed on the object.ErtUsagegetErtUsage(java.lang.String validityKeyword)Returns the ertUsage for a given validity keyword The method returnsErtUsage.NONEif the validity keyword does not exist.intgetInheritFromParent()Returns an integer which describes how variable values are inherited from its parent.java.lang.StringgetValue(java.lang.String validityKeyword)Returns the value for a given validity keyword The method returnsnullif the validity keyword does not exist.java.util.Iterator<PromptSetDefinition>promptSetIterator()Returns an iterator overPromptSetDefinition.intpromptSetSize()voidrearrange(java.util.List<PromptSetDefinition> orderedPromptSets)This method can be used to rearrange the prompt sets.voidremoveAll()Removes all entries (Values and PromptSets).voidremoveAllVariablevalues()Removes all the variables storedvoidremovePromptSets()Removes all PromptSets.booleanremoveValue(java.lang.String validityKeyword)Removes a variable entry The method returnsfalseif the validity keyword was not found.voidsetInheritFromParent(int mode)Sets the inherit mode for thisVariableValuesinstance.voidupdateDefinition(PromptSet set)This method can be used to update the number of prompt elements based on aPromptSetobject.java.util.Iterator<java.lang.String>valueKeyIterator()Returns an iterator over validity keywords.intvalueSize()
-
-
-
Method Detail
-
valueKeyIterator
public java.util.Iterator<java.lang.String> valueKeyIterator()
Returns an iterator over validity keywords. All validity keywords have the typejava.lang.String- Returns:
- Iterator
-
promptSetIterator
public java.util.Iterator<PromptSetDefinition> promptSetIterator()
Returns an iterator overPromptSetDefinition.- Returns:
- Iterator
-
activePromptSetIterator
public java.util.Iterator<PromptSetDefinition> activePromptSetIterator()
Returns an iterator overPromptSetDefinition, Iterates over only non deleted entries.- Returns:
- Iterator
-
addPromptSet
public void addPromptSet(PromptSetDefinition def)
Adds a new PromptSet to this object. Throws IllegalArgumentException if Object already exists- Parameters:
def- PromptSetDefinition
-
addValue
public void addValue(java.lang.String validityKeyword, java.lang.String value, boolean replace)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
public void addValue(java.lang.String validityKeyword, java.lang.String value, java.lang.String ertUsage, boolean replace)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
public java.lang.String getValue(java.lang.String validityKeyword)
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
public ErtUsage getErtUsage(java.lang.String validityKeyword)
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
public boolean removeValue(java.lang.String validityKeyword)
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
public void updateDefinition(PromptSet set)
This method can be used to update the number of prompt elements based on aPromptSetobject.- Parameters:
set- PromptSet
-
rearrange
public void rearrange(java.util.List<PromptSetDefinition> orderedPromptSets)
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
-
-