public interface ModifiableModelAwareDataAwareAmetysObject extends ModelAwareDataAwareAmetysObject, ModifiableModelAwareDataHolder
AmetysObject
that can handle modifiable data.Modifier and Type | Method and Description |
---|---|
default ModifiableModelAwareComposite |
getComposite(String compositePath)
Retrieves the composite at the given path
|
default ModifiableModelAwareComposite |
getComposite(String compositePath,
boolean createNew)
Retrieves the composite at the given path
|
ModifiableModelAwareDataHolder |
getDataHolder()
Returns the
DataHolder of this AmetysObject . |
default ModifiableModelAwareRepeater |
getRepeater(String repeaterPath)
Retrieves the repeater at the given path
|
default ModifiableModelAwareRepeater |
getRepeater(String repeaterPath,
boolean createNew)
Retrieves the repeater at the given path
|
default void |
removeValue(String dataPath)
Removes the value of the data stored in the repository at the given path
|
default void |
setValue(String dataPath,
Object value)
Sets the value of the data at the given path
|
getType, getValue, getValue, hasValue, isMultiple
copyTo, getDataNames
equals, getId, getName, getParent, getParentPath, getPath, hashCode
toSAX, toSAX
dataToSAX, dataToSAX, dataToSAX, dataToSAX
ModifiableModelAwareDataHolder getDataHolder()
DataAwareAmetysObject
DataHolder
of this AmetysObject
.getDataHolder
in interface DataAwareAmetysObject
getDataHolder
in interface ModelAwareDataAwareAmetysObject
DataHolder
of this AmetysObject
default ModifiableModelAwareComposite getComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
DataHolder
getComposite
in interface DataHolder
getComposite
in interface ModelAwareDataAwareAmetysObject
getComposite
in interface ModelAwareDataHolder
getComposite
in interface ModifiableDataHolder
getComposite
in interface ModifiableModelAwareDataHolder
compositePath
- path of the composite to retrievenull
if not existsIllegalArgumentException
- if the given composite path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the value stored in the repository at the given path is not a compositeBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multipledefault ModifiableModelAwareRepeater getRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
DataHolder
getRepeater
in interface DataHolder
getRepeater
in interface ModelAwareDataAwareAmetysObject
getRepeater
in interface ModelAwareDataHolder
getRepeater
in interface ModifiableDataHolder
getRepeater
in interface ModifiableModelAwareDataHolder
repeaterPath
- path of the repeater to retrievenull
if not existsIllegalArgumentException
- if the given repeater path is null or emptyUndefinedItemPathException
- if the given repeater path is not defined by the modelBadItemTypeException
- if the value stored in the repository at the given path is not a repeaterBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multipledefault ModifiableModelAwareComposite getComposite(String compositePath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModifiableModelAwareDataHolder
getComposite
in interface ModifiableDataHolder
getComposite
in interface ModifiableModelAwareDataHolder
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 emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the value stored in the repository at the given path is not a compositeBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multipledefault ModifiableModelAwareRepeater getRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModifiableModelAwareDataHolder
getRepeater
in interface ModifiableDataHolder
getRepeater
in interface ModifiableModelAwareDataHolder
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 emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the value stored in the repository at the given path is not a repeaterBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multipledefault void removeValue(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModifiableModelAwareDataHolder
removeValue
in interface ModifiableDataHolder
removeValue
in interface ModifiableModelAwareDataHolder
dataPath
- path of the dataIllegalArgumentException
- if the given data path is null or emptyUndefinedItemPathException
- if the given data path is not defined by the modelBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multipleBadItemTypeException
default void setValue(String dataPath, Object value) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModifiableModelAwareDataHolder
setValue
in interface ModifiableModelAwareDataHolder
dataPath
- path of the datavalue
- the value to set. The type of this value will be given by the model, but if not model is associated to the path, an UnsupportedOperationException
is thrown. Use the 3 arguments versions in that case.IllegalArgumentException
- if the given data path is null or emptyUndefinedItemPathException
- if the given data path is not defined by the modelBadItemTypeException
- if the type defined by the model doesn't match the given value to setBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple