Interface ModifiableDataHolder
- All Superinterfaces:
DataHolder
- All Known Subinterfaces:
CalendarResource,CommentableContent,ModelAwareJCRAmetysObject,ModelAwareJCRAmetysObject,ModelLessJCRAmetysObject,ModifiableCalendar,ModifiableCalendarEvent,ModifiableComposite,ModifiableContent,ModifiableIndexableComposite,ModifiableIndexableDataHolder,ModifiableIndexableRepeaterEntry,ModifiableModelAwareComposite,ModifiableModelAwareDataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,ModifiableModelAwareDataHolder,ModifiableModelAwareRepeaterEntry,ModifiableModelLessComposite,ModifiableModelLessDataAwareAmetysObject,ModifiableModelLessDataHolder,ModifiablePage,ModifiableRepeaterEntry,ModifiableWebContent,ModifiableWorkflowAwareContent,ModifiableZone,ModifiableZoneItem,ProgramPart,SharedContent,Task,TasksList,TraversableProgramPart
- All Known Implementing Classes:
AbstractProgram,AbstractProgramPart,AbstractSitemapElement,AbstractSurveyElement,AbstractTraversableProgramPart,Activity,Cart,Catalog,CMISRootResourcesCollection,Container,ContentBackupAmetysObject,ContentConsistencyResult,ContentValue,Course,CourseList,CoursePart,DefaultLink,DefaultModifiableModelAwareComposite,DefaultModifiableModelAwareDataHolder,DefaultModifiableModelAwareRepeaterEntry,DefaultModifiableModelLessComposite,DefaultModifiableModelLessDataHolder,DefaultPage,DefaultSharedContent,DefaultZone,DefaultZoneItem,Form,FormEntry,FormPageRule,FormQuestion,JCRCalendar,JCRCalendarEvent,JCRCalendarResource,JCRProjectMember,JCRResourcesCollection,JCRTask,JCRTasksList,ModifiableContentDataHolder,ModifiableDefaultContent,ModifiableDefaultWebContent,OrgUnit,Person,Program,Project,Query,Site,Sitemap,SubProgram,Survey,SurveyPage,SurveyQuestion
Interface for modifiable data containers
-
Method Summary
Modifier and TypeMethodDescriptiongetComposite(String compositePath) Retrieves the composite at the given pathgetComposite(String compositePath, boolean createNew) Retrieves the composite at the given pathOptional<? extends ModifiableDataHolder>Retrieves the optional parent of the currentDataHolderThere can be no parent if the currentDataHolderis the rootRetrieves the repository data used by thisDataHolderRetrieves theDataHolderthat is the root of the current onevoidremoveValue(String dataPath) Removes the stored value of the data at the given pathMethods inherited from interface org.ametys.plugins.repository.data.holder.DataHolder
copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getDataNames, hasValue, hasValueOrEmpty
-
Method Details
-
getComposite
ModifiableComposite getComposite(String compositePath) throws IllegalArgumentException, BadItemTypeException Description copied from interface:DataHolderRetrieves the composite at the given path- Specified by:
getCompositein interfaceDataHolder- 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 emptyBadItemTypeException- if the stored value at the given path is not a composite
-
getComposite
ModifiableComposite getComposite(String compositePath, boolean createNew) throws IllegalArgumentException, BadItemTypeException Retrieves the composite at the given path- 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 emptyBadItemTypeException- if the stored value at the given path is not a composite
-
removeValue
Removes the stored value of the data at the given path- Parameters:
dataPath- path of the data- Throws:
IllegalArgumentException- if the given data path is null or emptyBadItemTypeException- if the value of the parent of the given path is not an item container
-
getRepositoryData
Description copied from interface:DataHolderRetrieves the repository data used by thisDataHolder- Specified by:
getRepositoryDatain interfaceDataHolder- Returns:
- the repository data used by this
DataHolder
-
getParentDataHolder
Optional<? extends ModifiableDataHolder> 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- 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- Returns:
- the root
DataHolder
-