Package com.uc4.api.objects
Class TaskValues
- java.lang.Object
-
- com.uc4.api.objects.TaskValues
-
public class TaskValues extends java.lang.ObjectThis class represents task values and PromptSets.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTaskValues(com.uc4.util.XMLDocument doc, org.w3c.dom.Element task)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TaskValuescopy()This method is used to return the copy of the TaskValues Object.ErtUsagegetErtUsage(java.lang.String validityKeyword)Returns theErtUsagevalue 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.ErtUsagegetParentErtUsage(java.lang.String validityKeyword)Returns theErtUsagevalue of the parent, for a given validity keyword The method returnsErtUsage.NONEif the validity keyword does not exist.java.lang.StringgetParentValue(java.lang.String validityKeyword)Returns the parent value for a given validity keyword The method returnsnullif the validity keyword does not exist.java.lang.StringgetValue(java.lang.String validityKeyword)Returns the value for a given validity keyword The method returnsnullif the validity keyword does not exist.booleanisValueOverridden(java.lang.String validityKeyword)Returns if the value for a given validity keyword (variable) was overriddenjava.util.Iterator<java.lang.String>parentValueKeyIterator()Returns an iterator over parent validity keywords.intparentValueSize()java.util.Iterator<PromptSetDefinition>promptSetIterator()Returns an iterator overPromptSetDefinition.intpromptSetSize()booleanreplaceValue(java.lang.String kw, java.lang.String value)Replaces an existing value.booleanreplaceValueOnlyIfChanged(java.lang.String kw, java.lang.String value)Deprecated.Deprecated, kept only for binary compatibility.java.util.Iterator<java.lang.String>valueKeyIterator()Returns an iterator over validity keywords.intvalueSize()
-
-
-
Method Detail
-
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
-
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
-
parentValueKeyIterator
public java.util.Iterator<java.lang.String> parentValueKeyIterator()
Returns an iterator over parent validity keywords. All parent validity keywords have the typejava.lang.String- Returns:
- Iterator
-
replaceValue
public boolean replaceValue(java.lang.String kw, java.lang.String value)Replaces an existing value.- Parameters:
kw- Keyvalue- Value- Returns:
- If true the value will be replaced if a key with this name does already exist
-
replaceValueOnlyIfChanged
@Deprecated public boolean replaceValueOnlyIfChanged(java.lang.String kw, java.lang.String value)Deprecated.Deprecated, kept only for binary compatibility.Replaces an existing value and overrideDefinition if values differ. The semantics of this method have turned out to not make sense - don't use it.- Parameters:
kw- Keyvalue- Value- Returns:
- If true the value and the overrideDefinition will be replaced if a key with this name already exists.
-
valueSize
public int valueSize()
- Returns:
- Number of entries in the Variable.
-
parentValueSize
public int parentValueSize()
- Returns:
- Number of entries in the parent Variable.
-
promptSetSize
public int promptSetSize()
- Returns:
- Number of PromptSet entries
-
promptSetIterator
public java.util.Iterator<PromptSetDefinition> promptSetIterator()
Returns an iterator overPromptSetDefinition.- Returns:
- Iterator
-
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
-
isValueOverridden
public boolean isValueOverridden(java.lang.String validityKeyword)
Returns if the value for a given validity keyword (variable) was overridden- Parameters:
validityKeyword- Key- Returns:
- overridden value or false if the key does not exist
-
getParentValue
public java.lang.String getParentValue(java.lang.String validityKeyword)
Returns the parent value for a given validity keyword The method returnsnullif the validity keyword does not exist.- Parameters:
validityKeyword- Key- Returns:
- Parent value or null if the key does not exist
-
getErtUsage
public ErtUsage getErtUsage(java.lang.String validityKeyword)
Returns theErtUsagevalue for a given validity keyword The method returnsErtUsage.NONEif the validity keyword does not exist.- Parameters:
validityKeyword- Key- Returns:
- Return the
ErtUsageorErtUsage.NONEif the key does not exist
-
getParentErtUsage
public ErtUsage getParentErtUsage(java.lang.String validityKeyword)
Returns theErtUsagevalue of the parent, for a given validity keyword The method returnsErtUsage.NONEif the validity keyword does not exist.- Parameters:
validityKeyword- Key- Returns:
- Return the
ErtUsageorErtUsage.NONEif the key does not exist
-
copy
public TaskValues copy()
This method is used to return the copy of the TaskValues Object.- Returns:
- TaskValues
-
-