Class CompositeDefinitionAndValue<T>
java.lang.Object
org.ametys.runtime.model.DefinitionAndValue<T>
org.ametys.plugins.repository.model.CompositeDefinitionAndValue<T>
- Type Parameters:
T
- Type of the root object
- Direct Known Subclasses:
RepeaterEntryDefinitionAndValue
Pair of a value and its definition for a composite
-
Constructor Summary
ConstructorDescriptionCompositeDefinitionAndValue
(T root, ModelItem definition, Object value, DefinitionAndValue... children) Creates a composite definition and value pairCompositeDefinitionAndValue
(T root, ModelItem definition, Object value, DefinitionAndValue<T> parent, DefinitionAndValue... children) Creates a composite definition and value pair -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(DefinitionAndValue definitionAndValue) Add a definition and value pair as a child of this compositeRetrieves the children definition and value pairs of this compositeRetrieves the definitionMethods inherited from class org.ametys.runtime.model.DefinitionAndValue
extractValues, getParent, getRoot, getValue
-
Constructor Details
-
CompositeDefinitionAndValue
public CompositeDefinitionAndValue(T root, ModelItem definition, Object value, DefinitionAndValue... children) Creates a composite definition and value pair- Parameters:
root
- the root object of this definition and value pairdefinition
- the definitionvalue
- the valuechildren
- the children of the definition and value pair
-
CompositeDefinitionAndValue
public CompositeDefinitionAndValue(T root, ModelItem definition, Object value, DefinitionAndValue<T> parent, DefinitionAndValue... children) Creates a composite 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 pairchildren
- the children of the definition and value pair
-
-
Method Details
-
getDefinition
Description copied from class:DefinitionAndValue
Retrieves the definition- Overrides:
getDefinition
in classDefinitionAndValue<T>
- Returns:
- the definition
-
getChildren
Retrieves the children definition and value pairs of this composite- Returns:
- the children
-
addChild
Add a definition and value pair as a child of this composite- Parameters:
definitionAndValue
- the definition and value pair to add as child
-