Class AbstractRepeaterEntry
java.lang.Object
org.ametys.plugins.repository.data.holder.group.impl.AbstractComposite
org.ametys.plugins.repository.data.holder.group.impl.AbstractRepeaterEntry
- All Implemented Interfaces:
DataHolder
,Composite
,RepeaterEntry
- Direct Known Subclasses:
ModelAwareRepeaterEntry
Abstract class for repeater entries
-
Field Summary
Modifier and TypeFieldDescriptionprotected ModifiableRepositoryData
The modifiable repository data if the repeater entry is modifiableFields inherited from class org.ametys.plugins.repository.data.holder.group.impl.AbstractComposite
_repositoryData
-
Constructor Summary
ConstructorDescriptionAbstractRepeaterEntry
(RepositoryData repositoryData) Creates a repeater entry -
Method Summary
Modifier and TypeMethodDescriptionint
Retrieves the position of this entry in the repeaterprotected void
setPosition
(int newPosition, Repeater repeater) Sets the position of the entry in the repeater.Methods inherited from class org.ametys.plugins.repository.data.holder.group.impl.AbstractComposite
copyTo, dataToSAX, getDataNames, getDefaultDataHolder, getRepositoryData, hasValue, hasValueOrEmpty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.plugins.repository.data.holder.DataHolder
copyTo, dataToSAX, dataToSAX, getComposite, getDataNames, getParentDataHolder, getRepositoryData, getRootDataHolder, hasValue, hasValueOrEmpty
Methods inherited from interface org.ametys.plugins.repository.data.holder.group.RepeaterEntry
getHoldingRepeater
-
Field Details
-
_modifiableRepositoryData
The modifiable repository data if the repeater entry is modifiable
-
-
Constructor Details
-
AbstractRepeaterEntry
Creates a repeater entry- Parameters:
repositoryData
- the repository data of the repeater entry
-
-
Method Details
-
getPosition
Description copied from interface:RepeaterEntry
Retrieves the position of this entry in the repeater- Specified by:
getPosition
in interfaceRepeaterEntry
- Returns:
- the position of this entry in the repeater
-
setPosition
Sets the position of the entry in the repeater. The position starts at index 1. The position can be an integer between 1 and the repeater size to move an entry from the beginning Or the position can an integer between 0 and - the repeater size to move an entry from the end (0 means at the end, -1 means before the last one and so on)- Parameters:
newPosition
- The new position of the entryrepeater
- the repeater containing this entry- Throws:
IllegalArgumentException
- if the position is not between the negative and positive repeater size
-