use of org.motechproject.mds.json.ExportContext in project motech by motech.
the class ImportExportServiceImpl method exportEntities.
@Override
@Transactional
public void exportEntities(ImportExportBlueprint blueprint, Writer writer) {
try (JsonWriter jsonWriter = new JsonWriter(writer)) {
jsonWriter.setIndent(" ");
ExportContext exportContext = new ExportContext(sortBlueprintRecords(blueprint), bundleContext, allEntities);
ExportWriter exportWriter = new ExportWriter(jsonWriter, exportContext);
exportWriter.export();
} catch (IOException e) {
throw new ImportExportException("An IO error occurred during export.", e);
}
}
Aggregations