Package org.ametys.cms.data
Class ContentValue
- java.lang.Object
- 
- org.ametys.cms.data.ContentValue
 
- 
- All Implemented Interfaces:
- DataHolder,- ModelAwareDataHolder,- ModifiableDataHolder,- ModifiableModelAwareDataHolder
 
 public class ContentValue extends Object implements ModifiableModelAwareDataHolder Content wrapper used by attributes of type content- See Also:
- AbstractContentElementType
 
- 
- 
Field SummaryFields Modifier and Type Field Description private ModifiableContent_contentprivate String_contentIdprivate AmetysObjectResolver_resolverprivate Session_session- 
Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolderALTERNATIVE_SUFFIX, STATUS_SUFFIX
 
- 
 - 
Constructor SummaryConstructors Constructor Description ContentValue(AmetysObjectResolver resolver, String contentId)Constructor of the content wrapperContentValue(AmetysObjectResolver resolver, String contentId, Session session)Constructor of the content wrapper
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddataToSAX(ContentHandler contentHandler, String dataPath, Locale locale)Generates SAX events for the data at the given data path in the currentDataHolderDo not generate any event if there is no values at the given pathvoiddataToSAX(ContentHandler contentHandler, Locale locale)Generates SAX events for the data in the model of the currentDataHolderbooleanequals(Object obj)ModifiableModelAwareCompositegetComposite(String compositePath)Retrieves the composite at the given pathModifiableModelAwareCompositegetComposite(String compositePath, boolean createNew)Retrieves the composite at the given pathModifiableContentgetContent()Retrieves the contentStringgetContentId()Retrieves the content's identifierOptional<ModifiableContent>getContentIfExists()Collection<String>getDataNames()Retrieves the names of data contained by this data holder Retrieves only the data at first level, does not check composite dataModelItemgetDefinition(String path)Retrieves the definition of the data at the given pathModifiableModelAwareCompositegetExternalComposite(String compositePath)Retrieves the external composite at the given pathModifiableModelAwareCompositegetExternalComposite(String compositePath, boolean createNew)Retrieves the external composite at the given pathModifiableModelAwareRepeatergetExternalRepeater(String repeaterPath)Retrieves the external repeater at the given pathModifiableModelAwareRepeatergetExternalRepeater(String repeaterPath, boolean createNew)Retrieves the external repeater at the given path<T> TgetExternalValue(String dataPath)Retrieves the external value of the data at the given pathModifiableModelAwareCompositegetLocalComposite(String compositePath)Retrieves the local composite at the given pathModifiableModelAwareCompositegetLocalComposite(String compositePath, boolean createNew)Retrieves the local composite at the given pathModifiableModelAwareRepeatergetLocalRepeater(String repeaterPath)Retrieves the local repeater at the given pathModifiableModelAwareRepeatergetLocalRepeater(String repeaterPath, boolean createNew)Retrieves the local repeater at the given path<T> TgetLocalValue(String dataPath)Retrieves the local value of the data at the given pathCollection<? extends ModelItemContainer>getModel()Retrieves the data holder's modelModifiableModelAwareRepeatergetRepeater(String repeaterPath)Retrieves the repeater at the given pathModifiableModelAwareRepeatergetRepeater(String repeaterPath, boolean createNew)Retrieves the repeater at the given pathModifiableRepositoryDatagetRepositoryData()Retrieves the repository data used by thisDataHolderExternalizableDataProvider.ExternalizableDataStatusgetStatus(String dataPath)Retrieves the status of the externalizable data at the given path<T> TgetValue(String dataPath, boolean allowMultiValuedPathSegments)Retrieves the value of the data at the given path<T> TgetValue(String dataPath, boolean useDefaultFromModel, T defaultValue)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 istrueand there is a default value defined by the model The given default valuebooleanhasDefinition(String path)Checks if there is a definition at the given pathbooleanhasExternalValue(String dataPath)Checks if there is an external value for the data at the given pathinthashCode()booleanhasLocalValue(String dataPath)Checks if there is a local value for the data at the given pathbooleanhasValue(String dataPath)Checks if there is a value for the data at the given pathvoidremoveExternalValue(String dataPath)Removes the external value of the data at the given pathvoidremoveLocalValue(String dataPath)Removes the local value of the data at the given pathvoidremoveValue(String dataPath)Removes the stored value of the data at the given pathvoidsetExternalValue(String dataPath, Object externalValue)Sets the external value of the data at the given pathvoidsetLocalValue(String dataPath, Object localValue)Sets the local value of the data at the given pathvoidsetStatus(String dataPath, ExternalizableDataProvider.ExternalizableDataStatus status)Set the status of the data at the given pathvoidsetValue(String dataPath, Object value)Sets the value of the data at the given pathbooleansynchronizeValues(Map<String,Object> values, ExternalizableDataProviderExtensionPoint externalizableDataProviderEP, boolean useDefaultFromModel)Synchronizes the given values with the currentModifiableModelAwareDataHolder's ones If the data is externalizable, the synchronized value is the external onebooleansynchronizeValues(ViewItemContainer viewItemContainer, Map<String,Object> values, ExternalizableDataProviderExtensionPoint externalizableDataProviderEP, boolean useDefaultFromModel)Synchronizes the given values with the currentModifiableModelAwareDataHolder's ones If the data is externalizable, the synchronized value is the external one- 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.ametys.plugins.repository.data.holder.DataHoldercopyTo, dataToSAX
 - 
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolderdataToSAX, dataToSAX, dataToSAX, getType, getValue, isMultiple
 - 
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableModelAwareDataHoldersynchronizeValues, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValues
 
- 
 
- 
- 
- 
Field Detail- 
_resolverprivate AmetysObjectResolver _resolver 
 - 
_contentIdprivate String _contentId 
 - 
_contentprivate ModifiableContent _content 
 
- 
 - 
Constructor Detail- 
ContentValuepublic ContentValue(AmetysObjectResolver resolver, String contentId) Constructor of the content wrapper- Parameters:
- resolver- resolver used to get the content from its identifier
- contentId- content identifier
 
 - 
ContentValuepublic ContentValue(AmetysObjectResolver resolver, String contentId, Session session) Constructor of the content wrapper- Parameters:
- resolver- resolver used to get the content from its identifier
- contentId- content identifier
- session- the current session. If- null, a new session will be used to retrieve the content
 
 
- 
 - 
Method Detail- 
getContentIdpublic String getContentId() Retrieves the content's identifier- Returns:
- the content's identifier
 
 - 
getContentpublic ModifiableContent getContent() throws AmetysRepositoryException, UnknownAmetysObjectException Retrieves the content- Returns:
- the content
- Throws:
- AmetysRepositoryException- if an error occurs.
- UnknownAmetysObjectException- if no content exists for the identifier
 
 - 
getContentIfExistspublic Optional<ModifiableContent> getContentIfExists() - Returns:
- an Optionaldescribing the content
 
 - 
hasValuepublic boolean hasValue(String dataPath) throws IllegalArgumentException, BadDataPathCardinalityException Description copied from interface:DataHolderChecks if there is a value for the data at the given path- Specified by:
- hasValuein interface- DataHolder
- Specified by:
- hasValuein interface- ModelAwareDataHolder
- Parameters:
- dataPath- path of the data
- Returns:
- trueif there is value (even empty) for the data,- falseotherwise
- Throws:
- IllegalArgumentException- if the given data path is null or empty
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
hasLocalValuepublic boolean hasLocalValue(String dataPath) throws IllegalArgumentException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderChecks if there is a local value for the data at the given path- Specified by:
- hasLocalValuein interface- ModelAwareDataHolder
- Parameters:
- dataPath- path of the externalizable data
- Returns:
- trueif 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.- falseotherwise
- Throws:
- IllegalArgumentException- if the given data path is null or empty
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
hasExternalValuepublic boolean hasExternalValue(String dataPath) throws IllegalArgumentException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderChecks if there is an external value for the data at the given path- Specified by:
- hasExternalValuein interface- ModelAwareDataHolder
- Parameters:
- dataPath- path of the externalizable data
- Returns:
- trueif 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.- falseotherwise
- Throws:
- IllegalArgumentException- if the given data path is null or empty
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getDataNamespublic Collection<String> getDataNames() Description copied from interface:DataHolderRetrieves the names of data contained by this data holder Retrieves only the data at first level, does not check composite data- Specified by:
- getDataNamesin interface- DataHolder
- Specified by:
- getDataNamesin interface- ModelAwareDataHolder
- Returns:
- the names of all data contained by this data holder
 
 - 
getValuepublic <T> T getValue(String dataPath, boolean allowMultiValuedPathSegments) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the value of the data at the given path- Specified by:
- getValuein interface- ModelAwareDataHolder
- Type Parameters:
- T- type of the value to retrieve
- Parameters:
- dataPath- path of the data
- allowMultiValuedPathSegments-- trueto allow multi-valued segments in the path (not necessarily at the last segment),- falseotherwise. If- true, if there is no indicated entry for a repeater, the values of all the entries are retrieved If- trueand if there are multiple values, all data are retrieved in one array
- Returns:
- the value of the data or nullif managesMutiples isfalseand 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 empty
- UndefinedItemPathException- if the given data path is not defined by the model
- BadItemTypeException- if the type defined by the model doesn't match the type of the stored value
- BadDataPathCardinalityException- if the managesMultiples boolean is- falseand the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getValuepublic <T> T getValue(String dataPath, boolean useDefaultFromModel, T defaultValue) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves 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 trueand there is a default value defined by the model
- The given default value
 - Specified by:
- getValuein interface- ModelAwareDataHolder
- Type Parameters:
- T- type of the value to retrieve
- Parameters:
- dataPath- path of the data
- useDefaultFromModel- true to use the default value from the model, false to use the given default value
- defaultValue- 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 empty
- UndefinedItemPathException- if the given data path is not defined by the model
- BadItemTypeException- if the type defined by the model doesn't match the type of the stored value
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getLocalValuepublic <T> T getLocalValue(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the local value of the data at the given path- Specified by:
- getLocalValuein interface- ModelAwareDataHolder
- Type Parameters:
- T- type of the value to retrieve
- Parameters:
- dataPath- path of the externalizable data
- Returns:
- the local value of the data or nullif 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 empty
- UndefinedItemPathException- if the given data path is not defined by the model
- BadItemTypeException- if the type defined by the model doesn't match the type of the stored value
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getExternalValuepublic <T> T getExternalValue(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the external value of the data at the given path- Specified by:
- getExternalValuein interface- ModelAwareDataHolder
- Type Parameters:
- T- type of the value to retrieve
- Parameters:
- dataPath- path of the externalizable data
- Returns:
- the external value of the data or nullif 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 empty
- UndefinedItemPathException- if the given data path is not defined by the model
- BadItemTypeException- if the type defined by the model doesn't match the type of the stored value
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getStatuspublic ExternalizableDataProvider.ExternalizableDataStatus getStatus(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the status of the externalizable data at the given path- Specified by:
- getStatusin interface- ModelAwareDataHolder
- 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 empty
- UndefinedItemPathException- if the given data path is not defined by the model
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getModelpublic Collection<? extends ModelItemContainer> getModel() Description copied from interface:ModelAwareDataHolderRetrieves the data holder's model- Specified by:
- getModelin interface- ModelAwareDataHolder
- Returns:
- the data holder's model
 
 - 
getDefinitionpublic ModelItem getDefinition(String path) throws IllegalArgumentException, UndefinedItemPathException Description copied from interface:ModelAwareDataHolderRetrieves the definition of the data at the given path- Specified by:
- getDefinitionin interface- ModelAwareDataHolder
- 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 empty
- UndefinedItemPathException- if the given path is not defined by the model
 
 - 
hasDefinitionpublic boolean hasDefinition(String path) throws IllegalArgumentException Description copied from interface:ModelAwareDataHolderChecks if there is a definition at the given path- Specified by:
- hasDefinitionin interface- ModelAwareDataHolder
- Parameters:
- path- path of the data. No matter if it is a definition or data path (with repeater entry positions)
- Returns:
- trueif there is definition at the given path,- falseotherwise
- Throws:
- IllegalArgumentException- if the given path is null or empty
 
 - 
getCompositepublic ModifiableModelAwareComposite getComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:DataHolderRetrieves the composite at the given path- Specified by:
- getCompositein interface- DataHolder
- Specified by:
- getCompositein interface- ModelAwareDataHolder
- Specified by:
- getCompositein interface- ModifiableDataHolder
- Specified by:
- getCompositein interface- ModifiableModelAwareDataHolder
- Parameters:
- compositePath- path of the composite to retrieve
- Returns:
- the composite or nullif not exists or is empty
- Throws:
- IllegalArgumentException- if the given composite path is null or empty
- UndefinedItemPathException- if the given composite path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a composite
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getLocalCompositepublic ModifiableModelAwareComposite getLocalComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the local composite at the given path- Specified by:
- getLocalCompositein interface- ModelAwareDataHolder
- Specified by:
- getLocalCompositein interface- ModifiableModelAwareDataHolder
- Parameters:
- compositePath- path of the externalizable composite to retrieve
- Returns:
- the composite or nullif not exists or is empty
- Throws:
- IllegalArgumentException- if the given composite path is null or empty
- UndefinedItemPathException- if the given composite path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a composite
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getExternalCompositepublic ModifiableModelAwareComposite getExternalComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the external composite at the given path- Specified by:
- getExternalCompositein interface- ModelAwareDataHolder
- Specified by:
- getExternalCompositein interface- ModifiableModelAwareDataHolder
- Parameters:
- compositePath- path of the externalizable composite to retrieve
- Returns:
- the composite or nullif not exists or is empty
- Throws:
- IllegalArgumentException- if the given composite path is null or empty
- UndefinedItemPathException- if the given composite path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a composite
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getRepeaterpublic ModifiableModelAwareRepeater getRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the repeater at the given path- Specified by:
- getRepeaterin interface- ModelAwareDataHolder
- Specified by:
- getRepeaterin interface- ModifiableModelAwareDataHolder
- Parameters:
- repeaterPath- path of the repeater to retrieve
- Returns:
- the repeater or nullif not exists or is empty
- Throws:
- IllegalArgumentException- if the given repeater path is null or empty
- UndefinedItemPathException- if the given repeater path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a repeater
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getLocalRepeaterpublic ModifiableModelAwareRepeater getLocalRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the local repeater at the given path- Specified by:
- getLocalRepeaterin interface- ModelAwareDataHolder
- Specified by:
- getLocalRepeaterin interface- ModifiableModelAwareDataHolder
- Parameters:
- repeaterPath- path of the externalizable repeater to retrieve
- Returns:
- the repeater or nullif not exists or is empty
- Throws:
- IllegalArgumentException- if the given repeater path is null or empty
- UndefinedItemPathException- if the given repeater path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a repeater
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getExternalRepeaterpublic ModifiableModelAwareRepeater getExternalRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModelAwareDataHolderRetrieves the external repeater at the given path- Specified by:
- getExternalRepeaterin interface- ModelAwareDataHolder
- Specified by:
- getExternalRepeaterin interface- ModifiableModelAwareDataHolder
- Parameters:
- repeaterPath- path of the externalizable repeater to retrieve
- Returns:
- the repeater or nullif not exists or is empty
- Throws:
- IllegalArgumentException- if the given repeater path is null or empty
- UndefinedItemPathException- if the given repeater path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a repeater
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
dataToSAXpublic void dataToSAX(ContentHandler contentHandler, String dataPath, Locale locale) throws SAXException, IOException Description copied from interface:DataHolderGenerates SAX events for the data at the given data path in the currentDataHolderDo not generate any event if there is no values at the given path- Specified by:
- dataToSAXin interface- DataHolder
- Parameters:
- contentHandler- the- ContentHandlerthat will receive the SAX events
- dataPath- the path of the data to SAX
- locale- The locale to use for localized data, such as- MultilingualString. Can be- nullto generate SAX events for all existing- Locales.
- Throws:
- SAXException- if an error occurs during the SAX events generation
- IOException- if an error occurs while reading a value using the I/O API
 
 - 
dataToSAXpublic void dataToSAX(ContentHandler contentHandler, Locale locale) throws SAXException, IOException, BadItemTypeException Description copied from interface:ModelAwareDataHolderGenerates SAX events for the data in the model of the currentDataHolder- Specified by:
- dataToSAXin interface- ModelAwareDataHolder
- Parameters:
- contentHandler- the- ContentHandlerthat will receive the SAX events
- locale- The locale to use for localized data, such as- MultilingualString. Can be- nullto generate SAX events for all existing- Locales.
- Throws:
- SAXException- if an error occurs during the SAX events generation
- IOException- if an error occurs while reading a value using the I/O API
- BadItemTypeException- if the saxed value's type does not matches the stored data
 
 - 
getCompositepublic ModifiableModelAwareComposite getComposite(String compositePath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRetrieves the composite at the given path- Specified by:
- getCompositein interface- ModifiableDataHolder
- Specified by:
- getCompositein interface- ModifiableModelAwareDataHolder
- Parameters:
- compositePath- path of the composite to retrieve
- createNew-- trueto create the composite if it does not exist,- falseotherwise
- Returns:
- the composite or nullif createNew isfalseand value not exists or is empty
- Throws:
- IllegalArgumentException- if the given composite path is null or empty
- UndefinedItemPathException- if the given composite path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a composite
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getLocalCompositepublic ModifiableModelAwareComposite getLocalComposite(String compositePath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRetrieves the local composite at the given path- Specified by:
- getLocalCompositein interface- ModifiableModelAwareDataHolder
- Parameters:
- compositePath- path of the externalizable composite to retrieve
- createNew-- trueto create the composite if it does not exist,- falseotherwise
- Returns:
- the composite or nullif createNew isfalseand value not exists or is empty
- Throws:
- IllegalArgumentException- if the given composite path is null or empty
- UndefinedItemPathException- if the given composite path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a composite
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getExternalCompositepublic ModifiableModelAwareComposite getExternalComposite(String compositePath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRetrieves the external composite at the given path- Specified by:
- getExternalCompositein interface- ModifiableModelAwareDataHolder
- Parameters:
- compositePath- path of the externalizable composite to retrieve
- createNew-- trueto create the composite if it does not exist,- falseotherwise
- Returns:
- the composite or nullif createNew isfalseand value not exists or is empty
- Throws:
- IllegalArgumentException- if the given composite path is null or empty
- UndefinedItemPathException- if the given composite path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a composite
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getRepeaterpublic ModifiableModelAwareRepeater getRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRetrieves the repeater at the given path- Specified by:
- getRepeaterin interface- ModifiableModelAwareDataHolder
- Parameters:
- repeaterPath- path of the repeater to retrieve
- createNew-- trueto create the repeater if it does not exist,- falseotherwise
- Returns:
- the repeater or nullif createNew isfalseand value not exists or is empty
- Throws:
- IllegalArgumentException- if the given repeater path is null or empty
- UndefinedItemPathException- if the given composite path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a repeater
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getLocalRepeaterpublic ModifiableModelAwareRepeater getLocalRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRetrieves the local repeater at the given path- Specified by:
- getLocalRepeaterin interface- ModifiableModelAwareDataHolder
- Parameters:
- repeaterPath- path of the externalizable repeater to retrieve
- createNew-- trueto create the repeater if it does not exist,- falseotherwise
- Returns:
- the repeater or nullif createNew isfalseand value not exists or is empty
- Throws:
- IllegalArgumentException- if the given repeater path is null or empty
- UndefinedItemPathException- if the given composite path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a repeater
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getExternalRepeaterpublic ModifiableModelAwareRepeater getExternalRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRetrieves the external repeater at the given path- Specified by:
- getExternalRepeaterin interface- ModifiableModelAwareDataHolder
- Parameters:
- repeaterPath- path of the externalizable repeater to retrieve
- createNew-- trueto create the repeater if it does not exist,- falseotherwise
- Returns:
- the repeater or nullif createNew isfalseand value not exists or is empty
- Throws:
- IllegalArgumentException- if the given repeater path is null or empty
- UndefinedItemPathException- if the given composite path is not defined by the model
- BadItemTypeException- if the stored value at the given path is not a repeater
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
synchronizeValuespublic boolean synchronizeValues(Map<String,Object> values, ExternalizableDataProviderExtensionPoint externalizableDataProviderEP, boolean useDefaultFromModel) throws UndefinedItemPathException, BadItemTypeException, IOException Description copied from interface:ModifiableModelAwareDataHolderSynchronizes the given values with the currentModifiableModelAwareDataHolder's ones If the data is externalizable, the synchronized value is the external one- Specified by:
- synchronizeValuesin interface- ModifiableModelAwareDataHolder
- Parameters:
- values- the values to synchronize
- externalizableDataProviderEP- the extrernalizable data provider extension point
- useDefaultFromModel-- trueto use default values from the model if there is no value in the- Mapfor an item present in the view
- Returns:
- trueif some values have changed,- falseotherwise
- Throws:
- UndefinedItemPathException- if a key in the given Map refers to a data that is not defined by the model
- BadItemTypeException- if the type defined by the model of one of the Map's key doesn't match the corresponding value
- IOException- if an error occurs while synchronizing I/O data
 
 - 
synchronizeValuespublic boolean synchronizeValues(ViewItemContainer viewItemContainer, Map<String,Object> values, ExternalizableDataProviderExtensionPoint externalizableDataProviderEP, boolean useDefaultFromModel) throws UndefinedItemPathException, BadItemTypeException, IOException Description copied from interface:ModifiableModelAwareDataHolderSynchronizes the given values with the currentModifiableModelAwareDataHolder's ones If the data is externalizable, the synchronized value is the external one- Specified by:
- synchronizeValuesin interface- ModifiableModelAwareDataHolder
- Parameters:
- viewItemContainer- The- ViewItemContainercontaining all items to synchronize
- values- the values to synchronize
- externalizableDataProviderEP- the extrernalizable data provider extension point
- useDefaultFromModel-- trueto use default values from the model if there is no value in the- Mapfor an item present in the view
- Returns:
- trueif some values have changed,- falseotherwise
- Throws:
- UndefinedItemPathException- if a key in the given Map refers to a data that is not defined by the model
- BadItemTypeException- if the type defined by the model of one of the Map's key doesn't match the corresponding value
- IOException- if an error occurs while synchronizing I/O data
 
 - 
setValuepublic void setValue(String dataPath, Object value) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderSets the value of the data at the given path- Specified by:
- setValuein interface- ModifiableModelAwareDataHolder
- Parameters:
- dataPath- path of the data
- value- the value to set. Give- nullto empty the value.
- Throws:
- IllegalArgumentException- if the given data path is null or empty
- UndefinedItemPathException- if the given data path is not defined by the model
- BadItemTypeException- if the type defined by the model doesn't match the given value to set
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
setLocalValuepublic void setLocalValue(String dataPath, Object localValue) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderSets the local value of the data at the given path- Specified by:
- setLocalValuein interface- ModifiableModelAwareDataHolder
- Parameters:
- dataPath- path of the externalizable data
- localValue- the local value to set. Give- nullto empty the value.
- Throws:
- IllegalArgumentException- if the given data path is null or empty
- UndefinedItemPathException- if the given data path is not defined by the model
- BadItemTypeException- if the type defined by the model doesn't match the given value to set
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
setExternalValuepublic void setExternalValue(String dataPath, Object externalValue) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderSets the external value of the data at the given path- Specified by:
- setExternalValuein interface- ModifiableModelAwareDataHolder
- Parameters:
- dataPath- path of the externalizable data
- externalValue- the external value to set. Give- nullto empty the value.
- Throws:
- IllegalArgumentException- if the given data path is null or empty
- UndefinedItemPathException- if the given data path is not defined by the model
- BadItemTypeException- if the type defined by the model doesn't match the given value to set
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
setStatuspublic void setStatus(String dataPath, ExternalizableDataProvider.ExternalizableDataStatus status) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderSet the status of the data at the given path- Specified by:
- setStatusin interface- ModifiableModelAwareDataHolder
- Parameters:
- dataPath- path of the externalizable data
- status- the new status
- Throws:
- IllegalArgumentException- if the given data path is null or empty
- UndefinedItemPathException- if the given data path is not defined by the model
- BadItemTypeException- if the type defined by the model doesn't match the given value to set
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
removeValuepublic void removeValue(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, UnknownDataException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRemoves the stored value of the data at the given path- Specified by:
- removeValuein interface- ModifiableDataHolder
- Specified by:
- removeValuein interface- ModifiableModelAwareDataHolder
- Parameters:
- dataPath- path of the data
- Throws:
- IllegalArgumentException- if the given data path is null or empty
- UndefinedItemPathException- if the given data path is not defined by the model
- UnknownDataException- if the value at the given data path does not exist
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
removeLocalValuepublic void removeLocalValue(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, UnknownDataException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRemoves the local value of the data at the given path- Specified by:
- removeLocalValuein interface- ModifiableModelAwareDataHolder
- Parameters:
- dataPath- path of the externalizable data
- Throws:
- IllegalArgumentException- if the given data path is null or empty
- UndefinedItemPathException- if the given data path is not defined by the model
- BadItemTypeException- if the value of the parent of the given path is not an item container
- UnknownDataException- if the value at the given data path does not exist
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
removeExternalValuepublic void removeExternalValue(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, UnknownDataException, BadDataPathCardinalityException Description copied from interface:ModifiableModelAwareDataHolderRemoves the external value of the data at the given path- Specified by:
- removeExternalValuein interface- ModifiableModelAwareDataHolder
- Parameters:
- dataPath- path of the externalizable data
- Throws:
- IllegalArgumentException- if the given data path is null or empty
- UndefinedItemPathException- if the given data path is not defined by the model
- BadItemTypeException- if the value of the parent of the given path is not an item container
- UnknownDataException- if the value at the given data path does not exist
- BadDataPathCardinalityException- if the definition of a part of the data path is multiple. Only the last part can be multiple
 
 - 
getRepositoryDatapublic ModifiableRepositoryData getRepositoryData() Description copied from interface:DataHolderRetrieves the repository data used by thisDataHolder- Specified by:
- getRepositoryDatain interface- DataHolder
- Specified by:
- getRepositoryDatain interface- ModifiableDataHolder
- Returns:
- the repository data used by this DataHolder
 
 
- 
 
-