Interface ModifiableDataHolder
-
- All Superinterfaces:
DataHolder
- All Known Subinterfaces:
CalendarResource
,CommentableContent
,ModelAwareJCRAmetysObject
,ModelLessJCRAmetysObject
,ModifiableCalendar
,ModifiableCalendarEvent
,ModifiableComposite
,ModifiableContent
,ModifiableModelAwareDataAwareAmetysObject
,ModifiableModelAwareDataHolder
,ModifiableModelLessDataAwareAmetysObject
,ModifiableModelLessDataHolder
,ModifiablePage
,ModifiableRepeaterEntry
,ModifiableWebContent
,ModifiableWorkflowAwareContent
,ModifiableZone
,ModifiableZoneItem
,ProgramPart
,Task
,TasksList
,TraversableProgramPart
- All Known Implementing Classes:
AbstractProgram
,AbstractProgramPart
,AbstractSurveyElement
,AbstractTraversableProgramPart
,Cart
,Catalog
,Container
,ContentBackupAmetysObject
,ContentValue
,Course
,CourseList
,CoursePart
,DefaultLink
,DefaultModifiableModelAwareDataHolder
,DefaultModifiableModelLessDataHolder
,DefaultPage
,DefaultZone
,DefaultZoneItem
,JCRCalendar
,JCRCalendarEvent
,JCRCalendarResource
,JCRProjectMember
,JCRTask
,JCRTasksList
,ModifiableContentDataHolder
,ModifiableDefaultContent
,ModifiableDefaultWebContent
,ModifiableModelAwareComposite
,ModifiableModelAwareRepeaterEntry
,ModifiableModelLessComposite
,OrgUnit
,Person
,Program
,Project
,Query
,Site
,Sitemap
,SubProgram
,Survey
,SurveyPage
,SurveyQuestion
public interface ModifiableDataHolder extends DataHolder
Interface for modifiable data containers
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ModifiableComposite
getComposite(String compositePath)
Retrieves the composite at the given pathModifiableComposite
getComposite(String compositePath, boolean createNew)
Retrieves the composite at the given pathOptional<? extends ModifiableDataHolder>
getParentDataHolder()
Retrieves the optional parent of the currentDataHolder
There can be no parent if the currentDataHolder
is the rootModifiableRepositoryData
getRepositoryData()
Retrieves the repository data used by thisDataHolder
ModifiableDataHolder
getRootDataHolder()
Retrieves theDataHolder
that is the root of the current onevoid
removeValue(String dataPath)
Removes the stored value of the data at the given path-
Methods inherited from interface org.ametys.plugins.repository.data.holder.DataHolder
copyTo, dataToSAX, dataToSAX, getDataNames, hasValue, hasValueOrEmpty
-
-
-
-
Method Detail
-
getComposite
ModifiableComposite getComposite(String compositePath) throws IllegalArgumentException, BadItemTypeException
Description copied from interface:DataHolder
Retrieves the composite at the given path- Specified by:
getComposite
in interfaceDataHolder
- 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 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
-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 emptyBadItemTypeException
- if the stored value at the given path is not a composite
-
removeValue
void removeValue(String dataPath) throws IllegalArgumentException, BadItemTypeException
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
ModifiableRepositoryData getRepositoryData()
Description copied from interface:DataHolder
Retrieves the repository data used by thisDataHolder
- Specified by:
getRepositoryData
in interfaceDataHolder
- Returns:
- the repository data used by this
DataHolder
-
getParentDataHolder
Optional<? extends ModifiableDataHolder> 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
- Returns:
- the parent of the current
DataHolder
-
getRootDataHolder
ModifiableDataHolder getRootDataHolder()
Description copied from interface:DataHolder
Retrieves theDataHolder
that is the root of the current one- Specified by:
getRootDataHolder
in interfaceDataHolder
- Returns:
- the root
DataHolder
-
-