java.lang.Object
com.riadalabs.jira.plugins.insight.services.imports.common.external.IteratorDataHolder
All Implemented Interfaces:
ImportDataHolder

@PublicApi public class IteratorDataHolder extends Object implements ImportDataHolder
  • Constructor Details

  • Method Details

    • asPrintableString

      public String asPrintableString(boolean includeData)
      Specified by:
      asPrintableString in interface ImportDataHolder
    • 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 interface ImportDataHolder
    • nextEntry

      public DataEntry 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 interface ImportDataHolder
      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 interface ImportDataHolder
    • 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 interface ImportDataHolder
    • parsedResult

      public ExternalDataParseResult 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 interface ImportDataHolder
      Returns:
      the ExternalDataParseResult