public class ModifiableModelLessRepeater extends ModelLessRepeater implements ModifiableRepeater
Modifier and Type | Field and Description |
---|---|
protected ModifiableRepositoryData |
_modifiableRepositoryData
Modifiable repository data to use to store entries in the repository
|
_typeExtensionPoint
_repositoryData
Constructor and Description |
---|
ModifiableModelLessRepeater(AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> typeExtensionPoint,
ModifiableRepositoryData repositoryData)
Creates a modifiable model free repeater
|
Modifier and Type | Method and Description |
---|---|
ModifiableModelLessRepeaterEntry |
addEntry()
Creates a Repeater entry at the last position.
|
ModifiableModelLessRepeaterEntry |
addEntry(int position)
Creates a Repeater entry at the given position.
|
List<? extends ModifiableModelLessRepeaterEntry> |
getEntries()
Retrieves the repeater entries, sorted by position
|
ModifiableModelLessRepeaterEntry |
getEntry(int position)
Retrieves the repeater entry at the given position.
|
void |
moveEntries(Map<Integer,Integer> positionsMapping)
Moves the entries according to the given position mapping.
|
void |
removeEntry(int position)
Removes the repeater entry at the given position.
|
copyTo, getSize, hasEntry, moveEntries, removeEntry
protected ModifiableRepositoryData _modifiableRepositoryData
public ModifiableModelLessRepeater(AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> typeExtensionPoint, ModifiableRepositoryData repositoryData)
typeExtensionPoint
- the extension point to use to get available element typesrepositoryData
- the repository data to usepublic List<? extends ModifiableModelLessRepeaterEntry> getEntries()
Repeater
getEntries
in interface Repeater
getEntries
in class ModelLessRepeater
public ModifiableModelLessRepeaterEntry getEntry(int position)
Repeater
getEntry
in interface ModifiableRepeater
getEntry
in interface Repeater
getEntry
in class ModelLessRepeater
position
- the position of the entry to retrievenull
if there is no entry at this positionpublic ModifiableModelLessRepeaterEntry addEntry()
ModifiableRepeater
addEntry
in interface ModifiableRepeater
public ModifiableModelLessRepeaterEntry addEntry(int position) throws IllegalArgumentException
ModifiableRepeater
addEntry
in interface ModifiableRepeater
position
- The position of the new entryIllegalArgumentException
- if the position is not between the negative and positive repeater sizepublic void moveEntries(Map<Integer,Integer> positionsMapping)
ModifiableRepeater
moveEntries
in interface ModifiableRepeater
positionsMapping
- the position mappingpublic void removeEntry(int position) throws UnknownDataException
ModifiableRepeater
removeEntry
in interface ModifiableRepeater
position
- The position of the entry to removeUnknownDataException
- if there is no entry at the given position