Package org.ametys.runtime.model
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
Pair of a value and its definition
-
Constructor Summary
ConstructorsConstructorDescriptionDefinitionAndValue(T root, ModelItem definition, Object value) Creates a definition and value pairDefinitionAndValue(T root, ModelItem definition, Object value, DefinitionAndValue<T> parent) Creates a definition and value pair -
Method Summary
Modifier and TypeMethodDescriptionextractValues(Map<String, DefinitionAndValue> definitionAndValues) extract a map of values from a map of DefinitionAndValueRetrieves the definitionRetrieves the parent of the definition and value pairgetRoot()Retrieves the root object of this definition and value pairgetValue()Retrieves the value
-
Constructor Details
-
DefinitionAndValue
Creates a definition and value pair- Parameters:
root- the root object of this definition and value pairdefinition- the definitionvalue- the value
-
DefinitionAndValue
Creates a definition and value pair- Parameters:
root- the root object of this definition and value pairdefinition- the definitionvalue- the valueparent- the parent of the definition and value pair
-
-
Method Details
-
getRoot
Retrieves the root object of this definition and value pair- Returns:
- the root
-
getDefinition
Retrieves the definition- Returns:
- the definition
-
getValue
Retrieves the value- Returns:
- the value
-
getParent
Retrieves the parent of the definition and value pair- Returns:
- the parent
-
extractValues
extract a map of values from a map of DefinitionAndValue- Parameters:
definitionAndValues- a map containing definition and values- Returns:
- a map containing only values
-