Interface ModifiableModelLessDataHolder
-
- All Superinterfaces:
DataHolder
,ModelLessDataHolder
,ModifiableDataHolder
- All Known Subinterfaces:
ModelLessJCRAmetysObject
,ModifiableModelLessDataAwareAmetysObject
,ModifiablePage
,ModifiableZone
,ModifiableZoneItem
- All Known Implementing Classes:
AbstractSurveyElement
,DefaultModifiableModelLessDataHolder
,DefaultPage
,DefaultZone
,DefaultZoneItem
,JCRProjectMember
,ModifiableModelLessComposite
,Project
,Sitemap
,Survey
,SurveyPage
,SurveyQuestion
public interface ModifiableModelLessDataHolder extends ModifiableDataHolder, ModelLessDataHolder
Interface for modifiable data containers without models
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ModifiableModelLessComposite
getComposite(String compositePath)
Retrieves the composite at the given pathModifiableModelLessComposite
getComposite(String compositePath, boolean createNew)
Retrieves the composite at the given pathvoid
removeValue(String dataPath)
Removes the stored value of the data at the given pathvoid
setValue(String dataPath, Object value)
Sets the value of the data at the given pathvoid
setValue(String dataPath, Object value, String dataTypeId)
Sets the value of the data at the given pathboolean
synchronizeValues(Map<String,Object> values)
Synchronizes the given values with the current ones-
Methods inherited from interface org.ametys.plugins.repository.data.holder.DataHolder
copyTo, dataToSAX, dataToSAX, getDataNames
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToSAX, dataToSAX, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, isMultiple
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryData
-
-
-
-
Method Detail
-
getComposite
ModifiableModelLessComposite getComposite(String compositePath) throws IllegalArgumentException, BadItemTypeException, BadDataPathCardinalityException
Description copied from interface:DataHolder
Retrieves the composite at the given path- Specified by:
getComposite
in interfaceDataHolder
- Specified by:
getComposite
in interfaceModelLessDataHolder
- Specified by:
getComposite
in interfaceModifiableDataHolder
- 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 compositeBadDataPathCardinalityException
- if the value of a part of the data path is multiple. Only the last part can be multiple
-
getComposite
ModifiableModelLessComposite getComposite(String compositePath, boolean createNew) throws IllegalArgumentException, BadItemTypeException, BadDataPathCardinalityException
Retrieves the composite at the given path- Specified by:
getComposite
in interfaceModifiableDataHolder
- 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:
BadDataPathCardinalityException
- if the value of a part of the data path is multiple. Only the last part can be multipleIllegalArgumentException
- if the given composite path is null or emptyBadItemTypeException
- if the stored value at the given path is not a composite
-
synchronizeValues
boolean synchronizeValues(Map<String,Object> values) throws UnknownTypeException, NotUniqueTypeException, IOException
Synchronizes the given values with the current ones- Parameters:
values
- the values to synchronize- Returns:
true
if some values have changed,false
otherwise- Throws:
IOException
- if an error occurs while synchronizing I/O dataUnknownTypeException
- 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 point
-
setValue
void setValue(String dataPath, Object value) throws IllegalArgumentException, UnknownTypeException, NotUniqueTypeException, UnknownDataException, BadDataPathCardinalityException
Sets the value of the data at the given path- Parameters:
dataPath
- path of the datavalue
- the value to set. To empty a value, usesetValue(String, Object, String)
with anull
value- 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
void setValue(String dataPath, Object value, String dataTypeId) throws IllegalArgumentException, UnknownTypeException, BadItemTypeException, UnknownDataException, BadDataPathCardinalityException
Sets the value of the data at the given path- Parameters:
dataPath
- path of the datavalue
- the value to set. Givenull
to empty the value.dataTypeId
- type identifier of the data- Throws:
IllegalArgumentException
- if the given data path is null or emptyUnknownTypeException
- if the given type is not available for this data holder's type extension pointBadItemTypeException
- 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
void removeValue(String dataPath) throws IllegalArgumentException, UnknownDataException, BadItemTypeException, BadDataPathCardinalityException
Removes the stored value of the data at the given path- Specified by:
removeValue
in interfaceModifiableDataHolder
- Parameters:
dataPath
- path of the data- Throws:
BadDataPathCardinalityException
- if the value of a part of the data path is multiple. Only the last part can be multipleIllegalArgumentException
- if the given data path is null or emptyUnknownDataException
- if the value at the given data path does not existBadItemTypeException
- if the value of the parent of the given path is not an item container
-
-