Package org.ametys.cms.data.holder.group
Interface ModifiableIndexableComposite
- All Superinterfaces:
Composite
,DataHolder
,IndexableComposite
,IndexableDataHolder
,ModelAwareComposite
,ModelAwareDataHolder
,ModifiableComposite
,ModifiableDataHolder
,ModifiableIndexableDataHolder
,ModifiableModelAwareComposite
,ModifiableModelAwareDataHolder
- All Known Subinterfaces:
ModifiableIndexableRepeaterEntry
- All Known Implementing Classes:
DefaultModifiableModelAwareComposite
,DefaultModifiableModelAwareRepeaterEntry
public interface ModifiableIndexableComposite
extends IndexableComposite, ModifiableModelAwareComposite, ModifiableIndexableDataHolder
Interface for modifiable indexable composites
-
Field Summary
Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX
-
Method Summary
Modifier and TypeMethodDescriptiondefault ModifiableIndexableComposite
getComposite
(String compositePath) Retrieves the composite at the given pathdefault ModifiableIndexableComposite
getComposite
(String compositePath, boolean createNew) Retrieves the composite at the given pathRetrieves the default implementation of aDataHolder
to usedefault ModifiableIndexableComposite
getExternalComposite
(String compositePath) Retrieves the external composite at the given pathdefault ModifiableIndexableComposite
getExternalComposite
(String compositePath, boolean createNew) Retrieves the external composite at the given pathdefault ModifiableIndexableRepeater
getExternalRepeater
(String repeaterPath) Retrieves the external repeater at the given pathdefault ModifiableIndexableRepeater
getExternalRepeater
(String repeaterPath, boolean createNew) Retrieves the external repeater at the given pathdefault ModifiableIndexableComposite
getLocalComposite
(String compositePath) Retrieves the local composite at the given pathdefault ModifiableIndexableComposite
getLocalComposite
(String compositePath, boolean createNew) Retrieves the local composite at the given pathdefault ModifiableIndexableRepeater
getLocalRepeater
(String repeaterPath) Retrieves the local repeater at the given pathdefault ModifiableIndexableRepeater
getLocalRepeater
(String repeaterPath, boolean createNew) Retrieves the local repeater at the given pathdefault Optional<? extends ModifiableIndexableDataHolder>
Retrieves the optional parent of the currentDataHolder
There can be no parent if the currentDataHolder
is the rootdefault ModifiableIndexableRepeater
getRepeater
(String repeaterPath) Retrieves the repeater at the given pathdefault ModifiableIndexableRepeater
getRepeater
(String repeaterPath, boolean createNew) Retrieves the repeater at the given pathdefault ModifiableIndexableDataHolder
Retrieves theDataHolder
that is the root of the current oneMethods 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, 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.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryData
Methods inherited from interface org.ametys.plugins.repository.data.holder.group.ModifiableModelAwareComposite
removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setComments, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValues
-
Method Details
-
getComposite
default ModifiableIndexableComposite getComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the composite at the given path- Specified by:
getComposite
in interfaceDataHolder
- Specified by:
getComposite
in interfaceIndexableComposite
- Specified by:
getComposite
in interfaceIndexableDataHolder
- Specified by:
getComposite
in interfaceModelAwareComposite
- Specified by:
getComposite
in interfaceModelAwareDataHolder
- Specified by:
getComposite
in interfaceModifiableDataHolder
- Specified by:
getComposite
in interfaceModifiableIndexableDataHolder
- Specified by:
getComposite
in interfaceModifiableModelAwareComposite
- Specified by:
getComposite
in interfaceModifiableModelAwareDataHolder
- Parameters:
compositePath
- path of the composite to retrieve- Returns:
- the composite or
null
if not exists or is empty - Throws:
IllegalArgumentException
- if the given composite path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a compositeBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getLocalComposite
default ModifiableIndexableComposite getLocalComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the local composite at the given path- Specified by:
getLocalComposite
in interfaceIndexableComposite
- Specified by:
getLocalComposite
in interfaceIndexableDataHolder
- Specified by:
getLocalComposite
in interfaceModelAwareComposite
- Specified by:
getLocalComposite
in interfaceModelAwareDataHolder
- Specified by:
getLocalComposite
in interfaceModifiableIndexableDataHolder
- Specified by:
getLocalComposite
in interfaceModifiableModelAwareComposite
- Specified by:
getLocalComposite
in interfaceModifiableModelAwareDataHolder
- Parameters:
compositePath
- path of the externalizable composite to retrieve- Returns:
- the composite or
null
if not exists or is empty - Throws:
IllegalArgumentException
- if the given composite path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a compositeBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getExternalComposite
default ModifiableIndexableComposite getExternalComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the external composite at the given path- Specified by:
getExternalComposite
in interfaceIndexableComposite
- Specified by:
getExternalComposite
in interfaceIndexableDataHolder
- Specified by:
getExternalComposite
in interfaceModelAwareComposite
- Specified by:
getExternalComposite
in interfaceModelAwareDataHolder
- Specified by:
getExternalComposite
in interfaceModifiableIndexableDataHolder
- Specified by:
getExternalComposite
in interfaceModifiableModelAwareComposite
- Specified by:
getExternalComposite
in interfaceModifiableModelAwareDataHolder
- Parameters:
compositePath
- path of the externalizable composite to retrieve- Returns:
- the composite or
null
if not exists or is empty - Throws:
IllegalArgumentException
- if the given composite path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a compositeBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getRepeater
default ModifiableIndexableRepeater getRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the repeater at the given path- Specified by:
getRepeater
in interfaceIndexableComposite
- Specified by:
getRepeater
in interfaceIndexableDataHolder
- Specified by:
getRepeater
in interfaceModelAwareComposite
- Specified by:
getRepeater
in interfaceModelAwareDataHolder
- Specified by:
getRepeater
in interfaceModifiableIndexableDataHolder
- Specified by:
getRepeater
in interfaceModifiableModelAwareComposite
- Specified by:
getRepeater
in interfaceModifiableModelAwareDataHolder
- Parameters:
repeaterPath
- path of the repeater to retrieve- Returns:
- the repeater or
null
if not exists or is empty - Throws:
IllegalArgumentException
- if the given repeater path is null or emptyUndefinedItemPathException
- if the given repeater path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a repeaterBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getLocalRepeater
default ModifiableIndexableRepeater getLocalRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the local repeater at the given path- Specified by:
getLocalRepeater
in interfaceIndexableComposite
- Specified by:
getLocalRepeater
in interfaceIndexableDataHolder
- Specified by:
getLocalRepeater
in interfaceModelAwareComposite
- Specified by:
getLocalRepeater
in interfaceModelAwareDataHolder
- Specified by:
getLocalRepeater
in interfaceModifiableIndexableDataHolder
- Specified by:
getLocalRepeater
in interfaceModifiableModelAwareComposite
- Specified by:
getLocalRepeater
in interfaceModifiableModelAwareDataHolder
- Parameters:
repeaterPath
- path of the externalizable repeater to retrieve- Returns:
- the repeater or
null
if not exists or is empty - Throws:
IllegalArgumentException
- if the given repeater path is null or emptyUndefinedItemPathException
- if the given repeater path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a repeaterBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getExternalRepeater
default ModifiableIndexableRepeater getExternalRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the external repeater at the given path- Specified by:
getExternalRepeater
in interfaceIndexableComposite
- Specified by:
getExternalRepeater
in interfaceIndexableDataHolder
- Specified by:
getExternalRepeater
in interfaceModelAwareComposite
- Specified by:
getExternalRepeater
in interfaceModelAwareDataHolder
- Specified by:
getExternalRepeater
in interfaceModifiableIndexableDataHolder
- Specified by:
getExternalRepeater
in interfaceModifiableModelAwareComposite
- Specified by:
getExternalRepeater
in interfaceModifiableModelAwareDataHolder
- Parameters:
repeaterPath
- path of the externalizable repeater to retrieve- Returns:
- the repeater or
null
if not exists or is empty - Throws:
IllegalArgumentException
- if the given repeater path is null or emptyUndefinedItemPathException
- if the given repeater path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a repeaterBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getComposite
default ModifiableIndexableComposite getComposite(String compositePath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableDataHolder
Retrieves the composite at the given path- Specified by:
getComposite
in interfaceModifiableDataHolder
- Specified by:
getComposite
in interfaceModifiableIndexableDataHolder
- Specified by:
getComposite
in interfaceModifiableModelAwareComposite
- Specified by:
getComposite
in interfaceModifiableModelAwareDataHolder
- Parameters:
compositePath
- path of the composite to retrievecreateNew
-true
to create the composite if it does not exist,false
otherwise- Returns:
- the composite or
null
if createNew isfalse
and value not exists or is empty - Throws:
IllegalArgumentException
- if the given composite path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a compositeBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getLocalComposite
default ModifiableIndexableComposite getLocalComposite(String compositePath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolder
Retrieves the local composite at the given path- Specified by:
getLocalComposite
in interfaceModifiableIndexableDataHolder
- Specified by:
getLocalComposite
in interfaceModifiableModelAwareComposite
- Specified by:
getLocalComposite
in interfaceModifiableModelAwareDataHolder
- Parameters:
compositePath
- path of the externalizable composite to retrievecreateNew
-true
to create the composite if it does not exist,false
otherwise- Returns:
- the composite or
null
if createNew isfalse
and value not exists or is empty - Throws:
IllegalArgumentException
- if the given composite path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a compositeBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getExternalComposite
default ModifiableIndexableComposite getExternalComposite(String compositePath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolder
Retrieves the external composite at the given path- Specified by:
getExternalComposite
in interfaceModifiableIndexableDataHolder
- Specified by:
getExternalComposite
in interfaceModifiableModelAwareComposite
- Specified by:
getExternalComposite
in interfaceModifiableModelAwareDataHolder
- Parameters:
compositePath
- path of the externalizable composite to retrievecreateNew
-true
to create the composite if it does not exist,false
otherwise- Returns:
- the composite or
null
if createNew isfalse
and value not exists or is empty - Throws:
IllegalArgumentException
- if the given composite path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a compositeBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getRepeater
default ModifiableIndexableRepeater getRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolder
Retrieves the repeater at the given path- Specified by:
getRepeater
in interfaceModifiableIndexableDataHolder
- Specified by:
getRepeater
in interfaceModifiableModelAwareComposite
- Specified by:
getRepeater
in interfaceModifiableModelAwareDataHolder
- Parameters:
repeaterPath
- path of the repeater to retrievecreateNew
-true
to create the repeater if it does not exist,false
otherwise- Returns:
- the repeater or
null
if createNew isfalse
and value not exists or is empty - Throws:
IllegalArgumentException
- if the given repeater path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a repeaterBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getLocalRepeater
default ModifiableIndexableRepeater getLocalRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolder
Retrieves the local repeater at the given path- Specified by:
getLocalRepeater
in interfaceModifiableIndexableDataHolder
- Specified by:
getLocalRepeater
in interfaceModifiableModelAwareComposite
- Specified by:
getLocalRepeater
in interfaceModifiableModelAwareDataHolder
- Parameters:
repeaterPath
- path of the externalizable repeater to retrievecreateNew
-true
to create the repeater if it does not exist,false
otherwise- Returns:
- the repeater or
null
if createNew isfalse
and value not exists or is empty - Throws:
IllegalArgumentException
- if the given repeater path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a repeaterBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getExternalRepeater
default ModifiableIndexableRepeater getExternalRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolder
Retrieves the external repeater at the given path- Specified by:
getExternalRepeater
in interfaceModifiableIndexableDataHolder
- Specified by:
getExternalRepeater
in interfaceModifiableModelAwareComposite
- Specified by:
getExternalRepeater
in interfaceModifiableModelAwareDataHolder
- Parameters:
repeaterPath
- path of the externalizable repeater to retrievecreateNew
-true
to create the repeater if it does not exist,false
otherwise- Returns:
- the repeater or
null
if createNew isfalse
and value not exists or is empty - Throws:
IllegalArgumentException
- if the given repeater path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value at the given path is not a repeaterBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
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 interfaceModifiableModelAwareComposite
- Returns:
- the
DataHolder
-
getParentDataHolder
Description copied from interface:DataHolder
Retrieves the optional parent of the currentDataHolder
There can be no parent if the currentDataHolder
is the root- Specified by:
getParentDataHolder
in interfaceDataHolder
- Specified by:
getParentDataHolder
in interfaceIndexableComposite
- Specified by:
getParentDataHolder
in interfaceIndexableDataHolder
- Specified by:
getParentDataHolder
in interfaceModelAwareComposite
- Specified by:
getParentDataHolder
in interfaceModelAwareDataHolder
- Specified by:
getParentDataHolder
in interfaceModifiableDataHolder
- Specified by:
getParentDataHolder
in interfaceModifiableIndexableDataHolder
- Specified by:
getParentDataHolder
in interfaceModifiableModelAwareComposite
- Specified by:
getParentDataHolder
in interfaceModifiableModelAwareDataHolder
- Returns:
- the parent of the current
DataHolder
-
getRootDataHolder
Description copied from interface:DataHolder
Retrieves theDataHolder
that is the root of the current one- Specified by:
getRootDataHolder
in interfaceDataHolder
- Specified by:
getRootDataHolder
in interfaceIndexableComposite
- Specified by:
getRootDataHolder
in interfaceIndexableDataHolder
- Specified by:
getRootDataHolder
in interfaceModelAwareComposite
- Specified by:
getRootDataHolder
in interfaceModelAwareDataHolder
- Specified by:
getRootDataHolder
in interfaceModifiableDataHolder
- Specified by:
getRootDataHolder
in interfaceModifiableIndexableDataHolder
- Specified by:
getRootDataHolder
in interfaceModifiableModelAwareComposite
- Specified by:
getRootDataHolder
in interfaceModifiableModelAwareDataHolder
- Returns:
- the root
DataHolder
-