Package org.ametys.cms.data.ametysobject
Interface ModifiableModelAwareDataAwareAmetysObject
- All Superinterfaces:
AmetysObject,DataAwareAmetysObject,DataHolder,IndexableDataHolder,ModelAwareDataAwareAmetysObject,ModelAwareDataAwareAmetysObject,ModelAwareDataHolder,ModifiableAmetysObject,ModifiableDataHolder,ModifiableIndexableDataHolder,ModifiableModelAwareDataAwareAmetysObject,ModifiableModelAwareDataHolder
- All Known Subinterfaces:
CalendarResource,CommentableContent,ContributorCommentableContent,ModelAwareJCRAmetysObject,ModifiableCalendar,ModifiableCalendarEvent,ModifiableContent,ModifiableWebContent,ModifiableWorkflowAwareContent,SharedContent,Task,TasksList,Thread
- All Known Implementing Classes:
AbstractProgram,AbstractProgramPart,AbstractTraversableProgramPart,Cart,Catalog,Container,ContentBackupAmetysObject,Course,CourseList,CoursePart,DefaultSharedContent,Form,FormEntry,FormPageRule,FormQuestion,JCRCalendar,JCRCalendarEvent,JCRCalendarResource,JCRTask,JCRTasksList,JCRThread,ModifiableDefaultContent,ModifiableDefaultWebContent,OrgUnit,Person,Program,Query,Site,SubProgram
public interface ModifiableModelAwareDataAwareAmetysObject
extends ModifiableModelAwareDataAwareAmetysObject, ModelAwareDataAwareAmetysObject, ModifiableIndexableDataHolder
Model aware
AmetysObject that can handle modifiable indexable data.-
Field Summary
Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX -
Method Summary
Modifier and TypeMethodDescriptiondefault ModifiableIndexableCompositegetComposite(String compositePath) Retrieves the composite at the given pathdefault ModifiableIndexableCompositegetComposite(String compositePath, boolean createNew) Retrieves the composite at the given pathReturns theDataHolderof thisAmetysObject.default ModifiableIndexableCompositegetExternalComposite(String compositePath) Retrieves the external composite at the given pathdefault ModifiableIndexableCompositegetExternalComposite(String compositePath, boolean createNew) Retrieves the external composite at the given pathdefault ModifiableIndexableRepeatergetExternalRepeater(String repeaterPath) Retrieves the external repeater at the given pathdefault ModifiableIndexableRepeatergetExternalRepeater(String repeaterPath, boolean createNew) Retrieves the external repeater at the given pathdefault ModifiableIndexableCompositegetLocalComposite(String compositePath) Retrieves the local composite at the given pathdefault ModifiableIndexableCompositegetLocalComposite(String compositePath, boolean createNew) Retrieves the local composite at the given pathdefault ModifiableIndexableRepeatergetLocalRepeater(String repeaterPath) Retrieves the local repeater at the given pathdefault ModifiableIndexableRepeatergetLocalRepeater(String repeaterPath, boolean createNew) Retrieves the local repeater at the given pathdefault Optional<? extends ModifiableIndexableDataHolder>Retrieves the optional parent of the currentDataHolderThere can be no parent if the currentDataHolderis the rootdefault ModifiableIndexableRepeatergetRepeater(String repeaterPath) Retrieves the repeater at the given pathdefault ModifiableIndexableRepeatergetRepeater(String repeaterPath, boolean createNew) Retrieves the repeater at the given pathdefault ModifiableIndexableDataHolderRetrieves theDataHolderthat is the root of the current oneMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAXMethods inherited from interface org.ametys.cms.data.ametysobject.ModelAwareDataAwareAmetysObject
getSystemPropertyExtensionPoint, indexData, indexDataMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelAwareDataAwareAmetysObject
dataToJSON, dataToJSONForEdition, dataToMap, dataToSAX, dataToSAXForEdition, getComments, getDataNames, getDefinition, getDifferences, getDifferences, getDifferences, getDifferences, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasComments, hasDefinition, hasDifferences, hasDifferences, hasDifferences, hasDifferences, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValueOrEmptyMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
commentsToSAX, dataToJSON, dataToJSON, dataToJSON, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, getDataNames, getType, getValue, hasValue, hasValueOrEmpty, isMultipleMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryDataMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getRepositoryData, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setComments, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValues
-
Method Details
-
getDataHolder
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelAwareDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-
getComposite
default ModifiableIndexableComposite getComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:DataHolderRetrieves the composite at the given path- Specified by:
getCompositein interfaceDataAwareAmetysObject- Specified by:
getCompositein interfaceDataHolder- Specified by:
getCompositein interfaceIndexableDataHolder- Specified by:
getCompositein interfaceModelAwareDataAwareAmetysObject- Specified by:
getCompositein interfaceModelAwareDataAwareAmetysObject- Specified by:
getCompositein interfaceModelAwareDataHolder- Specified by:
getCompositein interfaceModifiableDataHolder- Specified by:
getCompositein interfaceModifiableIndexableDataHolder- Specified by:
getCompositein interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getCompositein interfaceModifiableModelAwareDataHolder- Parameters:
compositePath- path of the composite to retrieve- Returns:
- the composite or
nullif 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
-
getComposite
default ModifiableIndexableComposite getComposite(String compositePath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRetrieves the composite at the given path- Specified by:
getCompositein interfaceModifiableDataHolder- Specified by:
getCompositein interfaceModifiableIndexableDataHolder- Specified by:
getCompositein interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getCompositein interfaceModifiableModelAwareDataHolder- Parameters:
compositePath- path of the composite to retrievecreateNew-trueto create the composite if it does not exist,falseotherwise- Returns:
- the composite or
nullif createNew isfalseand 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) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the local composite at the given path- Specified by:
getLocalCompositein interfaceIndexableDataHolder- Specified by:
getLocalCompositein interfaceModelAwareDataAwareAmetysObject- Specified by:
getLocalCompositein interfaceModelAwareDataAwareAmetysObject- Specified by:
getLocalCompositein interfaceModelAwareDataHolder- Specified by:
getLocalCompositein interfaceModifiableIndexableDataHolder- Specified by:
getLocalCompositein interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getLocalCompositein interfaceModifiableModelAwareDataHolder- Parameters:
compositePath- path of the externalizable composite to retrieve- Returns:
- the composite or
nullif 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:ModifiableModelAwareDataHolderRetrieves the local composite at the given path- Specified by:
getLocalCompositein interfaceModifiableIndexableDataHolder- Specified by:
getLocalCompositein interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getLocalCompositein interfaceModifiableModelAwareDataHolder- Parameters:
compositePath- path of the externalizable composite to retrievecreateNew-trueto create the composite if it does not exist,falseotherwise- Returns:
- the composite or
nullif createNew isfalseand 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) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the external composite at the given path- Specified by:
getExternalCompositein interfaceIndexableDataHolder- Specified by:
getExternalCompositein interfaceModelAwareDataAwareAmetysObject- Specified by:
getExternalCompositein interfaceModelAwareDataAwareAmetysObject- Specified by:
getExternalCompositein interfaceModelAwareDataHolder- Specified by:
getExternalCompositein interfaceModifiableIndexableDataHolder- Specified by:
getExternalCompositein interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getExternalCompositein interfaceModifiableModelAwareDataHolder- Parameters:
compositePath- path of the externalizable composite to retrieve- Returns:
- the composite or
nullif 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:ModifiableModelAwareDataHolderRetrieves the external composite at the given path- Specified by:
getExternalCompositein interfaceModifiableIndexableDataHolder- Specified by:
getExternalCompositein interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getExternalCompositein interfaceModifiableModelAwareDataHolder- Parameters:
compositePath- path of the externalizable composite to retrievecreateNew-trueto create the composite if it does not exist,falseotherwise- Returns:
- the composite or
nullif createNew isfalseand 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) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the repeater at the given path- Specified by:
getRepeaterin interfaceIndexableDataHolder- Specified by:
getRepeaterin interfaceModelAwareDataAwareAmetysObject- Specified by:
getRepeaterin interfaceModelAwareDataAwareAmetysObject- Specified by:
getRepeaterin interfaceModelAwareDataHolder- Specified by:
getRepeaterin interfaceModifiableIndexableDataHolder- Specified by:
getRepeaterin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getRepeaterin interfaceModifiableModelAwareDataHolder- Parameters:
repeaterPath- path of the repeater to retrieve- Returns:
- the repeater or
nullif 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
-
getRepeater
default ModifiableIndexableRepeater getRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRetrieves the repeater at the given path- Specified by:
getRepeaterin interfaceModifiableIndexableDataHolder- Specified by:
getRepeaterin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getRepeaterin interfaceModifiableModelAwareDataHolder- Parameters:
repeaterPath- path of the repeater to retrievecreateNew-trueto create the repeater if it does not exist,falseotherwise- Returns:
- the repeater or
nullif createNew isfalseand 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) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the local repeater at the given path- Specified by:
getLocalRepeaterin interfaceIndexableDataHolder- Specified by:
getLocalRepeaterin interfaceModelAwareDataAwareAmetysObject- Specified by:
getLocalRepeaterin interfaceModelAwareDataAwareAmetysObject- Specified by:
getLocalRepeaterin interfaceModelAwareDataHolder- Specified by:
getLocalRepeaterin interfaceModifiableIndexableDataHolder- Specified by:
getLocalRepeaterin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getLocalRepeaterin interfaceModifiableModelAwareDataHolder- Parameters:
repeaterPath- path of the externalizable repeater to retrieve- Returns:
- the repeater or
nullif 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, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRetrieves the local repeater at the given path- Specified by:
getLocalRepeaterin interfaceModifiableIndexableDataHolder- Specified by:
getLocalRepeaterin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getLocalRepeaterin interfaceModifiableModelAwareDataHolder- Parameters:
repeaterPath- path of the externalizable repeater to retrievecreateNew-trueto create the repeater if it does not exist,falseotherwise- Returns:
- the repeater or
nullif createNew isfalseand 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) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the external repeater at the given path- Specified by:
getExternalRepeaterin interfaceIndexableDataHolder- Specified by:
getExternalRepeaterin interfaceModelAwareDataAwareAmetysObject- Specified by:
getExternalRepeaterin interfaceModelAwareDataAwareAmetysObject- Specified by:
getExternalRepeaterin interfaceModelAwareDataHolder- Specified by:
getExternalRepeaterin interfaceModifiableIndexableDataHolder- Specified by:
getExternalRepeaterin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getExternalRepeaterin interfaceModifiableModelAwareDataHolder- Parameters:
repeaterPath- path of the externalizable repeater to retrieve- Returns:
- the repeater or
nullif 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, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRetrieves the external repeater at the given path- Specified by:
getExternalRepeaterin interfaceModifiableIndexableDataHolder- Specified by:
getExternalRepeaterin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getExternalRepeaterin interfaceModifiableModelAwareDataHolder- Parameters:
repeaterPath- path of the externalizable repeater to retrievecreateNew-trueto create the repeater if it does not exist,falseotherwise- Returns:
- the repeater or
nullif createNew isfalseand 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
-
getParentDataHolder
Description copied from interface:DataHolderRetrieves the optional parent of the currentDataHolderThere can be no parent if the currentDataHolderis the root- Specified by:
getParentDataHolderin interfaceDataAwareAmetysObject- Specified by:
getParentDataHolderin interfaceDataHolder- Specified by:
getParentDataHolderin interfaceIndexableDataHolder- Specified by:
getParentDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getParentDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getParentDataHolderin interfaceModelAwareDataHolder- Specified by:
getParentDataHolderin interfaceModifiableDataHolder- Specified by:
getParentDataHolderin interfaceModifiableIndexableDataHolder- Specified by:
getParentDataHolderin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getParentDataHolderin interfaceModifiableModelAwareDataHolder- Returns:
- the parent of the current
DataHolder
-
getRootDataHolder
Description copied from interface:DataHolderRetrieves theDataHolderthat is the root of the current one- Specified by:
getRootDataHolderin interfaceDataAwareAmetysObject- Specified by:
getRootDataHolderin interfaceDataHolder- Specified by:
getRootDataHolderin interfaceIndexableDataHolder- Specified by:
getRootDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getRootDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getRootDataHolderin interfaceModelAwareDataHolder- Specified by:
getRootDataHolderin interfaceModifiableDataHolder- Specified by:
getRootDataHolderin interfaceModifiableIndexableDataHolder- Specified by:
getRootDataHolderin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getRootDataHolderin interfaceModifiableModelAwareDataHolder- Returns:
- the root
DataHolder
-