use of io.apiman.manager.api.exportimport.write.IExportWriter in project apiman by apiman.
the class ExportImportManager method doExport.
private void doExport() {
IExportWriter writer = eiFactories.get(config.getProvider()).createWriter(config, exportLogger);
exporter.init(writer);
exporter.export();
}
use of io.apiman.manager.api.exportimport.write.IExportWriter in project apiman by apiman.
the class SystemResourceImpl method exportData.
/**
* @see ISystemResource#exportData()
*/
@Override
public Response exportData() {
final IApimanLogger exportLogger = ApimanLoggerFactory.getLogger(IExportWriter.class);
StreamingOutput stream = new StreamingOutput() {
@Override
public void write(OutputStream os) throws IOException, WebApplicationException {
IExportWriter writer = new JsonExportWriter(os, exportLogger);
exporter.init(writer);
exporter.export();
os.flush();
}
};
return Response.ok(stream, MediaType.APPLICATION_JSON).header("Content-Disposition", // $NON-NLS-1$ //$NON-NLS-2$
"attachment; filename=api-manager-export.json").build();
}
Aggregations