public class DefaultModifiableModelLessDataHolder extends DefaultModelLessDataHolder implements ModifiableModelLessDataHolder
Modifier and Type | Field and Description |
---|---|
protected ModifiableRepositoryData |
_modifiableRepositoryData
Repository data to use to store data in the repository
|
_repositoryData, _typeExtensionPoint
Constructor and Description |
---|
DefaultModifiableModelLessDataHolder(AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> typeExtensionPoint,
ModifiableRepositoryData repositoryData)
Creates a modifiable default model free data holder
|
Modifier and Type | Method and Description |
---|---|
protected ModelLessComposite |
_getComposite(String name)
Retrieves the composite with the given name
|
protected ModifiableModelLessComposite |
_getComposite(String name,
boolean createNew)
Retrieves the composite with the given name
|
protected ModifiableModelLessDataHolder |
_getParentValue(String dataPath)
Retrieves the data holder, last parent segment of the given data path
Example : call this method with a path like 'my-composite/my-repeater[1]/my-data' will retrieve the first repeater entry of the repeater 'my-repeater' in the composite 'my-composite'
|
protected ModelLessRepeater |
_getRepeater(String name)
Retrieves the repeater with the given name
|
protected ModifiableModelLessRepeater |
_getRepeater(String name,
boolean createNew)
Retrieves the repeater with the given name
|
ModifiableModelLessComposite |
getComposite(String compositePath)
Retrieves the composite at the given path
|
ModifiableModelLessComposite |
getComposite(String compositePath,
boolean createNew)
Retrieves the composite at the given path
|
ModifiableModelLessRepeater |
getRepeater(String repeaterPath)
Retrieves the repeater at the given path
|
ModifiableModelLessRepeater |
getRepeater(String repeaterPath,
boolean createNew)
Retrieves the repeater at the given path
|
void |
removeValue(String dataPath)
Removes the value of the data stored in the repository at the given path
|
void |
setValue(String dataPath,
Object value)
Sets the value of the data at the given path
|
void |
setValue(String dataPath,
Object value,
String dataTypeId)
Sets the value of the data at the given path
|
getDataNames, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, isMultiple
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, isMultiple, toSAX, toSAX
copyTo, dataToSAX, dataToSAX, dataToSAX, dataToSAX, getDataNames
protected ModifiableRepositoryData _modifiableRepositoryData
public DefaultModifiableModelLessDataHolder(AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> typeExtensionPoint, ModifiableRepositoryData repositoryData)
typeExtensionPoint
- the extension point to use to get available element typesrepositoryData
- the repository data to usepublic ModifiableModelLessComposite getComposite(String compositePath) throws IllegalArgumentException, BadItemTypeException
ModelLessDataHolder
getComposite
in interface DataHolder
getComposite
in interface ModelLessDataHolder
getComposite
in interface ModifiableDataHolder
getComposite
in interface ModifiableModelLessDataHolder
getComposite
in class DefaultModelLessDataHolder
compositePath
- path of the composite to retrievenull
if not existsIllegalArgumentException
- if the given composite path is null or emptyBadItemTypeException
- if the value stored in the repository at the given path is not a compositeprotected ModelLessComposite _getComposite(String name) throws BadItemTypeException
DefaultModelLessDataHolder
_getComposite
in class DefaultModelLessDataHolder
name
- name of the composite to retrieveBadItemTypeException
- if the value stored in the repository with the given name is not a compositepublic ModifiableModelLessRepeater getRepeater(String repeaterPath) throws IllegalArgumentException, BadItemTypeException
ModelLessDataHolder
getRepeater
in interface DataHolder
getRepeater
in interface ModelLessDataHolder
getRepeater
in interface ModifiableDataHolder
getRepeater
in interface ModifiableModelLessDataHolder
getRepeater
in class DefaultModelLessDataHolder
repeaterPath
- path of the repeater to retrievenull
if not existsIllegalArgumentException
- if the given repeater path is null or emptyBadItemTypeException
- if the value stored in the repository at the given path is not a repeaterprotected ModelLessRepeater _getRepeater(String name) throws BadItemTypeException
DefaultModelLessDataHolder
_getRepeater
in class DefaultModelLessDataHolder
name
- name of the repeater to retrieveBadItemTypeException
- if the value stored in the repository with the given name is not a repeaterpublic ModifiableModelLessComposite getComposite(String compositePath, boolean createNew) throws IllegalArgumentException, BadItemTypeException
ModifiableModelLessDataHolder
getComposite
in interface ModifiableDataHolder
getComposite
in interface ModifiableModelLessDataHolder
compositePath
- path of the composite to retrievecreateNew
- true
to create the composite if it does not exist, false
otherwiseIllegalArgumentException
- if the given composite path is null or emptyBadItemTypeException
- if the value stored in the repository at the given path is not a compositeprotected ModifiableModelLessComposite _getComposite(String name, boolean createNew) throws BadItemTypeException
name
- name of the composite to retrievecreateNew
- true
to create the repeater if it does not exist, false
otherwiseBadItemTypeException
- if the value stored in the repository with the given name is not a compositepublic ModifiableModelLessRepeater getRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, BadItemTypeException
ModifiableModelLessDataHolder
getRepeater
in interface ModifiableDataHolder
getRepeater
in interface ModifiableModelLessDataHolder
repeaterPath
- path of the repeater to retrievecreateNew
- true
to create the repeater if it does not exist, false
otherwiseIllegalArgumentException
- if the given repeater path is null or emptyBadItemTypeException
- if the value stored in the repository at the given path is not a repeaterprotected ModifiableModelLessRepeater _getRepeater(String name, boolean createNew) throws BadItemTypeException
name
- name of the repeater to retrievecreateNew
- true
to create the repeater if it does not exist, false
otherwiseBadItemTypeException
- if the value stored in the repository with the given name is not a repeaterpublic void setValue(String dataPath, Object value) throws IllegalArgumentException, UnknownTypeException, NotUniqueTypeException, UnknownDataException
ModifiableModelLessDataHolder
setValue
in interface ModifiableModelLessDataHolder
dataPath
- path of the datavalue
- the value to setIllegalArgumentException
- 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 grouppublic void setValue(String dataPath, Object value, String dataTypeId) throws IllegalArgumentException, BadItemTypeException, UnknownDataException
ModifiableModelLessDataHolder
setValue
in interface ModifiableModelLessDataHolder
dataPath
- path of the datavalue
- the value to setdataTypeId
- type identifier of the dataIllegalArgumentException
- 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 grouppublic void removeValue(String dataPath) throws IllegalArgumentException, UnknownDataException
ModifiableModelLessDataHolder
removeValue
in interface ModifiableDataHolder
removeValue
in interface ModifiableModelLessDataHolder
dataPath
- path of the dataIllegalArgumentException
- if the given data path is null or emptyUnknownDataException
- if the value at the given data path does not existprotected ModifiableModelLessDataHolder _getParentValue(String dataPath)
DefaultModelLessDataHolder
_getParentValue
in class DefaultModelLessDataHolder
dataPath
- the data path