Interface ModifiableModelLessDataAwareAmetysObject
-
- All Superinterfaces:
AmetysObject,DataAwareAmetysObject,DataHolder,ModelLessDataAwareAmetysObject,ModelLessDataHolder,ModifiableDataHolder,ModifiableModelLessDataHolder
- All Known Subinterfaces:
ModelLessJCRAmetysObject,ModifiablePage,ModifiableZone,ModifiableZoneItem
- All Known Implementing Classes:
AbstractSurveyElement,DefaultPage,DefaultZone,DefaultZoneItem,JCRProjectMember,Project,Sitemap,Survey,SurveyPage,SurveyQuestion
public interface ModifiableModelLessDataAwareAmetysObject extends ModifiableModelLessDataHolder, ModelLessDataAwareAmetysObject
Model lessAmetysObjectthat can handle modifiable data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ModifiableModelLessCompositegetComposite(String compositePath)Retrieves the composite at the given pathdefault ModifiableModelLessCompositegetComposite(String compositePath, boolean createNew)Retrieves the composite at the given pathModifiableModelLessDataHoldergetDataHolder()Returns theDataHolderof thisAmetysObject.default ModifiableRepositoryDatagetRepositoryData()Retrieves the repository data used by thisDataHolderdefault voidremoveValue(String dataPath)Removes the stored value of the data at the given pathdefault voidsetValue(String dataPath, Object value)Sets the value of the data at the given pathdefault voidsetValue(String dataPath, Object value, String dataType)Sets the value of the data at the given pathdefault booleansynchronizeValues(Map<String,Object> values)Synchronizes the given values with the current ones-
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, dataToSAX, getDataNames
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.DataHolder
dataToSAX
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToSAX, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, isMultiple
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToSAX, hasValue
-
-
-
-
Method Detail
-
getDataHolder
ModifiableModelLessDataHolder getDataHolder()
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelLessDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-
getComposite
default ModifiableModelLessComposite getComposite(String compositePath) throws IllegalArgumentException, BadItemTypeException, BadDataPathCardinalityException
Description copied from interface:DataHolderRetrieves the composite at the given path- Specified by:
getCompositein interfaceDataHolder- Specified by:
getCompositein interfaceModelLessDataAwareAmetysObject- Specified by:
getCompositein interfaceModelLessDataHolder- Specified by:
getCompositein interfaceModifiableDataHolder- Specified by:
getCompositein interfaceModifiableModelLessDataHolder- 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 compositeBadDataPathCardinalityException- if the value of a part of the data path is multiple. Only the last part can be multiple
-
getComposite
default ModifiableModelLessComposite getComposite(String compositePath, boolean createNew) throws IllegalArgumentException, BadItemTypeException, BadDataPathCardinalityException
Description copied from interface:ModifiableModelLessDataHolderRetrieves the composite at the given path- Specified by:
getCompositein interfaceModifiableDataHolder- Specified by:
getCompositein interfaceModifiableModelLessDataHolder- 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 compositeBadDataPathCardinalityException- if the value of a part of the data path is multiple. Only the last part can be multiple
-
synchronizeValues
default boolean synchronizeValues(Map<String,Object> values) throws UnknownTypeException, NotUniqueTypeException, IOException
Description copied from interface:ModifiableModelLessDataHolderSynchronizes the given values with the current ones- Specified by:
synchronizeValuesin interfaceModifiableModelLessDataHolder- Parameters:
values- the values to synchronize- Returns:
trueif some values have changed,falseotherwise- Throws:
UnknownTypeException- if there is no available type compatible with a given value for this data holder's type extension pointNotUniqueTypeException- if there is more than one available types compatibles with the a value for this data holder's type extension pointIOException- if an error occurs while synchronizing I/O data
-
setValue
default void setValue(String dataPath, Object value) throws IllegalArgumentException, UnknownTypeException, NotUniqueTypeException, UnknownDataException, BadDataPathCardinalityException
Description copied from interface:ModifiableModelLessDataHolderSets the value of the data at the given path- Specified by:
setValuein interfaceModifiableModelLessDataHolder- Parameters:
dataPath- path of the datavalue- the value to set. To empty a value, useModifiableModelLessDataHolder.setValue(String, Object, String)with anullvalue- Throws:
IllegalArgumentException- if the given data path is null or emptyUnknownTypeException- if there is no available type compatible with the given value for this data holder's type extension pointNotUniqueTypeException- if there is more than one available types compatibles with the given value for this data holder's type extension pointUnknownDataException- if given the data path is composed of an inexisting groupBadDataPathCardinalityException- if the value of a part of the data path is multiple. Only the last part can be multiple
-
setValue
default void setValue(String dataPath, Object value, String dataType) throws IllegalArgumentException, BadItemTypeException, UnknownDataException, BadDataPathCardinalityException
Description copied from interface:ModifiableModelLessDataHolderSets the value of the data at the given path- Specified by:
setValuein interfaceModifiableModelLessDataHolder- Parameters:
dataPath- path of the datavalue- the value to set. Givenullto empty the value.dataType- type identifier of the data- Throws:
IllegalArgumentException- if the given data path is null or emptyBadItemTypeException- if the given type doesn't match the given value to setUnknownDataException- if the given data path is composed of an inexisting groupBadDataPathCardinalityException- if the value of a part of the data path is multiple. Only the last part can be multiple
-
removeValue
default void removeValue(String dataPath) throws IllegalArgumentException, UnknownTypeException, BadItemTypeException, BadDataPathCardinalityException
Description copied from interface:ModifiableModelLessDataHolderRemoves the stored value of the data at the given path- Specified by:
removeValuein interfaceModifiableDataHolder- Specified by:
removeValuein interfaceModifiableModelLessDataHolder- 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 containerBadDataPathCardinalityException- if the value of a part of the data path is multiple. Only the last part can be multipleUnknownTypeException
-
getRepositoryData
default ModifiableRepositoryData getRepositoryData()
Description copied from interface:DataHolderRetrieves the repository data used by thisDataHolder- Specified by:
getRepositoryDatain interfaceDataAwareAmetysObject- Specified by:
getRepositoryDatain interfaceDataHolder- Specified by:
getRepositoryDatain interfaceModifiableDataHolder- Returns:
- the repository data used by this
DataHolder
-
-