Class ObjectValues

java.lang.Object
com.uc4.api.objects.ObjectValues

public final class ObjectValues extends Object
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 Details

    • valueKeyIterator

      public Iterator<String> valueKeyIterator()
      Returns an iterator over validity keywords. All validity keywords have the type java.lang.String
      Returns:
      Iterator
    • promptSetIterator

      public Iterator<PromptSetDefinition> promptSetIterator()
      Returns an iterator over PromptSetDefinition.
      Returns:
      Iterator
    • activePromptSetIterator

      public Iterator<PromptSetDefinition> activePromptSetIterator()
      Returns an iterator over PromptSetDefinition, 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(String validityKeyword, String value, boolean replace)
      Adds a new key and value to this object. The parameter replace can be used to define if the value should be replaced in case of an already existing validity keyword.
      Parameters:
      validityKeyword - Key
      value - Value
      replace - If true the value will be replaced if a key with this name does already exist
    • addValue

      public void addValue(String validityKeyword, String value, String ertUsage, boolean replace)
      Adds a new key,value and ErtUsage to this object. The parameter replace can 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 - Key
      value - Value
      ertUsage - Acceptable Ert usage Values are 0 to 5, otherwise ertUsage value will be set to 0 i.e its Default Value
      replace - If true the value will be replaced if a key with this name does already exist
    • getValue

      public String getValue(String validityKeyword)
      Returns the value for a given validity keyword The method returns null if the validity keyword does not exist.
      Parameters:
      validityKeyword - Key
      Returns:
      Value or null if the key does not exist
    • getErtUsage

      public ErtUsage getErtUsage(String validityKeyword)
      Returns the ertUsage for a given validity keyword The method returns ErtUsage.NONE if the validity keyword does not exist. ErtUsage.NONE is default value of ERT Usage Value.
      Parameters:
      validityKeyword - Key
      Returns:
      ErtUsage or ErtUsage.NONE if the key does not exist.
    • removeValue

      public boolean removeValue(String validityKeyword)
      Removes a variable entry The method returns false if 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 this VariableValues instance. 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 a PromptSet object.
      Parameters:
      set - PromptSet
    • rearrange

      public void rearrange(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