Class DefaultModifiableModelAwareRepeaterEntry
java.lang.Object
org.ametys.cms.data.holder.group.impl.DefaultModelAwareRepeaterEntry
org.ametys.cms.data.holder.group.impl.DefaultModifiableModelAwareRepeaterEntry
- All Implemented Interfaces:
IndexableComposite
,IndexableRepeaterEntry
,ModifiableIndexableComposite
,ModifiableIndexableRepeaterEntry
,IndexableDataHolder
,ModifiableIndexableDataHolder
,DataHolder
,Composite
,ModelAwareComposite
,ModelAwareRepeaterEntry
,ModifiableComposite
,ModifiableModelAwareComposite
,ModifiableModelAwareRepeaterEntry
,ModifiableRepeaterEntry
,RepeaterEntry
,ModelAwareDataHolder
,ModifiableDataHolder
,ModifiableModelAwareDataHolder
public class DefaultModifiableModelAwareRepeaterEntry
extends DefaultModelAwareRepeaterEntry
implements ModifiableIndexableRepeaterEntry
Class for modifiable model aware repeater entries
-
Field Summary
Modifier and TypeFieldDescriptionprotected ModifiableIndexableDataHolder
the default implementation of aModifiableIndexableDataHolder
to useprotected ModifiableIndexableRepeater
the repeater containing this entryprotected ModifiableRepositoryData
The modifiable repository data if the repeater entry is modifiableFields inherited from class org.ametys.cms.data.holder.group.impl.DefaultModelAwareRepeaterEntry
_defaultDataHolder, _definition, _repeater, _repositoryData
Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX
-
Constructor Summary
ConstructorDescriptionDefaultModifiableModelAwareRepeaterEntry
(ModifiableRepositoryData repositoryData, ModifiableIndexableRepeater repeater, RepeaterDefinition definition) Creates a modifiable model aware repeater entry -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the default implementation of aDataHolder
to useRetrieves the holding repeater of this entry.Retrieves the repository data used by thisDataHolder
void
setPosition
(int position) Sets the position of the entry in the repeater.Methods inherited from class org.ametys.cms.data.holder.group.impl.DefaultModelAwareRepeaterEntry
dataToJSON, dataToJSON, dataToJSONForEdition, getPosition
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.group.Composite
dataToJSON, dataToSAX, getDataNames, hasValue, hasValueOrEmpty
Methods inherited from interface org.ametys.plugins.repository.data.holder.DataHolder
dataToJSON, dataToSAX
Methods inherited from interface org.ametys.plugins.repository.data.holder.group.ModelAwareComposite
copyTo, dataToJSON, dataToJSONForEdition, dataToMap, dataToSAX, dataToSAXForEdition, getComments, getDataNames, getDefinition, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, getValue, hasComments, hasDefinition, hasDifferences, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValueOrEmpty
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
commentsToSAX, dataToJSON, dataToJSON, dataToJSON, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, getType, isMultiple
Methods inherited from interface org.ametys.cms.data.holder.group.ModifiableIndexableComposite
getComposite, getComposite, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRootDataHolder
Methods inherited from interface org.ametys.plugins.repository.data.holder.group.ModifiableModelAwareComposite
getComposite, getExternalComposite, getExternalRepeater, getLocalComposite, getLocalRepeater, getParentDataHolder, getRepeater, getRootDataHolder, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setComments, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValues
Methods inherited from interface org.ametys.plugins.repository.data.holder.group.RepeaterEntry
getPosition
-
Field Details
-
_modifiableRepositoryData
The modifiable repository data if the repeater entry is modifiable -
_modifiableRepeater
the repeater containing this entry -
_modifiableDefaultDataHolder
the default implementation of aModifiableIndexableDataHolder
to use
-
-
Constructor Details
-
DefaultModifiableModelAwareRepeaterEntry
public DefaultModifiableModelAwareRepeaterEntry(ModifiableRepositoryData repositoryData, ModifiableIndexableRepeater repeater, RepeaterDefinition definition) Creates a modifiable model aware repeater entry- Parameters:
repositoryData
- the repository data of the repeater entryrepeater
- the repeater containing this entrydefinition
- the definition of the repeater
-
-
Method Details
-
setPosition
Description copied from interface:ModifiableRepeaterEntry
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)- Specified by:
setPosition
in interfaceModifiableRepeaterEntry
- Parameters:
position
- The new position of the entry- Throws:
IllegalArgumentException
- if the position is not between the negative and positive repeater size
-
getDefaultDataHolder
Description copied from interface:Composite
Retrieves the default implementation of aDataHolder
to use- Specified by:
getDefaultDataHolder
in interfaceComposite
- Specified by:
getDefaultDataHolder
in interfaceIndexableComposite
- Specified by:
getDefaultDataHolder
in interfaceModelAwareComposite
- Specified by:
getDefaultDataHolder
in interfaceModifiableIndexableComposite
- Specified by:
getDefaultDataHolder
in interfaceModifiableModelAwareComposite
- Overrides:
getDefaultDataHolder
in classDefaultModelAwareRepeaterEntry
- Returns:
- the
DataHolder
-
getRepositoryData
Description copied from interface:DataHolder
Retrieves the repository data used by thisDataHolder
- Specified by:
getRepositoryData
in interfaceDataHolder
- Specified by:
getRepositoryData
in interfaceModifiableDataHolder
- Overrides:
getRepositoryData
in classDefaultModelAwareRepeaterEntry
- Returns:
- the repository data used by this
DataHolder
-
getHoldingRepeater
Description copied from interface:RepeaterEntry
Retrieves the holding repeater of this entry.- Specified by:
getHoldingRepeater
in interfaceIndexableRepeaterEntry
- Specified by:
getHoldingRepeater
in interfaceModelAwareRepeaterEntry
- Specified by:
getHoldingRepeater
in interfaceModifiableIndexableRepeaterEntry
- Specified by:
getHoldingRepeater
in interfaceModifiableModelAwareRepeaterEntry
- Specified by:
getHoldingRepeater
in interfaceModifiableRepeaterEntry
- Specified by:
getHoldingRepeater
in interfaceRepeaterEntry
- Overrides:
getHoldingRepeater
in classDefaultModelAwareRepeaterEntry
- Returns:
- the holding repeater of this entry
-