Class DefinitionAndValue<T>

java.lang.Object
org.ametys.runtime.model.DefinitionAndValue<T>
Type Parameters:
T - Type of the root object
Direct Known Subclasses:
CompositeDefinitionAndValue, ContentAttributeDefinitionAndValue, RepeaterDefinitionAndValue

public class DefinitionAndValue<T> extends Object
Pair of a value and its definition
  • Constructor Details

    • DefinitionAndValue

      public DefinitionAndValue(T root, ModelItem definition, Object value)
      Creates a definition and value pair
      Parameters:
      root - the root object of this definition and value pair
      definition - the definition
      value - the value
    • DefinitionAndValue

      public DefinitionAndValue(T root, ModelItem definition, Object value, DefinitionAndValue<T> parent)
      Creates a definition and value pair
      Parameters:
      root - the root object of this definition and value pair
      definition - the definition
      value - the value
      parent - the parent of the definition and value pair
  • Method Details

    • getRoot

      public T getRoot()
      Retrieves the root object of this definition and value pair
      Returns:
      the root
    • getDefinition

      Retrieves the definition
      Returns:
      the definition
    • getValue

      public Object getValue()
      Retrieves the value
      Returns:
      the value
    • getParent

      Retrieves the parent of the definition and value pair
      Returns:
      the parent
    • extractValues

      public static Map<String,Object> extractValues(Map<String,DefinitionAndValue> definitionAndValues)
      extract a map of values from a map of DefinitionAndValue
      Parameters:
      definitionAndValues - a map containing definition and values
      Returns:
      a map containing only values