@PublicApi public class InMemoryDataHolder extends Object implements ImportDataHolder
Modifier and Type | Method and Description |
---|---|
String |
asPrintableString(boolean includeData) |
static ImportDataHolder |
createInMemoryDataHolder(List<DataEntry> dataEntries)
Creates a simple in memory import data holder.
|
static ImportDataHolder |
createNoDataToImport()
No data found and the import should not consider this as a result since the import can complete but the user does
not expect any data to be imported
|
static ImportDataHolder |
createWithParseResult(List<DataEntry> dataEntries,
ExternalDataParseResult externalDataParseResult)
Create an inMemoryDataHolder with an external data parse result message.
|
static ImportDataHolder |
createWithWarning(List<DataEntry> dataEntries,
String warningMessage)
Create an inMemoryDataHolder with warning message.
|
boolean |
dataToImport()
Used to indicate if data exist to import.
|
boolean |
hasNext()
Return true if a call to nextEntry will return more data.
|
DataEntry |
nextEntry()
Reads an object entry.
|
int |
numberOfEntries()
Returns the number of entries that this data holder contains
|
ExternalDataParseResult |
parsedResult()
Was all external data parsed? This is a way to inform the import that the data holder may not be complete.
|
public static ImportDataHolder createInMemoryDataHolder(List<DataEntry> dataEntries)
public static ImportDataHolder createWithWarning(List<DataEntry> dataEntries, String warningMessage)
public static ImportDataHolder createWithParseResult(List<DataEntry> dataEntries, ExternalDataParseResult externalDataParseResult)
public static ImportDataHolder createNoDataToImport()
public String asPrintableString(boolean includeData)
asPrintableString
in interface ImportDataHolder
public boolean hasNext()
ImportDataHolder
hasNext
in interface ImportDataHolder
public DataEntry nextEntry()
ImportDataHolder
nextEntry
in interface ImportDataHolder
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)public int numberOfEntries()
ImportDataHolder
numberOfEntries
in interface ImportDataHolder
public boolean dataToImport()
ImportDataHolder
dataToImport
in interface ImportDataHolder
public ExternalDataParseResult parsedResult()
ImportDataHolder
parsedResult
in interface ImportDataHolder
Copyright © 2024 Atlassian. All rights reserved.