Package org.ametys.cms.data.ametysobject
Interface ModelAwareDataAwareAmetysObject
- All Superinterfaces:
AmetysObject,DataAwareAmetysObject,DataHolder,IndexableDataHolder,ModelAwareDataAwareAmetysObject,ModelAwareDataHolder
- All Known Subinterfaces:
CalendarResource,CommentableContent,Content,ContributorCommentableContent,ModelAwareJCRAmetysObject,ModifiableCalendar,ModifiableCalendarEvent,ModifiableContent,ModifiableModelAwareDataAwareAmetysObject,ModifiableWebContent,ModifiableWorkflowAwareContent,SharedContent,Task,TasksList,Thread,WebContent,WorkflowAwareContent
- All Known Implementing Classes:
AbstractProgram,AbstractProgramPart,AbstractTraversableProgramPart,Cart,Catalog,Container,ContentBackupAmetysObject,Course,CourseList,CoursePart,DefaultContent,DefaultSharedContent,DefaultWebContent,DefaultWorkflowAwareContent,Form,FormEntry,FormPageRule,FormQuestion,JCRCalendar,JCRCalendarEvent,JCRCalendarResource,JCRTask,JCRTasksList,JCRThread,ModifiableDefaultContent,ModifiableDefaultWebContent,OrgUnit,Person,Program,Query,Site,SubProgram
public interface ModelAwareDataAwareAmetysObject
extends ModelAwareDataAwareAmetysObject, IndexableDataHolder
Model aware
AmetysObject that can handle 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 IndexableCompositegetComposite(String compositePath) Retrieves the composite at the given pathReturns theDataHolderof thisAmetysObject.default IndexableCompositegetExternalComposite(String compositePath) Retrieves the external composite at the given pathdefault IndexableRepeatergetExternalRepeater(String repeaterPath) Retrieves the external repeater at the given pathdefault IndexableCompositegetLocalComposite(String compositePath) Retrieves the local composite at the given pathdefault IndexableRepeatergetLocalRepeater(String repeaterPath) Retrieves the local repeater at the given pathdefault Optional<? extends IndexableDataHolder>Retrieves the optional parent of the currentDataHolderThere can be no parent if the currentDataHolderis the rootdefault IndexableRepeatergetRepeater(String repeaterPath) Retrieves the repeater at the given pathdefault IndexableDataHolderRetrieves theDataHolderthat is the root of the current onedefault Optional<SystemPropertyExtensionPoint>Retrieves the system properties extension point of thisAmetysObject, or an emptyOptionalif this object does not support system propertiesdefault List<org.apache.solr.common.SolrInputDocument>indexData(org.apache.solr.common.SolrInputDocument document) Indexes all data and properties of thisAmetysObjectdefault List<org.apache.solr.common.SolrInputDocument>indexData(org.apache.solr.common.SolrInputDocument document, IndexableDataContext context) Indexes all data and properties of thisAmetysObjectMethods 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, dataToSAX, getRepositoryDataMethods 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, isMultiple
-
Method Details
-
getDataHolder
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelAwareDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-
getSystemPropertyExtensionPoint
Retrieves the system properties extension point of thisAmetysObject, or an emptyOptionalif this object does not support system properties- Returns:
- the system properties extension point of this
AmetysObject
-
indexData
default List<org.apache.solr.common.SolrInputDocument> indexData(org.apache.solr.common.SolrInputDocument document) throws BadItemTypeException Indexes all data and properties of thisAmetysObject- Parameters:
document- the solr document representing thisAmetysObject- Returns:
- additional solr documents that may have been created (ex: repeater entries)
- Throws:
BadItemTypeException- if the saxed value's type does not matches the stored data
-
indexData
default List<org.apache.solr.common.SolrInputDocument> indexData(org.apache.solr.common.SolrInputDocument document, IndexableDataContext context) throws BadItemTypeException Indexes all data and properties of thisAmetysObject- Parameters:
document- the solr document representing thisAmetysObjectcontext- The context of the data to index- Returns:
- additional solr documents that may have been created (ex: repeater entries)
- Throws:
BadItemTypeException- if the saxed value's type does not matches the stored data
-
getComposite
default IndexableComposite 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 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 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 IndexableComposite 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 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 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 IndexableComposite 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 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 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 IndexableRepeater 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 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 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 IndexableRepeater 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 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 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 IndexableRepeater 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 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 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
-
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 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 interfaceDataAwareAmetysObject- Specified by:
getRootDataHolderin interfaceDataHolder- Specified by:
getRootDataHolderin interfaceIndexableDataHolder- Specified by:
getRootDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getRootDataHolderin interfaceModelAwareDataHolder- Returns:
- the root
DataHolder
-