Class RepeaterDefinitionAndValue<T>
- java.lang.Object
-
- org.ametys.runtime.model.DefinitionAndValue<T>
-
- org.ametys.plugins.repository.model.RepeaterDefinitionAndValue<T>
-
- Type Parameters:
T
- Type of the root object
public class RepeaterDefinitionAndValue<T> extends DefinitionAndValue<T>
Pair of a value and its definition for a repeater
-
-
Constructor Summary
Constructors Constructor Description RepeaterDefinitionAndValue(T root, ModelItem definition, Object value, RepeaterEntryDefinitionAndValue... entries)
Creates a repeater definition and value pairRepeaterDefinitionAndValue(T root, ModelItem definition, Object value, DefinitionAndValue<T> parent, RepeaterEntryDefinitionAndValue... entries)
Creates a repeater definition and value pair
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEntry(RepeaterEntryDefinitionAndValue entryDefinitionAndValue)
Add an entry definition and value pair to the repeaterRepeaterDefinition
getDefinition()
Retrieves the definitionList<RepeaterEntryDefinitionAndValue>
getEntries()
Retrieves the entries definition and value pairs of this repeater-
Methods inherited from class org.ametys.runtime.model.DefinitionAndValue
extractValues, getParent, getRoot, getValue
-
-
-
-
Constructor Detail
-
RepeaterDefinitionAndValue
public RepeaterDefinitionAndValue(T root, ModelItem definition, Object value, RepeaterEntryDefinitionAndValue... entries)
Creates a repeater definition and value pair- Parameters:
root
- the root object of this definition and value pairdefinition
- the definitionvalue
- the valueentries
- the entries of the repeater definition and value pair
-
RepeaterDefinitionAndValue
public RepeaterDefinitionAndValue(T root, ModelItem definition, Object value, DefinitionAndValue<T> parent, RepeaterEntryDefinitionAndValue... entries)
Creates a repeater 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 pairentries
- the entries of the repeater definition and value pair
-
-
Method Detail
-
getDefinition
public RepeaterDefinition getDefinition()
Description copied from class:DefinitionAndValue
Retrieves the definition- Overrides:
getDefinition
in classDefinitionAndValue<T>
- Returns:
- the definition
-
getEntries
public List<RepeaterEntryDefinitionAndValue> getEntries()
Retrieves the entries definition and value pairs of this repeater- Returns:
- the entries
-
addEntry
public void addEntry(RepeaterEntryDefinitionAndValue entryDefinitionAndValue)
Add an entry definition and value pair to the repeater- Parameters:
entryDefinitionAndValue
- the definition and value pair to add as entry
-
-