Interface DataImporter

All Known Implementing Classes:
DataImporterImpl

public interface DataImporter
API to import entities from the input data using specified import configuration. Supported formats of the input data:
  1. XLSX: an Excel file in which one row represents one entity to import
  2. CSV: a CSV file in which one row represents one entity to import
  3. JSON: a JSON file that has an object array as a root node in which one object represents one entity to import
  4. XML: a XML file that has one root tag containing child tags with equal structure. One child tag represents one entity to import.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    importData(ImportConfiguration configuration, byte[] content)
    Creates the entities using data from the given byte array (XLSX, CSV, JSON, XML) and specified import configuration and saves these entities to the database.
    importData(ImportConfiguration configuration, ImportedData importedData)
    Creates the entities using data from the given ImportedData object and specified import configuration and saves these entities to the database.
    importData(ImportConfiguration configuration, InputStream inputStream)
    Creates the entities using data from the given input stream (XLSX, CSV, JSON, XML) and specified import configuration and saves these entities to the database.
  • Method Details

    • importData

      ImportResult importData(ImportConfiguration configuration, byte[] content)
      Creates the entities using data from the given byte array (XLSX, CSV, JSON, XML) and specified import configuration and saves these entities to the database.
      Parameters:
      configuration - import configuration
      content - source (XLSX, CSV, JSON, XML) that contains data for the entities to import
      Returns:
      object that contains result of import execution
    • importData

      ImportResult importData(ImportConfiguration configuration, InputStream inputStream)
      Creates the entities using data from the given input stream (XLSX, CSV, JSON, XML) and specified import configuration and saves these entities to the database.
      Parameters:
      configuration - import configuration
      inputStream - source (XLSX, CSV, JSON, XML) that contains data for the entities to import
      Returns:
      object that contains result of import execution
    • importData

      ImportResult importData(ImportConfiguration configuration, ImportedData importedData)
      Creates the entities using data from the given ImportedData object and specified import configuration and saves these entities to the database.
      Parameters:
      configuration - import configuration
      importedData - imported data
      Returns:
      object that contains result of import execution