Class IteratorDataHolder
java.lang.Object
com.riadalabs.jira.plugins.insight.services.imports.common.external.IteratorDataHolder
- All Implemented Interfaces:
ImportDataHolder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasPrintableString
(boolean includeData) boolean
Used to indicate if data exist to import.boolean
hasNext()
Return true if a call to nextEntry will return more data.Reads an object entry.int
Returns the number of entries that this data holder containsWas all external data parsed?
-
Constructor Details
-
IteratorDataHolder
-
-
Method Details
-
asPrintableString
- Specified by:
asPrintableString
in interfaceImportDataHolder
-
hasNext
public boolean hasNext()Description copied from interface:ImportDataHolder
Return true if a call to nextEntry will return more data. Returns false when all data has been read- Specified by:
hasNext
in interfaceImportDataHolder
-
nextEntry
Description copied from interface:ImportDataHolder
Reads an object entry. Returns a list of strings that represents the data read from the external source. The list should contain all information required to create one object. I.e. all the relevant attributes represented by the data locators should be present. E.g. in the CSV file this will be one row in the file.- Specified by:
nextEntry
in interfaceImportDataHolder
- Returns:
- the next entry to be handled. Can return
null
to indicate that all data has been processed. An empty list will be treated as end of data and no more data will be read (the same as with null)
-
numberOfEntries
public int numberOfEntries()Description copied from interface:ImportDataHolder
Returns the number of entries that this data holder contains- Specified by:
numberOfEntries
in interfaceImportDataHolder
-
dataToImport
public boolean dataToImport()Description copied from interface:ImportDataHolder
Used to indicate if data exist to import. Notice that there is a difference between numberOfEntries != 0 and dataToImport = false. If dataToImport is false the handling of missing objects will be ignored but if the dataToImport is true and numberOfEntries = 0 all objects will be considered as missing objects and handled accordingly- Specified by:
dataToImport
in interfaceImportDataHolder
-
parsedResult
Description copied from interface:ImportDataHolder
Was all external data parsed? This is a way to inform the import that the data holder may not be complete. A way for the import module to indicate that something is wrong but the error is minor and the import can continue anyway- Specified by:
parsedResult
in interfaceImportDataHolder
- Returns:
- the ExternalDataParseResult
-