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
public class CompositeDefinitionAndValue<T> extends DefinitionAndValue<T>
Pair of a value and its definition for a composite
-
-
Field Summary
Fields Modifier and Type Field Description private List<DefinitionAndValue>
_children
private CompositeDefinition
_compositeDefinition
-
Constructor Summary
Constructors Constructor Description CompositeDefinitionAndValue(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(DefinitionAndValue definitionAndValue)
Add a definition and value pair as a child of this compositeList<DefinitionAndValue>
getChildren()
Retrieves the children definition and value pairs of this compositeModelItemGroup
getDefinition()
Retrieves the definition-
Methods inherited from class org.ametys.runtime.model.DefinitionAndValue
extractValues, getParent, getRoot, getValue
-
-
-
-
Field Detail
-
_compositeDefinition
private CompositeDefinition _compositeDefinition
-
_children
private List<DefinitionAndValue> _children
-
-
Constructor Detail
-
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 Detail
-
getDefinition
public ModelItemGroup getDefinition()
Description copied from class:DefinitionAndValue
Retrieves the definition- Overrides:
getDefinition
in classDefinitionAndValue<T>
- Returns:
- the definition
-
getChildren
public List<DefinitionAndValue> getChildren()
Retrieves the children definition and value pairs of this composite- Returns:
- the children
-
addChild
public void addChild(DefinitionAndValue definitionAndValue)
Add a definition and value pair as a child of this composite- Parameters:
definitionAndValue
- the definition and value pair to add as child
-
-