use of com.runwaysdk.localization.LocalizationExcelExporter in project geoprism-registry by terraframe.
the class LocalizationService method exportSpreadsheetInRequest.
@Request(RequestType.SESSION)
public InputStreamResponse exportSpreadsheetInRequest(String sessionId) {
ServiceFactory.getRolePermissionService().enforceSRA();
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
BufferedOutputStream buffer = new BufferedOutputStream(bytes);
LocalizationExcelExporter exporter = new LocalizationExcelExporter(buildConfig(), buffer);
exporter.export();
ByteArrayInputStream is = new ByteArrayInputStream(bytes.toByteArray());
return new InputStreamResponse(is, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "localization.xlsx");
}
Aggregations