public class ModifiableModelLessRepeaterEntry extends ModelLessRepeaterEntry implements ModifiableRepeaterEntry, ModifiableModelLessDataHolder
Modifier and Type | Field and Description |
---|---|
private ModifiableModelLessDataHolder |
_modifiableDefaultDataHolder
the default implementation of a
ModifiableModelLessDataHolder to use |
protected ModifiableModelLessRepeater |
_repeater
the repeater containing this entry
|
_defaultDataHolder
_modifiableRepositoryData
_repositoryData
Constructor and Description |
---|
ModifiableModelLessRepeaterEntry(AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> typeExtensionPoint,
ModifiableRepositoryData repositoryData,
ModifiableModelLessRepeater repeater)
Creates a modifiable model free composite
|
Modifier and Type | Method and Description |
---|---|
ModifiableModelLessComposite |
getComposite(String compositePath)
Retrieves the composite at the given path
|
ModifiableModelLessComposite |
getComposite(String compositePath,
boolean createNew)
Retrieves the composite at the given path
|
protected ModifiableModelLessDataHolder |
getDefaultDataHolder()
Retrieves the default implementation of a
DataHolder to use |
ModifiableModelLessRepeater |
getRepeater(String repeaterPath)
Retrieves the repeater at the given path
|
ModifiableModelLessRepeater |
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 |
setPosition(int position)
Sets the position of the entry in the repeater.
|
void |
setValue(String dataPath,
Object value)
Sets the value of the data at the given path
|
void |
setValue(String dataPath,
Object value,
String dataTypeId)
Sets the value of the data at the given path
|
copyTo, getType, getValue, getValue, getValueOfType, getValueOfType, isMultiple
getPosition, setPosition
getDataNames, hasValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPosition
copyTo, dataToSAX, dataToSAX, dataToSAX, dataToSAX, getDataNames, hasValue, toSAX, toSAX
getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, isMultiple, toSAX, toSAX
protected ModifiableModelLessRepeater _repeater
private ModifiableModelLessDataHolder _modifiableDefaultDataHolder
ModifiableModelLessDataHolder
to usepublic ModifiableModelLessRepeaterEntry(AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> typeExtensionPoint, ModifiableRepositoryData repositoryData, ModifiableModelLessRepeater repeater)
typeExtensionPoint
- the extension point to use to get available element typesrepositoryData
- the repository data to userepeater
- the repeater containing this entrypublic ModifiableModelLessComposite getComposite(String compositePath) throws IllegalArgumentException, BadItemTypeException, BadDataPathCardinalityException
ModelLessDataHolder
getComposite
in interface DataHolder
getComposite
in interface ModelLessDataHolder
getComposite
in interface ModifiableDataHolder
getComposite
in interface ModifiableModelLessDataHolder
getComposite
in class ModelLessRepeaterEntry
compositePath
- 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 multiplepublic ModifiableModelLessRepeater getRepeater(String repeaterPath) throws IllegalArgumentException, BadItemTypeException, BadDataPathCardinalityException
ModelLessDataHolder
getRepeater
in interface DataHolder
getRepeater
in interface ModelLessDataHolder
getRepeater
in interface ModifiableDataHolder
getRepeater
in interface ModifiableModelLessDataHolder
getRepeater
in class ModelLessRepeaterEntry
repeaterPath
- 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 multiplepublic ModifiableModelLessComposite getComposite(String compositePath, boolean createNew) throws IllegalArgumentException, BadItemTypeException, BadDataPathCardinalityException
ModifiableDataHolder
getComposite
in interface ModifiableDataHolder
getComposite
in interface ModifiableModelLessDataHolder
compositePath
- 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 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 multiplepublic ModifiableModelLessRepeater getRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, BadItemTypeException
ModifiableDataHolder
getRepeater
in interface ModifiableDataHolder
getRepeater
in interface ModifiableModelLessDataHolder
repeaterPath
- 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 emptyBadItemTypeException
- if the value stored in the repository at the given path is not a repeaterpublic void setValue(String dataPath, Object value) throws IllegalArgumentException, UnknownTypeException, NotUniqueTypeException, UnknownDataException, BadDataPathCardinalityException
ModifiableModelLessDataHolder
setValue
in interface ModifiableModelLessDataHolder
dataPath
- path of the datavalue
- the value to setIllegalArgumentException
- if the given data path is null or emptyUnknownTypeException
- if there is no available type compatible with the given value for this data holder's type extension pointNotUniqueTypeException
- if there is more than one available types compatibles with the given value for this data holder's type extension pointUnknownDataException
- if given the data path is composed of an inexisting groupBadDataPathCardinalityException
- if the value of a part of the data path is multiple. Only the last part can be multiplepublic void setValue(String dataPath, Object value, String dataTypeId) throws IllegalArgumentException, UnknownTypeException, BadItemTypeException, UnknownDataException, BadDataPathCardinalityException
ModifiableModelLessDataHolder
setValue
in interface ModifiableModelLessDataHolder
dataPath
- path of the datavalue
- the value to setdataTypeId
- type identifier of the dataIllegalArgumentException
- if the given data path is null or emptyUnknownTypeException
- if the given type is not available for this data holder's type extension pointBadItemTypeException
- if the given type doesn't match the given value to setUnknownDataException
- if the given data path is composed of an inexisting groupBadDataPathCardinalityException
- if the value of a part of the data path is multiple. Only the last part can be multiplepublic void removeValue(String dataPath) throws IllegalArgumentException, UnknownDataException, BadDataPathCardinalityException
ModifiableDataHolder
removeValue
in interface ModifiableDataHolder
removeValue
in interface ModifiableModelLessDataHolder
dataPath
- path of the dataIllegalArgumentException
- if the given data path is null or emptyUnknownDataException
- if the value at the given data path does not existBadDataPathCardinalityException
- if the value of a part of the data path is multiple. Only the last part can be multiplepublic void setPosition(int position) throws IllegalArgumentException
ModifiableRepeaterEntry
setPosition
in interface ModifiableRepeaterEntry
position
- The new position of the entryIllegalArgumentException
- if the position is not between the negative and positive repeater sizeprotected ModifiableModelLessDataHolder getDefaultDataHolder()
AbstractComposite
DataHolder
to usegetDefaultDataHolder
in class ModelLessRepeaterEntry
DataHolder