public interface ModelLessDataHolder extends DataHolder
| Modifier and Type | Method and Description |
|---|---|
ModelLessComposite |
getComposite(String compositePath)
Retrieves the composite at the given path
|
ModelLessRepeater |
getRepeater(String repeaterPath)
Retrieves the repeater at the given path
|
ModelItemType |
getType(String dataPath)
Retrieves the type of the data at the given path
|
<T> T |
getValue(String dataPath)
Retrieves the value of the data at the given path
The type of the value will be deduced from the stored data.
|
<T> T |
getValue(String dataPath,
T defaultValue)
Retrieves the value of the data at the given path, or the default value
|
<T> T |
getValueOfType(String dataPath,
String dataTypeId)
Retrieves the value of the data at the given path
|
<T> T |
getValueOfType(String dataPath,
String dataTypeId,
T defaultValue)
Retrieves the value of the data at the given path, or the default value
|
boolean |
hasValue(String dataPath)
Checks if there is a value for the data at the given path
|
boolean |
isMultiple(String dataPath)
Checks if the value of the data at the given path is multiple
|
default void |
toSAX(ContentHandler contentHandler)
Generates SAX events for current
DataHolder |
default void |
toSAX(ContentHandler contentHandler,
Locale locale)
Generates SAX events for the current
DataHolder |
copyTo, dataToSAX, dataToSAX, dataToSAX, dataToSAX, getDataNamesModelLessComposite getComposite(String compositePath) throws IllegalArgumentException, BadItemTypeException, BadDataPathCardinalityException
getComposite in interface DataHoldercompositePath - path of the composite to retrievenull if not existsBadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multipleIllegalArgumentException - if the given composite path is null or emptyBadItemTypeException - if the value stored in the repository at the given path is not a compositeModelLessRepeater getRepeater(String repeaterPath) throws IllegalArgumentException, BadItemTypeException, BadDataPathCardinalityException
getRepeater in interface DataHolderrepeaterPath - path of the repeater to retrievenull if not existsBadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multipleIllegalArgumentException - if the given repeater path is null or emptyBadItemTypeException - if the value stored in the repository at the given path is not a repeaterboolean hasValue(String dataPath) throws IllegalArgumentException, BadDataPathCardinalityException
hasValue in interface DataHolderdataPath - path of the datatrue if there is value for the data, false otherwiseBadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multipleIllegalArgumentException - if the given data path is null or empty<T> T getValue(String dataPath) throws IllegalArgumentException, UnknownTypeException, NotUniqueTypeException, BadDataPathCardinalityException
T - type of the value to retrieve. Should match the given data typedataPath - path of the datanull if not exists. The object returned may be of a generic class defined by the storage. For example, an url may be returned as a String. Use the 2 arguments version to ensure to get the right kind of Object.IllegalArgumentException - if the given data path is null or emptyUnknownTypeException - if there is no compatible type with the data at the given data pathNotUniqueTypeException - if there are many compatible types (there is no way to determine which type is the good one)BadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multiple<T> T getValue(String dataPath, T defaultValue) throws IllegalArgumentException, UnknownTypeException, NotUniqueTypeException, BadDataPathCardinalityException
T - type of the value to retrieve. Should match the given data typedataPath - path of the datadefaultValue - default valueIllegalArgumentException - if the given data path is null or emptyUnknownTypeException - if there is no compatible type with the data at the given data pathNotUniqueTypeException - if there are many compatible types (there is no way to determine which type is the good one)BadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multiple<T> T getValueOfType(String dataPath, String dataTypeId) throws IllegalArgumentException, UnknownTypeException, BadItemTypeException, BadDataPathCardinalityException
T - type of the value to retrieve. Should match the given data typedataPath - path of the datadataTypeId - type identifier of the datanull if not existsIllegalArgumentException - if the given data path is null or emptyUnknownTypeException - if the given type isn't available for this data holder's type extension pointBadItemTypeException - if the given type doesn't match the type of the value stored in the repository at the given pathBadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multiple<T> T getValueOfType(String dataPath, String dataTypeId, T defaultValue) throws IllegalArgumentException, UnknownTypeException, BadItemTypeException, BadDataPathCardinalityException
T - type of the value to retrieve. Should match the given data typedataPath - path of the datadataTypeId - type identifier of the datadefaultValue - default valueIllegalArgumentException - if the given data path is null or emptyUnknownTypeException - if the given type isn't available for this data holder's type extension pointBadItemTypeException - if the given type doesn't match the type of the value stored in the repository at the given pathBadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multipleboolean isMultiple(String dataPath) throws IllegalArgumentException, UnknownDataException, BadDataPathCardinalityException
dataPath - path of the data to checktrue if the value of the data is multiple, false otherwiseIllegalArgumentException - if the given data path is null or emptyUnknownDataException - the data at the given path does not existBadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multipleModelItemType getType(String dataPath) throws IllegalArgumentException, UnknownDataException, UnknownTypeException, NotUniqueTypeException, BadDataPathCardinalityException
dataPath - path of the dataIllegalArgumentException - if the given data path is null or emptyUnknownDataException - if there is no data in the repository at the given pathUnknownTypeException - if there is no compatible type with the data at the given data path or if the data is a repeater entry but the composite type is not availableNotUniqueTypeException - if there are many compatible types (there is no way to determine which type is the good one)BadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multipledefault void toSAX(ContentHandler contentHandler) throws SAXException, UnknownTypeException, NotUniqueTypeException
DataHoldertoSAX in interface DataHoldercontentHandler - the ContentHandler that will receive the SAX eventsUnknownTypeException - if there is no compatible type with the saxed valueNotUniqueTypeException - if there are many compatible types (there is no way to determine which type is the good one) with the saxed valueSAXException - if an error occurs during the SAX events generationdefault void toSAX(ContentHandler contentHandler, Locale locale) throws SAXException, UnknownTypeException, NotUniqueTypeException
DataHoldertoSAX in interface DataHoldercontentHandler - the ContentHandler that will receive the SAX eventslocale - The locale to use for localized data, such as MultilingualString. Can be null to generate SAX events for all existing Locales.UnknownTypeException - if there is no compatible type with the saxed valueNotUniqueTypeException - if there are many compatible types (there is no way to determine which type is the good one) with the saxed valueSAXException - if an error occurs during the SAX events generation