public interface ModelLessDataAwareAmetysObject extends DataAwareAmetysObject, ModelLessDataHolder
AmetysObject that can handle data.| Modifier and Type | Method and Description |
|---|---|
default ModelLessComposite |
getComposite(String compositePath)
Retrieves the composite at the given path
|
ModelLessDataHolder |
getDataHolder()
Returns the
DataHolder of this AmetysObject. |
default ModelLessRepeater |
getRepeater(String repeaterPath)
Retrieves the repeater at the given path
|
default ModelItemType |
getType(String dataPath)
Retrieves the type of the data at the given path
|
default <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.
|
default <T> T |
getValue(String dataPath,
T defaultValue)
Retrieves the value of the data at the given path, or the default value
|
default <T> T |
getValueOfType(String dataPath,
String dataTypeId)
Retrieves the value of the data at the given path
|
default <T> T |
getValueOfType(String dataPath,
String dataTypeId,
T defaultValue)
Retrieves the value of the data at the given path, or the default value
|
default boolean |
hasValue(String dataPath)
Checks if there is a value for the data at the given path
|
default boolean |
isMultiple(String dataPath)
Checks if the value of the data at the given path is multiple
|
copyTo, getDataNamesequals, getId, getName, getParent, getParentPath, getPath, hashCodetoSAX, toSAXdataToSAX, dataToSAX, dataToSAX, dataToSAXModelLessDataHolder getDataHolder()
DataAwareAmetysObjectDataHolder of this AmetysObject.getDataHolder in interface DataAwareAmetysObjectDataHolder of this AmetysObjectdefault ModelLessComposite getComposite(String compositePath) throws IllegalArgumentException, BadItemTypeException, BadDataPathCardinalityException
DataHoldergetComposite in interface DataHoldergetComposite in interface ModelLessDataHoldercompositePath - path of the composite to retrievenull if not existsIllegalArgumentException - if the given composite path is null or emptyBadItemTypeException - if the value stored in the repository at the given path is not a compositeBadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multipledefault ModelLessRepeater getRepeater(String repeaterPath) throws IllegalArgumentException, BadItemTypeException, BadDataPathCardinalityException
DataHoldergetRepeater in interface DataHoldergetRepeater in interface ModelLessDataHolderrepeaterPath - path of the repeater to retrievenull if not existsIllegalArgumentException - if the given repeater path is null or emptyBadItemTypeException - if the value stored in the repository at the given path is not a repeaterBadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multipledefault boolean hasValue(String dataPath) throws IllegalArgumentException, BadDataPathCardinalityException
DataHolderhasValue in interface DataAwareAmetysObjecthasValue in interface DataHolderhasValue in interface ModelLessDataHolderdataPath - path of the datatrue if there is value for the data, false otherwiseIllegalArgumentException - if the given data path is null or emptyBadDataPathCardinalityException - if the value of a part of the data path is multiple. Only the last part can be multipledefault <T> T getValue(String dataPath) throws IllegalArgumentException, UnknownTypeException, NotUniqueTypeException, BadDataPathCardinalityException
ModelLessDataHoldergetValue in interface ModelLessDataHolderT - 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 multipledefault <T> T getValue(String dataPath, T defaultValue) throws IllegalArgumentException, UnknownTypeException, NotUniqueTypeException, BadDataPathCardinalityException
ModelLessDataHoldergetValue in interface ModelLessDataHolderT - 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 multipledefault <T> T getValueOfType(String dataPath, String dataTypeId) throws IllegalArgumentException, UnknownTypeException, BadItemTypeException, BadDataPathCardinalityException
ModelLessDataHoldergetValueOfType in interface ModelLessDataHolderT - 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 multipledefault <T> T getValueOfType(String dataPath, String dataTypeId, T defaultValue) throws IllegalArgumentException, UnknownTypeException, BadItemTypeException, BadDataPathCardinalityException
ModelLessDataHoldergetValueOfType in interface ModelLessDataHolderT - 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 multipledefault boolean isMultiple(String dataPath) throws IllegalArgumentException, UnknownDataException, BadDataPathCardinalityException
ModelLessDataHolderisMultiple in interface ModelLessDataHolderdataPath - 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 multipledefault ModelItemType getType(String dataPath) throws IllegalArgumentException, UnknownDataException, UnknownTypeException, NotUniqueTypeException, BadDataPathCardinalityException
ModelLessDataHoldergetType in interface ModelLessDataHolderdataPath - 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 multiple