All Known Implementing Classes:
FileBasedInternalImportDataHolder, InMemoryDataHolder, InMemoryInternalDataHolder, InternalImportDataHolder

@PublicApi public interface ImportDataHolder
Used to represent the data that are about to be imported. The data holder will have to be implemented by each Assets Import Module
Since:
5.0
Author:
Fredrik Karbing
  • Method Details

    • asPrintableString

      String asPrintableString(boolean includeData)
    • hasNext

      boolean hasNext()
      Return true if a call to nextEntry will return more data. Returns false when all data has been read
    • nextEntry

      DataEntry nextEntry()
      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.
      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

      int numberOfEntries()
      Returns the number of entries that this data holder contains
    • dataToImport

      boolean dataToImport()
      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
    • parsedResult

      ExternalDataParseResult parsedResult()
      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
      Returns:
      the ExternalDataParseResult