Package org.ametys.cms.data.holder
Interface IndexableDataHolder
- All Superinterfaces:
DataHolder,ModelAwareDataHolder
- All Known Subinterfaces:
CalendarEvent,CalendarResource,CommentableContent,Content,ContributorCommentableContent,IndexableAmetysObject,IndexableComposite,IndexableJCRAmetysObject,IndexableRepeaterEntry,ModifiableCalendarEvent,ModifiableContent,ModifiableIndexableAmetysObject,ModifiableIndexableComposite,ModifiableIndexableDataHolder,ModifiableIndexableRepeaterEntry,ModifiableWebContent,ModifiableWorkflowAwareContent,ProgramPart,SharedContent,Task,TasksList,Thread,TraversableProgramPart,WebContent,WorkflowAwareContent
- All Known Implementing Classes:
AbstractProgram,AbstractProgramPart,AbstractTraversableProgramPart,Cart,Catalog,Container,ContentBackupAmetysObject,ContentConsistencyResult,Course,CourseList,CoursePart,DefaultContent,DefaultIndexableAmetysObject,DefaultIndexableComposite,DefaultIndexableDataHolder,DefaultIndexableRepeaterEntry,DefaultIndexableTraversableAmetysObject,DefaultModifiableIndexableComposite,DefaultModifiableIndexableDataHolder,DefaultModifiableIndexableRepeaterEntry,DefaultSharedContent,DefaultTrashElement,DefaultWebContent,DefaultWorkflowAwareContent,Form,FormEntry,FormPageRule,FormQuestion,JCRCalendar,JCRCalendarEvent,JCRCalendarResource,JCRProjectMember,JCRTask,JCRTasksList,JCRThread,ModifiableContentDataHolder,ModifiableDefaultContent,ModifiableDefaultWebContent,OrgUnit,Person,Program,Query,SimpleIndexableAmetysObject,Site,SubProgram,TaskCalendarEvent
Interface for indexable data containers
-
Field Summary
Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, STATUS_SUFFIX -
Method Summary
Modifier and TypeMethodDescriptiongetComposite(String compositePath) Retrieves the composite at the given pathgetExternalComposite(String compositePath) Retrieves the external composite at the given pathgetExternalRepeater(String repeaterPath) Retrieves the external repeater at the given pathgetLocalComposite(String compositePath) Retrieves the local composite at the given pathgetLocalRepeater(String repeaterPath) Retrieves the local repeater at the given pathOptional<? extends IndexableDataHolder> Retrieves the optional parent of the currentDataHolderThere can be no parent if the currentDataHolderis the rootgetRepeater(String repeaterPath) Retrieves the repeater at the given pathRetrieves theDataHolderthat is the root of the current oneMethods inherited from interface org.ametys.plugins.repository.data.holder.DataHolder
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getRepositoryData, getValue, getValueOrDefault, hasValue, hasValueOrEmptyMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
dataToJSON, dataToJSON, dataToJSON, dataToJSON, dataToJSONForEdition, dataToMap, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, dataToSAX, dataToSAXForEdition, getDataNames, getDefinition, getDifferences, getDifferences, getDifferences, getDifferences, getExternalValue, getLocalValue, getModel, getModelItemTypeExtensionPoint, getStatus, getType, getValueOfType, getValueOfTypeOrDefault, getValueOrDefault, getValueWithMultiValuedPathSegments, hasDefinition, hasDifferences, hasDifferences, hasDifferences, hasDifferences, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, isMultiple, isMultiple
-
Method Details
-
getComposite
IndexableComposite getComposite(String compositePath) throws IllegalArgumentException, UnknownTypeException, BadItemTypeException, UndefinedItemPathException, BadDataPathCardinalityException Description copied from interface:DataHolderRetrieves the composite at the given path- Specified by:
getCompositein interfaceDataHolder- Specified by:
getCompositein interfaceModelAwareDataHolder- 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 emptyUnknownTypeException- if the type composite is not available for this data holderBadItemTypeException- if the stored value at the given path is not a compositeUndefinedItemPathException- if the data holder has a model and the given composite path is not defined by this modelBadDataPathCardinalityException- if the data holder has a model and the definition of a part of the data path is multiple. Only the last part can be multiple
-
getLocalComposite
IndexableComposite getLocalComposite(String compositePath) throws IllegalArgumentException, BadItemTypeException, UndefinedItemPathException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the local composite at the given path- Specified by:
getLocalCompositein interfaceModelAwareDataHolder- 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 emptyBadItemTypeException- if the stored value at the given path is not a compositeUndefinedItemPathException- if the given composite path is not defined by the modelBadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getExternalComposite
IndexableComposite getExternalComposite(String compositePath) throws IllegalArgumentException, BadItemTypeException, UndefinedItemPathException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the external composite at the given path- Specified by:
getExternalCompositein interfaceModelAwareDataHolder- 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 emptyBadItemTypeException- if the stored value at the given path is not a compositeUndefinedItemPathException- if the given composite path is not defined by the modelBadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getRepeater
IndexableRepeater getRepeater(String repeaterPath) throws IllegalArgumentException, BadItemTypeException, UndefinedItemPathException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the repeater at the given path- Specified by:
getRepeaterin interfaceModelAwareDataHolder- 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 emptyBadItemTypeException- if the stored value at the given path is not a repeaterUndefinedItemPathException- if the given repeater path is not defined by the modelBadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getLocalRepeater
IndexableRepeater getLocalRepeater(String repeaterPath) throws IllegalArgumentException, BadItemTypeException, UndefinedItemPathException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the local repeater at the given path- Specified by:
getLocalRepeaterin interfaceModelAwareDataHolder- 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 emptyBadItemTypeException- if the stored value at the given path is not a repeaterUndefinedItemPathException- if the given repeater path is not defined by the modelBadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getExternalRepeater
IndexableRepeater getExternalRepeater(String repeaterPath) throws IllegalArgumentException, BadItemTypeException, UndefinedItemPathException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the external repeater at the given path- Specified by:
getExternalRepeaterin interfaceModelAwareDataHolder- 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 emptyBadItemTypeException- if the stored value at the given path is not a repeaterUndefinedItemPathException- if the given repeater path is not defined by the modelBadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getParentDataHolder
Optional<? extends IndexableDataHolder> getParentDataHolder()Description copied from interface:DataHolderRetrieves the optional parent of the currentDataHolderThere can be no parent if the currentDataHolderis the root- Specified by:
getParentDataHolderin interfaceDataHolder- Specified by:
getParentDataHolderin interfaceModelAwareDataHolder- Returns:
- the parent of the current
DataHolder
-
getRootDataHolder
Description copied from interface:DataHolderRetrieves theDataHolderthat is the root of the current one- Specified by:
getRootDataHolderin interfaceDataHolder- Specified by:
getRootDataHolderin interfaceModelAwareDataHolder- Returns:
- the root
DataHolder
-