public class DefaultModifiableModelAwareDataHolder extends DefaultModelAwareDataHolder implements ModifiableModelAwareDataHolder
| Modifier and Type | Field and Description |
|---|---|
protected ModifiableRepositoryData |
_modifiableRepositoryData
Repository data to use to store data in the repository
|
_itemContainers, _repositoryData| Constructor and Description |
|---|
DefaultModifiableModelAwareDataHolder(ModifiableRepositoryData repositoryData,
Collection<? extends ModelItemContainer> itemContainers)
Creates a modifiable default model aware data holder
|
DefaultModifiableModelAwareDataHolder(ModifiableRepositoryData repositoryData,
ModelItemContainer... itemContainers)
Creates a modifiable default model aware data holder
|
| Modifier and Type | Method and Description |
|---|---|
protected ModifiableModelAwareComposite |
_getComposite(String name,
CompositeDefinition compositeDefinition)
Retrieves the composite with the given name
|
protected ModifiableModelAwareComposite |
_getComposite(String name,
CompositeDefinition compositeDefinition,
boolean createNew)
Retrieves the composite with the given name
|
protected ModifiableModelAwareRepeater |
_getRepeater(String name,
RepeaterDefinition repeaterDefinition)
Retrieves the repeater with the given name
|
protected ModifiableModelAwareRepeater |
_getRepeater(String name,
RepeaterDefinition repeaterDefinition,
boolean createNew)
Retrieves the repeater with the given name
|
ModifiableModelAwareComposite |
getComposite(String compositePath)
Retrieves the composite at the given path
|
ModifiableModelAwareComposite |
getComposite(String compositePath,
boolean createNew)
Retrieves the composite at the given path
|
ModifiableModelAwareRepeater |
getRepeater(String repeaterPath)
Retrieves the repeater at the given path
|
ModifiableModelAwareRepeater |
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
|
getDataNames, getType, getValue, getValue, hasValue, isMultipleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetType, getValue, getValue, hasValue, isMultiple, toSAX, toSAXcopyTo, dataToSAX, dataToSAX, dataToSAX, dataToSAX, getDataNamesprotected ModifiableRepositoryData _modifiableRepositoryData
public DefaultModifiableModelAwareDataHolder(ModifiableRepositoryData repositoryData, ModelItemContainer... itemContainers)
repositoryData - the repository data to useitemContainers - the model containers to use to get information about definitions. Must match the given repository data. A repository data can have several item containers. For example, a content can have several content types.public DefaultModifiableModelAwareDataHolder(ModifiableRepositoryData repositoryData, Collection<? extends ModelItemContainer> itemContainers)
repositoryData - the repository data to useitemContainers - the model containers to use to get information about definitions. Must match the given repository data. A repository data can have several item containers. For example, a content can have several content types.public ModifiableModelAwareComposite getComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModelAwareDataHoldergetComposite in interface DataHoldergetComposite in interface ModelAwareDataHoldergetComposite in interface ModifiableDataHoldergetComposite in interface ModifiableModelAwareDataHoldergetComposite in class DefaultModelAwareDataHoldercompositePath - 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 multipleprotected ModifiableModelAwareComposite _getComposite(String name, CompositeDefinition compositeDefinition) throws BadItemTypeException
DefaultModelAwareDataHolder_getComposite in class DefaultModelAwareDataHoldername - name of the composite to retrievecompositeDefinition - the definition of the composite to retrieveBadItemTypeException - if the value stored in the repository with the given name is not a compositepublic ModifiableModelAwareRepeater getRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModelAwareDataHoldergetRepeater in interface DataHoldergetRepeater in interface ModelAwareDataHoldergetRepeater in interface ModifiableDataHoldergetRepeater in interface ModifiableModelAwareDataHoldergetRepeater in class DefaultModelAwareDataHolderrepeaterPath - 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 multipleprotected ModifiableModelAwareRepeater _getRepeater(String name, RepeaterDefinition repeaterDefinition) throws BadItemTypeException
DefaultModelAwareDataHolder_getRepeater in class DefaultModelAwareDataHoldername - name of the repeater to retrieverepeaterDefinition - the definition of the repeater to retrieveBadItemTypeException - if the value stored in the repository with the given name is not a repeaterpublic ModifiableModelAwareComposite getComposite(String compositePath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModifiableModelAwareDataHoldergetComposite in interface ModifiableDataHoldergetComposite in interface ModifiableModelAwareDataHoldercompositePath - 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 multipleprotected ModifiableModelAwareComposite _getComposite(String name, CompositeDefinition compositeDefinition, boolean createNew) throws BadItemTypeException
name - name of the composite to retrievecompositeDefinition - the definition 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 ModifiableModelAwareRepeater getRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModifiableModelAwareDataHoldergetRepeater in interface ModifiableDataHoldergetRepeater in interface ModifiableModelAwareDataHolderrepeaterPath - 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 multipleprotected ModifiableModelAwareRepeater _getRepeater(String name, RepeaterDefinition repeaterDefinition, boolean createNew) throws BadItemTypeException
name - name of the repeater to retrieverepeaterDefinition - the definition 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, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModifiableModelAwareDataHoldersetValue in interface ModifiableModelAwareDataHolderdataPath - 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 multiplepublic void removeValue(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, UnknownDataException, BadDataPathCardinalityException
ModifiableModelAwareDataHolderremoveValue in interface ModifiableDataHolderremoveValue in interface ModifiableModelAwareDataHolderdataPath - path of the dataIllegalArgumentException - if the given data path is null or emptyUndefinedItemPathException - if the given data path is not defined by the modelUnknownDataException - if the value at the given data path does not existBadDataPathCardinalityException - if the definition of a part of the data path is multiple. Only the last part can be multiple