Package io.jmix.dataimport
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:
- XLSX: an Excel file in which one row represents one entity to import
- CSV: a CSV file in which one row represents one entity to import
- JSON: a JSON file that has an object array as a root node in which one object represents one entity to import
- 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 TypeMethodDescriptionimportData
(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 givenImportedData
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
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 configurationcontent
- source (XLSX, CSV, JSON, XML) that contains data for the entities to import- Returns:
- object that contains result of import execution
-
importData
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 configurationinputStream
- source (XLSX, CSV, JSON, XML) that contains data for the entities to import- Returns:
- object that contains result of import execution
-
importData
Creates the entities using data from the givenImportedData
object and specified import configuration and saves these entities to the database.- Parameters:
configuration
- import configurationimportedData
- imported data- Returns:
- object that contains result of import execution
-