ImportExportService¶
-
public interface
ImportExportService¶ The
ImportExportServiceinterface provides methods for importing and exporting entities schema and data in json format.See also:
org.motechproject.mds.domain.ImportExportBlueprint
Methods¶
exportEntities¶
-
void
exportEntities(ImportExportBlueprint blueprint, Writer writer)¶ Exports entities schema and/or instances based on provided blueprint.
Parameters: - blueprint – export blueprint containing information which entities to export and what to include
- writer – the writer used for output
importEntities¶
-
void
importEntities(String importId, ImportExportBlueprint blueprint)¶ Imports entities schema and/or instances from previously stored import file.
Parameters: - importId – previously saved import file id
- blueprint – import blueprint containing information which entities to import and what to include
saveImportFileAndExtractManifest¶
-
ImportManifest
saveImportFileAndExtractManifest(byte[] bytes)¶ Saves uploaded import file to temporary location, validates it and extracts
org.motechproject.mds.domain.ImportManifestfrom it.Parameters: - bytes – binary file representation
Returns: import manifest extracted from saved file