Interface Repeater
-
- All Known Subinterfaces:
ModifiableRepeater
- All Known Implementing Classes:
ModelAwareRepeater,ModifiableModelAwareRepeater
public interface Repeater
Interface for repeaters
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcopyTo(ModifiableRepeater repeater)Copies the currentRepeaterto the givenModifiableRepeater.default voiddataToSAX(ContentHandler contentHandler, String dataPath)Generates SAX events for the data at the given data path in the currentDataHolderDo not generate any event if there is no values at the given pathvoiddataToSAX(ContentHandler contentHandler, String dataPath, DataContext context)Generates SAX events for the data at the given data path in the currentDataHolderDo not generate any event if there is no values at the given pathList<? extends RepeaterEntry>getEntries()Retrieves the repeater entries, sorted by positionRepeaterEntrygetEntry(int position)Retrieves the repeater entry at the given position.DataHoldergetParentDataHolder()Retrieves the parent of the currentRepeaterRepositoryDatagetRepositoryData()Retrieves the repository data used by thisRepeaterDataHoldergetRootDataHolder()Retrieves the rootDataHolderof the current repeaterintgetSize()Retrieves the size of the repeaterbooleanhasEntry(int position)Determines if the repeater has an entry at the given position.
-
-
-
Method Detail
-
getEntries
List<? extends RepeaterEntry> getEntries()
Retrieves the repeater entries, sorted by position- Returns:
- the repeater entries
-
getEntry
RepeaterEntry getEntry(int position)
Retrieves the repeater entry at the given position. The position starts at index 1. The position can be an integer between 1 and the repeater size to get an entry from the beginning Or the position can an integer between 0 and - the repeater size to get an entry from the end (0 means at the end, -1 means before the last one and so on)- Parameters:
position- the position of the entry to retrieve- Returns:
- the repeater entry,
nullif there is no entry at this position
-
getSize
int getSize()
Retrieves the size of the repeater- Returns:
- the size of the repeater
-
hasEntry
boolean hasEntry(int position)
Determines if the repeater has an entry at the given position. The position starts at index 1. The position can be an integer between 1 and the repeater size to get an entry from the beginning Or the position can an integer between 0 and - the repeater size to get an entry from the end (0 means at the end, -1 means before the last one and so on)- Parameters:
position- the position- Returns:
trueif the repeater has an entry at the given position,falseotherwise
-
copyTo
void copyTo(ModifiableRepeater repeater) throws UndefinedItemPathException, BadItemTypeException
Copies the currentRepeaterto the givenModifiableRepeater.- Parameters:
repeater- The destination repeater. Can not be null.- Throws:
UndefinedItemPathException- if one of the copied data is not defined by the model of the destinationModifiableModelAwareRepeaterBadItemTypeException- if the type defined by the model of the destinationModifiableModelAwareRepeaterdoesn't match the copied value
-
dataToSAX
default void dataToSAX(ContentHandler contentHandler, String dataPath) throws SAXException, IOException
Generates SAX events for the data at the given data path in the currentDataHolderDo not generate any event if there is no values at the given path- Parameters:
contentHandler- theContentHandlerthat will receive the SAX eventsdataPath- the path of the data to SAX- Throws:
SAXException- if an error occurs during the SAX events generationIOException- if an error occurs while reading a value using the I/O API
-
dataToSAX
void dataToSAX(ContentHandler contentHandler, String dataPath, DataContext context) throws SAXException, IOException
Generates SAX events for the data at the given data path in the currentDataHolderDo not generate any event if there is no values at the given path- Parameters:
contentHandler- theContentHandlerthat will receive the SAX eventsdataPath- the path of the data to SAXcontext- The context of the data to SAX- Throws:
SAXException- if an error occurs during the SAX events generationIOException- if an error occurs while reading a value using the I/O API
-
getRepositoryData
RepositoryData getRepositoryData()
Retrieves the repository data used by thisRepeater- Returns:
- the repository data used by this
Repeater
-
getParentDataHolder
DataHolder getParentDataHolder()
Retrieves the parent of the currentRepeater- Returns:
- the parent of the current
Repeater
-
getRootDataHolder
DataHolder getRootDataHolder()
Retrieves the rootDataHolderof the current repeater- Returns:
- the root
DataHolder
-
-