Package org.ametys.cms.data.holder.group
Interface ModifiableIndexableRepeater
- All Superinterfaces:
IndexableRepeater,ModelAwareRepeater,ModifiableModelAwareRepeater,ModifiableRepeater,Repeater
- All Known Implementing Classes:
DefaultModifiableModelAwareRepeater
public interface ModifiableIndexableRepeater
extends IndexableRepeater, ModifiableModelAwareRepeater
Interface for modifiable indexable repeaters
-
Method Summary
Modifier and TypeMethodDescriptionaddEntry()Creates a Repeater entry at the last position.addEntry(int position) Creates a Repeater entry at the given position.List<? extends ModifiableIndexableRepeaterEntry>Retrieves the repeater entries, sorted by positiongetEntry(int position) Retrieves the repeater entry at the given position.Retrieves the parent of the currentRepeaterRetrieves the rootDataHolderof the current repeaterMethods inherited from interface org.ametys.cms.data.holder.group.IndexableRepeater
indexData, indexDataMethods inherited from interface org.ametys.plugins.repository.data.holder.group.ModelAwareRepeater
dataToJSON, dataToJSON, dataToJSON, dataToJSON, dataToSAX, dataToSAX, dataToSAX, dataToSAX, getModelMethods inherited from interface org.ametys.plugins.repository.data.holder.group.ModifiableModelAwareRepeater
synchronizeValues, synchronizeValuesMethods inherited from interface org.ametys.plugins.repository.data.holder.group.ModifiableRepeater
getRepositoryData, moveEntries, removeEntries, removeEntryMethods inherited from interface org.ametys.plugins.repository.data.holder.group.Repeater
copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getSize, hasEntry
-
Method Details
-
getEntries
List<? extends ModifiableIndexableRepeaterEntry> getEntries()Description copied from interface:RepeaterRetrieves the repeater entries, sorted by position- Specified by:
getEntriesin interfaceIndexableRepeater- Specified by:
getEntriesin interfaceModelAwareRepeater- Specified by:
getEntriesin interfaceModifiableModelAwareRepeater- Specified by:
getEntriesin interfaceRepeater- Returns:
- the repeater entries
-
getEntry
Description copied from interface:RepeaterRetrieves the repeater entry at the given position. The position starts at index 1. The position can be an integer between 1 and the repeater size to get an entry from the beginning Or the position can an integer between 0 and - the repeater size to get an entry from the end (0 means at the end, -1 means before the last one and so on)- Specified by:
getEntryin interfaceIndexableRepeater- Specified by:
getEntryin interfaceModelAwareRepeater- Specified by:
getEntryin interfaceModifiableModelAwareRepeater- Specified by:
getEntryin interfaceModifiableRepeater- Specified by:
getEntryin interfaceRepeater- Parameters:
position- the position of the entry to retrieve- Returns:
- the repeater entry,
nullif there is no entry at this position
-
addEntry
Description copied from interface:ModifiableRepeaterCreates a Repeater entry at the last position.- Specified by:
addEntryin interfaceModifiableModelAwareRepeater- Specified by:
addEntryin interfaceModifiableRepeater- Returns:
- the created entry
-
addEntry
Description copied from interface:ModifiableRepeaterCreates a Repeater entry at the given position. The position starts at index 1. The position can be an integer between 1 and the repeater size + 1 to insert an entry from the beginning Or the position can an integer between 0 and - the repeater size to insert an entry from the end (0 means at the end, -1 means before the last one and so on)- Specified by:
addEntryin interfaceModifiableModelAwareRepeater- Specified by:
addEntryin interfaceModifiableRepeater- Parameters:
position- The position of the new entry- Returns:
- the created entry
- Throws:
IllegalArgumentException- if the position is not between the negative and positive repeater size
-
getParentDataHolder
Description copied from interface:RepeaterRetrieves the parent of the currentRepeater- Specified by:
getParentDataHolderin interfaceIndexableRepeater- Specified by:
getParentDataHolderin interfaceModelAwareRepeater- Specified by:
getParentDataHolderin interfaceModifiableModelAwareRepeater- Specified by:
getParentDataHolderin interfaceModifiableRepeater- Specified by:
getParentDataHolderin interfaceRepeater- Returns:
- the parent of the current
Repeater
-
getRootDataHolder
Description copied from interface:RepeaterRetrieves the rootDataHolderof the current repeater- Specified by:
getRootDataHolderin interfaceIndexableRepeater- Specified by:
getRootDataHolderin interfaceModelAwareRepeater- Specified by:
getRootDataHolderin interfaceModifiableModelAwareRepeater- Specified by:
getRootDataHolderin interfaceModifiableRepeater- Specified by:
getRootDataHolderin interfaceRepeater- Returns:
- the root
DataHolder
-