Interface ModelAwareComposite
- All Superinterfaces:
Composite
,DataHolder
,ModelAwareDataHolder
- All Known Subinterfaces:
IndexableComposite
,IndexableRepeaterEntry
,ModelAwareRepeaterEntry
,ModifiableIndexableComposite
,ModifiableIndexableRepeaterEntry
,ModifiableModelAwareComposite
,ModifiableModelAwareRepeaterEntry
- All Known Implementing Classes:
DefaultModelAwareComposite
,DefaultModelAwareRepeaterEntry
,DefaultModifiableModelAwareComposite
,DefaultModifiableModelAwareRepeaterEntry
Interface for model aware composites
-
Field Summary
Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
copyTo
(ModifiableDataHolder dataHolder) Copies the currentDataHolder
to the givenModifiableModelAwareDataHolder
.dataToJSON
(ViewItemAccessor viewItemAccessor, DataContext context) Convert the data in the given view of the currentDataHolder
dataToJSONForEdition
(ViewItemAccessor viewItemAccessor, DataContext context) Convert the data in the given view in edition mode in the currentDataHolder
dataToMap
(ViewItemAccessor viewItemAccessor, DataContext context) Retrieves data of this DataHolder as a typed-values Map.default void
dataToSAX
(ContentHandler contentHandler, ViewItemAccessor viewItemAccessor, DataContext context) Generates SAX events for the data in the given view in the currentDataHolder
default void
dataToSAXForEdition
(ContentHandler contentHandler, ViewItemAccessor viewItemAccessor, DataContext context) Generates SAX events for the data in the given view in edition mode in the currentDataHolder
default List<DataComment>
getComments
(String dataName) Retrieve the comments of the data with the given namedefault ModelAwareComposite
getComposite
(String compositePath) Retrieves the composite at the given pathdefault Collection<String>
Retrieves the names of data contained by this data holder Retrieves only the data at first level, does not check composite dataRetrieves the default implementation of aDataHolder
to usedefault ModelItem
getDefinition
(String path) Retrieves the definition of the data at the given pathdefault ModelAwareComposite
getExternalComposite
(String compositePath) Retrieves the external composite at the given pathdefault ModelAwareRepeater
getExternalRepeater
(String repeaterPath) Retrieves the external repeater at the given pathdefault <T> T
getExternalValue
(String dataPath) Retrieves the external value of the data at the given pathdefault ModelAwareComposite
getLocalComposite
(String compositePath) Retrieves the local composite at the given pathdefault ModelAwareRepeater
getLocalRepeater
(String repeaterPath) Retrieves the local repeater at the given pathdefault <T> T
getLocalValue
(String dataPath) Retrieves the local value of the data at the given pathdefault Collection<? extends ModelItemContainer>
getModel()
Retrieves the data holder's modeldefault Optional<? extends ModelAwareDataHolder>
Retrieves the optional parent of the currentDataHolder
There can be no parent if the currentDataHolder
is the rootdefault ModelAwareRepeater
getRepeater
(String repeaterPath) Retrieves the repeater at the given pathdefault ModelAwareDataHolder
Retrieves theDataHolder
that is the root of the current oneRetrieves the status of the externalizable data at the given path Warning: This method won't check that your data is externalizable.default <T> T
Retrieves the value of the data at the given pathdefault <T> T
Retrieves the value of the data at the given pathdefault <T> T
Retrieves the value of the data at the given path, or the default value The returned value is one of those ones, in the order: The value of the data if exists and is not empty The default value from the model if useDefaultFromModel istrue
and there is a default value defined by the model The given default valuedefault boolean
hasComments
(String dataName) Checks if there is are comments on the data with the given namedefault boolean
hasDefinition
(String path) Checks if there is a definition at the given pathdefault boolean
hasExternalValue
(String dataPath) Checks if there is a non empty external value for the data at the given pathdefault boolean
hasExternalValueOrEmpty
(String dataPath) Checks if there is an external value for the data at the given pathdefault boolean
hasLocalValue
(String dataPath) Checks if there is a non empty local value for the data at the given pathdefault boolean
hasLocalValueOrEmpty
(String dataPath) Checks if there is a local value for the data at the given pathdefault boolean
Checks if there is a non empty value for the data at the given pathdefault boolean
hasValueOrEmpty
(String dataPath) Checks if there is a value, even empty, for the data at the given pathMethods inherited from interface org.ametys.plugins.repository.data.holder.group.Composite
dataToJSON, dataToSAX
Methods inherited from interface org.ametys.plugins.repository.data.holder.DataHolder
dataToJSON, dataToSAX, getRepositoryData
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
commentsToSAX, dataToJSON, dataToJSON, dataToJSON, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, getType, isMultiple
-
Method Details
-
getComposite
default ModelAwareComposite getComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the composite at the given path- Specified by:
getComposite
in interfaceDataHolder
- Specified by:
getComposite
in interfaceModelAwareDataHolder
- 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 emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value 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 multiple
-
getLocalComposite
default ModelAwareComposite getLocalComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the local composite at the given path- Specified by:
getLocalComposite
in interfaceModelAwareDataHolder
- Parameters:
compositePath
- path of the externalizable composite to retrieve- Returns:
- the composite or
null
if not exists or is empty - Throws:
IllegalArgumentException
- if the given composite path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value 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 multiple
-
getExternalComposite
default ModelAwareComposite getExternalComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the external composite at the given path- Specified by:
getExternalComposite
in interfaceModelAwareDataHolder
- Parameters:
compositePath
- path of the externalizable composite to retrieve- Returns:
- the composite or
null
if not exists or is empty - Throws:
IllegalArgumentException
- if the given composite path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the stored value 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 multiple
-
getRepeater
default ModelAwareRepeater getRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the repeater at the given path- Specified by:
getRepeater
in interfaceModelAwareDataHolder
- Parameters:
repeaterPath
- path of the repeater to retrieve- Returns:
- the repeater or
null
if not exists or is empty - Throws:
IllegalArgumentException
- if the given repeater path is null or emptyUndefinedItemPathException
- if the given repeater path is not defined by the modelBadItemTypeException
- if the stored value 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 multiple
-
getLocalRepeater
default ModelAwareRepeater getLocalRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the local repeater at the given path- Specified by:
getLocalRepeater
in interfaceModelAwareDataHolder
- Parameters:
repeaterPath
- path of the externalizable repeater to retrieve- Returns:
- the repeater or
null
if not exists or is empty - Throws:
IllegalArgumentException
- if the given repeater path is null or emptyUndefinedItemPathException
- if the given repeater path is not defined by the modelBadItemTypeException
- if the stored value 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 multiple
-
getExternalRepeater
default ModelAwareRepeater getExternalRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the external repeater at the given path- Specified by:
getExternalRepeater
in interfaceModelAwareDataHolder
- Parameters:
repeaterPath
- path of the externalizable repeater to retrieve- Returns:
- the repeater or
null
if not exists or is empty - Throws:
IllegalArgumentException
- if the given repeater path is null or emptyUndefinedItemPathException
- if the given repeater path is not defined by the modelBadItemTypeException
- if the stored value 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 multiple
-
getValue
default <T> T getValue(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the value of the data at the given path- Specified by:
getValue
in interfaceModelAwareDataHolder
- Type Parameters:
T
- type of the value to retrieve- Parameters:
dataPath
- path of the data- Returns:
- the value of the data or
null
if not exists or is empty. The object returned may be of a generic class defined by the storage (if the model is unknown). For example, an url may be returned as a String. - Throws:
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 type of the stored valueBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getValue
default <T> T getValue(String dataPath, boolean allowMultiValuedPathSegments) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the value of the data at the given path- Specified by:
getValue
in interfaceModelAwareDataHolder
- Type Parameters:
T
- type of the value to retrieve- Parameters:
dataPath
- path of the dataallowMultiValuedPathSegments
-true
to allow multi-valued segments in the path (not necessarily at the last segment),false
otherwise. Iftrue
, if there is no indicated entry for a repeater, the values of all the entries are retrieved Iftrue
and if there are multiple values, all data are retrieved in one array- Returns:
- the value of the data or
null
if allowMultiValuedPathSegments isfalse
and there is no non empty value. The object returned may be of a generic class defined by the storage (if the model is unknown). For example, an url may be returned as a String. - Throws:
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 type of the stored valueBadDataPathCardinalityException
- if the managesMultiples boolean isfalse
and the definition of a part of the data path is multiple. Only the last part can be multiple
-
getValue
default <T> T getValue(String dataPath, boolean useDefaultFromModel, T defaultValue) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the value of the data at the given path, or the default value The returned value is one of those ones, in the order:- The value of the data if exists and is not empty
- The default value from the model if useDefaultFromModel is
true
and there is a default value defined by the model - The given default value
- Specified by:
getValue
in interfaceModelAwareDataHolder
- Type Parameters:
T
- type of the value to retrieve- Parameters:
dataPath
- path of the datauseDefaultFromModel
- true to use the default value from the model, false to use the given default valuedefaultValue
- default value used if value is null and useDefaultFromModel is false, or if there is no default value on model- Returns:
- the value of the data at the given path
- Throws:
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 type of the stored valueBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getLocalValue
default <T> T getLocalValue(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the local value of the data at the given path- Specified by:
getLocalValue
in interfaceModelAwareDataHolder
- Type Parameters:
T
- type of the value to retrieve- Parameters:
dataPath
- path of the externalizable data- Returns:
- the local value of the data or
null
if not exists or is empty. The object returned may be of a generic class defined by the storage (if the model is unknown). For example, an url may be returned as a String. - Throws:
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 type of the stored valueBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getExternalValue
default <T> T getExternalValue(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the external value of the data at the given path- Specified by:
getExternalValue
in interfaceModelAwareDataHolder
- Type Parameters:
T
- type of the value to retrieve- Parameters:
dataPath
- path of the externalizable data- Returns:
- the external value of the data or
null
if not exists or is empty. The object returned may be of a generic class defined by the storage (if the model is unknown). For example, an url may be returned as a String. - Throws:
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 type of the stored valueBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
getStatus
default ExternalizableDataProvider.ExternalizableDataStatus getStatus(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Retrieves the status of the externalizable data at the given path Warning: This method won't check that your data is externalizable. But there is no sense to call it with a non externalizable data- Specified by:
getStatus
in interfaceModelAwareDataHolder
- Parameters:
dataPath
- path of the externalizable data- Returns:
- the status of the externalizable data at the given path
- Throws:
IllegalArgumentException
- 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 multiple
-
getComments
default List<DataComment> getComments(String dataName) throws IllegalArgumentException, UndefinedItemPathException Description copied from interface:ModelAwareDataHolder
Retrieve the comments of the data with the given name- Specified by:
getComments
in interfaceModelAwareDataHolder
- Parameters:
dataName
- name of the data- Returns:
- the comments of the data
- Throws:
IllegalArgumentException
- if the given data name is null or emptyUndefinedItemPathException
- if the given data name is not defined by the model
-
hasValue
default boolean hasValue(String dataPath) throws IllegalArgumentException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Checks if there is a non empty value for the data at the given path- Specified by:
hasValue
in interfaceComposite
- Specified by:
hasValue
in interfaceDataHolder
- Specified by:
hasValue
in interfaceModelAwareDataHolder
- Parameters:
dataPath
- path of the data- Returns:
true
if the data at the given path is defined by the model, if there is a non empty value for the data and if the type of this value matches the type of the definition.false
otherwise- Throws:
IllegalArgumentException
- if the given data path is null or emptyBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
hasLocalValue
default boolean hasLocalValue(String dataPath) throws IllegalArgumentException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Checks if there is a non empty local value for the data at the given path- Specified by:
hasLocalValue
in interfaceModelAwareDataHolder
- Parameters:
dataPath
- path of the externalizable data- Returns:
true
if the data at the given path is defined by the model, if there is a non empty local value for the data and if the type of this value matches the type of the definition.false
otherwise- Throws:
IllegalArgumentException
- if the given data path is null or emptyBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
hasExternalValue
default boolean hasExternalValue(String dataPath) throws IllegalArgumentException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Checks if there is a non empty external value for the data at the given path- Specified by:
hasExternalValue
in interfaceModelAwareDataHolder
- Parameters:
dataPath
- path of the externalizable data- Returns:
true
if the data at the given path is defined by the model, if there is a non empty external value for the data and if the type of this value matches the type of the definition.false
otherwise- Throws:
IllegalArgumentException
- if the given data path is null or emptyBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
hasValueOrEmpty
Description copied from interface:ModelAwareDataHolder
Checks if there is a value, even empty, for the data at the given path- Specified by:
hasValueOrEmpty
in interfaceComposite
- Specified by:
hasValueOrEmpty
in interfaceDataHolder
- Specified by:
hasValueOrEmpty
in interfaceModelAwareDataHolder
- Parameters:
dataPath
- path of the data- Returns:
true
if the data at the given path is defined by the model, if there is a value for the data, even empty, and if the type of this value matches the type of the definition.false
otherwise- Throws:
IllegalArgumentException
- if the given data path is null or empty
-
hasLocalValueOrEmpty
default boolean hasLocalValueOrEmpty(String dataPath) throws IllegalArgumentException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Checks if there is a local value for the data at the given path- Specified by:
hasLocalValueOrEmpty
in interfaceModelAwareDataHolder
- Parameters:
dataPath
- path of the externalizable data- Returns:
true
if the data at the given path is defined by the model, if there is a local value for the data, even empty, and if the type of this value matches the type of the definition.false
otherwise- Throws:
IllegalArgumentException
- if the given data path is null or emptyBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
hasExternalValueOrEmpty
default boolean hasExternalValueOrEmpty(String dataPath) throws IllegalArgumentException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolder
Checks if there is an external value for the data at the given path- Specified by:
hasExternalValueOrEmpty
in interfaceModelAwareDataHolder
- Parameters:
dataPath
- path of the externalizable data- Returns:
true
if the data at the given path is defined by the model, if there is an external value for the data, even empty, and if the type of this value matches the type of the definition.false
otherwise- Throws:
IllegalArgumentException
- if the given data path is null or emptyBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiple
-
hasComments
default boolean hasComments(String dataName) throws IllegalArgumentException, UndefinedItemPathException Description copied from interface:ModelAwareDataHolder
Checks if there is are comments on the data with the given name- Specified by:
hasComments
in interfaceModelAwareDataHolder
- Parameters:
dataName
- name of the data- Returns:
true
if there are comments on the data,false
otherwise- Throws:
IllegalArgumentException
- if the given data name is null or emptyUndefinedItemPathException
- if the given data name is not defined by the model
-
getModel
Description copied from interface:ModelAwareDataHolder
Retrieves the data holder's model- Specified by:
getModel
in interfaceModelAwareDataHolder
- Returns:
- the data holder's model
-
getDefinition
default ModelItem getDefinition(String path) throws IllegalArgumentException, UndefinedItemPathException Description copied from interface:ModelAwareDataHolder
Retrieves the definition of the data at the given path- Specified by:
getDefinition
in interfaceModelAwareDataHolder
- Parameters:
path
- path of the data. No matter if it is a definition or data path (with repeater entry positions)- Returns:
- the definition of the data
- Throws:
IllegalArgumentException
- if the given path is null or emptyUndefinedItemPathException
- if the given path is not defined by the model
-
hasDefinition
Description copied from interface:ModelAwareDataHolder
Checks if there is a definition at the given path- Specified by:
hasDefinition
in interfaceModelAwareDataHolder
- Parameters:
path
- path of the data. No matter if it is a definition or data path (with repeater entry positions)- Returns:
true
if there is definition at the given path,false
otherwise- Throws:
IllegalArgumentException
- if the given path is null or empty
-
getDataNames
Description copied from interface:ModelAwareDataHolder
Retrieves the names of data contained by this data holder Retrieves only the data at first level, does not check composite data- Specified by:
getDataNames
in interfaceComposite
- Specified by:
getDataNames
in interfaceDataHolder
- Specified by:
getDataNames
in interfaceModelAwareDataHolder
- Returns:
- the names of the data contained by this data holder and that are defined by the model
-
copyTo
default void copyTo(ModifiableDataHolder dataHolder) throws UndefinedItemPathException, BadItemTypeException, UnknownTypeException, NotUniqueTypeException Description copied from interface:DataHolder
Copies the currentDataHolder
to the givenModifiableModelAwareDataHolder
.- Specified by:
copyTo
in interfaceComposite
- Specified by:
copyTo
in interfaceDataHolder
- Parameters:
dataHolder
- The destination dataHolder. Can not be null.- Throws:
UndefinedItemPathException
- if one of the copied data is not defined by the model of the destinationModifiableModelAwareDataHolder
BadItemTypeException
- if the type defined by the model of the destinationModifiableModelAwareDataHolder
doesn't match the copied valueUnknownTypeException
- if there is no available type compatible with the copied value for the type extension point of the destinationModifiableModelLessDataHolder
NotUniqueTypeException
- if there is more than one available types compatibles with the copied value for the type extension point of the destinationModifiableModelLessDataHolder
-
dataToSAX
default void dataToSAX(ContentHandler contentHandler, ViewItemAccessor viewItemAccessor, DataContext context) throws SAXException, BadItemTypeException Description copied from interface:ModelAwareDataHolder
Generates SAX events for the data in the given view in the currentDataHolder
- Specified by:
dataToSAX
in interfaceModelAwareDataHolder
- Parameters:
contentHandler
- theContentHandler
that will receive the SAX eventsviewItemAccessor
- theViewItemAccessor
referencing the items for which generate SAX eventscontext
- The context of the data to SAX- Throws:
SAXException
- if an error occurs during the SAX events generationBadItemTypeException
- if the saxed value's type does not matches the stored data
-
dataToSAXForEdition
default void dataToSAXForEdition(ContentHandler contentHandler, ViewItemAccessor viewItemAccessor, DataContext context) throws SAXException, BadItemTypeException Description copied from interface:ModelAwareDataHolder
Generates SAX events for the data in the given view in edition mode in the currentDataHolder
- Specified by:
dataToSAXForEdition
in interfaceModelAwareDataHolder
- Parameters:
contentHandler
- theContentHandler
that will receive the SAX eventsviewItemAccessor
- theViewItemAccessor
referencing the items for which generate SAX eventscontext
- The context of the data to SAX- Throws:
SAXException
- if an error occurs during the SAX events generationBadItemTypeException
- if the saxed value's type does not matches the stored data
-
dataToJSON
default Map<String,Object> dataToJSON(ViewItemAccessor viewItemAccessor, DataContext context) throws BadItemTypeException Description copied from interface:ModelAwareDataHolder
Convert the data in the given view of the currentDataHolder
- Specified by:
dataToJSON
in interfaceModelAwareDataHolder
- Parameters:
viewItemAccessor
- theViewItemAccessor
referencing the items to convertcontext
- The context of the data to convert- Returns:
- The data of the given view as JSON
- Throws:
BadItemTypeException
- if the value's type does not matches the stored data
-
dataToJSONForEdition
default Map<String,Object> dataToJSONForEdition(ViewItemAccessor viewItemAccessor, DataContext context) throws BadItemTypeException Description copied from interface:ModelAwareDataHolder
Convert the data in the given view in edition mode in the currentDataHolder
- Specified by:
dataToJSONForEdition
in interfaceModelAwareDataHolder
- Parameters:
viewItemAccessor
- theViewItemAccessor
referencing the items to convertcontext
- The context of the data to convert- Returns:
- The data of the given view as JSON
- Throws:
BadItemTypeException
- if the value's type does not matches the stored data
-
dataToMap
Description copied from interface:ModelAwareDataHolder
Retrieves data of this DataHolder as a typed-values Map.- Specified by:
dataToMap
in interfaceModelAwareDataHolder
- Parameters:
viewItemAccessor
- theViewItemAccessor
referencing the items to include in the resulting Mapcontext
- The context of the data- Returns:
- a Map containing all data.
-
getParentDataHolder
Description copied from interface:DataHolder
Retrieves the optional parent of the currentDataHolder
There can be no parent if the currentDataHolder
is the root- Specified by:
getParentDataHolder
in interfaceDataHolder
- Specified by:
getParentDataHolder
in interfaceModelAwareDataHolder
- Returns:
- the parent of the current
DataHolder
-
getRootDataHolder
Description copied from interface:DataHolder
Retrieves theDataHolder
that is the root of the current one- Specified by:
getRootDataHolder
in interfaceDataHolder
- Specified by:
getRootDataHolder
in interfaceModelAwareDataHolder
- Returns:
- the root
DataHolder
-
getDefaultDataHolder
Description copied from interface:Composite
Retrieves the default implementation of aDataHolder
to use- Specified by:
getDefaultDataHolder
in interfaceComposite
- Returns:
- the
DataHolder
-