public class ModifiableModelAwareRepeaterEntry extends ModelAwareRepeaterEntry implements ModifiableRepeaterEntry, ModifiableModelAwareDataHolder
Modifier and Type | Field and Description |
---|---|
protected RepeaterDefinition |
_definition
the definition of the repeater
|
protected ModifiableModelAwareDataHolder |
_modifiableDdefaultDataHolder
the default implementation of a
ModifiableModelAwareDataHolder to use |
protected ModifiableModelAwareRepeater |
_repeater
the repeater containing this entry
|
_defaultDataHolder
_modifiableRepositoryData
_repositoryData
Constructor and Description |
---|
ModifiableModelAwareRepeaterEntry(ModifiableRepositoryData repositoryData,
RepeaterDefinition definition,
ModifiableModelAwareRepeater repeater)
Creates a modifiable model aware repeater entry
|
Modifier and Type | Method and Description |
---|---|
ModifiableModelAwareComposite |
getComposite(String compositePath)
Retrieves the composite at the given path
|
ModifiableModelAwareComposite |
getComposite(String compositePath,
boolean createNew)
Retrieves the composite at the given path
|
protected ModifiableModelAwareDataHolder |
getDefaultDataHolder()
Retrieves the default implementation of a
DataHolder to use |
ModifiableModelAwareRepeater |
getRepeater(String repeaterPath)
Retrieves the repeater at the given path
|
ModifiableModelAwareRepeater |
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
|
copyTo, getType, getValue, getValue, 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, hasValue, isMultiple, toSAX, toSAX
protected RepeaterDefinition _definition
protected ModifiableModelAwareRepeater _repeater
protected ModifiableModelAwareDataHolder _modifiableDdefaultDataHolder
ModifiableModelAwareDataHolder
to usepublic ModifiableModelAwareRepeaterEntry(ModifiableRepositoryData repositoryData, RepeaterDefinition definition, ModifiableModelAwareRepeater repeater)
repositoryData
- the repository data of the repeater entrydefinition
- the definition of the repeaterrepeater
- the repeater containing this entrypublic ModifiableModelAwareComposite getComposite(String compositePath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModelAwareDataHolder
getComposite
in interface DataHolder
getComposite
in interface ModelAwareDataHolder
getComposite
in interface ModifiableDataHolder
getComposite
in interface ModifiableModelAwareDataHolder
getComposite
in class ModelAwareRepeaterEntry
compositePath
- path of the composite to retrievenull
if not existsIllegalArgumentException
- if the given composite path is null or emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the value stored in the repository 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 multiplepublic ModifiableModelAwareRepeater getRepeater(String repeaterPath) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModelAwareDataHolder
getRepeater
in interface DataHolder
getRepeater
in interface ModelAwareDataHolder
getRepeater
in interface ModifiableDataHolder
getRepeater
in interface ModifiableModelAwareDataHolder
getRepeater
in class ModelAwareRepeaterEntry
repeaterPath
- path of the repeater to retrievenull
if not existsIllegalArgumentException
- if the given repeater path is null or emptyUndefinedItemPathException
- if the given repeater path is not defined by the modelBadItemTypeException
- if the value stored in the repository 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 multiplepublic ModifiableModelAwareComposite getComposite(String compositePath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModifiableDataHolder
getComposite
in interface ModifiableDataHolder
getComposite
in interface ModifiableModelAwareDataHolder
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 emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the value stored in the repository 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 multiplepublic ModifiableModelAwareRepeater getRepeater(String repeaterPath, boolean createNew) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModifiableDataHolder
getRepeater
in interface ModifiableDataHolder
getRepeater
in interface ModifiableModelAwareDataHolder
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 emptyUndefinedItemPathException
- if the given composite path is not defined by the modelBadItemTypeException
- if the value stored in the repository 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 multiplepublic void setValue(String dataPath, Object value) throws IllegalArgumentException, UndefinedItemPathException, BadItemTypeException, BadDataPathCardinalityException
ModifiableModelAwareDataHolder
setValue
in interface ModifiableModelAwareDataHolder
dataPath
- path of the datavalue
- the value to set. The type of this value will be given by the model, but if not model is associated to the path, an UnsupportedOperationException
is thrown. Use the 3 arguments versions in that case.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 given value to setBadDataPathCardinalityException
- if the definition of a part of the data path is multiple. Only the last part can be multiplepublic void removeValue(String dataPath) throws IllegalArgumentException, UndefinedItemPathException, UnknownDataException, BadDataPathCardinalityException
ModifiableDataHolder
removeValue
in interface ModifiableDataHolder
removeValue
in interface ModifiableModelAwareDataHolder
dataPath
- path of the dataIllegalArgumentException
- if the given data path is null or emptyUndefinedItemPathException
- if the given data path is not defined by the modelUnknownDataException
- if the value at the given data path does not existBadDataPathCardinalityException
- if the definition 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 ModifiableModelAwareDataHolder getDefaultDataHolder()
AbstractComposite
DataHolder
to usegetDefaultDataHolder
in class ModelAwareRepeaterEntry
DataHolder