From 15155e7982aae85375e19a7d1e90006640b90586 Mon Sep 17 00:00:00 2001 From: Newatia Date: Sat, 5 Nov 2022 10:04:15 -0400 Subject: [PATCH] fixed export --- .../application/controllers/ApplicationController.java | 4 ++++ .../applicationall/controllers/ApplicationAllController.java | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/controllers/ApplicationController.java b/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/controllers/ApplicationController.java index 5302d19..f27bdf9 100644 --- a/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/controllers/ApplicationController.java +++ b/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/controllers/ApplicationController.java @@ -100,6 +100,7 @@ protected Stream filterStream(Stream stream, boolean p return stream; } + /* @PreAuthorize("isAuthenticated()") @GetGsrsRestApiMapping("/export/{etagId}/{format}") public ResponseEntity createExport(@PathVariable("etagId") String etagId, @@ -142,6 +143,7 @@ public ResponseEntity createExport(@PathVariable("etagId") String etagId return new ResponseEntity<>(GsrsControllerUtil.enhanceWithView(p.getMetaData(), parameters), HttpStatus.OK); } + */ /* public ResponseEntity createExport(@PathVariable("etagId") String etagId, @PathVariable("format") String format, @RequestParam(value = "publicOnly", required = false) Boolean publicOnlyObj, @RequestParam(value = "filename", required = false) String fileName, Principal prof, @RequestParam Map parameters) throws Exception { @@ -173,6 +175,7 @@ public ResponseEntity createExport(@PathVariable("etagId") String etagId } */ + /* private Exporter getExporterFor(String extension, OutputStream pos, boolean publicOnly, Map parameters) throws IOException { ExporterFactory.Parameters params = this.createParamters(extension, publicOnly, parameters); ExporterFactory factory = this.gsrsExportConfiguration.getExporterFor(this.getEntityService().getContext(), params); @@ -182,6 +185,7 @@ private Exporter getExporterFor(String extension, OutputStream pos, return factory.createNewExporter(pos, params); } } + */ @GetGsrsRestApiMapping("/applicationhistory/{applicationId}") public ResponseEntity findApplicationHistoryByApplicationId(@PathVariable("applicationId") String applicationId) throws Exception { diff --git a/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/applicationall/controllers/ApplicationAllController.java b/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/applicationall/controllers/ApplicationAllController.java index 0bdc42d..0ce18ec 100644 --- a/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/applicationall/controllers/ApplicationAllController.java +++ b/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/applicationall/controllers/ApplicationAllController.java @@ -99,6 +99,7 @@ protected Stream filterStream(Stream stream, boo return stream; } + /* @PreAuthorize("isAuthenticated()") @GetGsrsRestApiMapping("/export/{etagId}/{format}") public ResponseEntity createExport(@PathVariable("etagId") String etagId, @@ -141,6 +142,8 @@ public ResponseEntity createExport(@PathVariable("etagId") String etagId return new ResponseEntity<>(GsrsControllerUtil.enhanceWithView(p.getMetaData(), parameters), HttpStatus.OK); } + */ + /* public ResponseEntity createExport(@PathVariable("etagId") String etagId, @PathVariable("format") String format, @RequestParam(value = "publicOnly", required = false) Boolean publicOnlyObj, @RequestParam(value = "filename", required = false) String fileName, Principal prof, @RequestParam Map parameters) throws Exception { @@ -171,6 +174,7 @@ public ResponseEntity createExport(@PathVariable("etagId") String etagId } */ + /* private Exporter getExporterFor(String extension, OutputStream pos, boolean publicOnly, Map parameters) throws IOException { ExporterFactory.Parameters params = this.createParamters(extension, publicOnly, parameters); ExporterFactory factory = this.gsrsExportConfiguration.getExporterFor(this.getEntityService().getContext(), params); @@ -180,6 +184,7 @@ private Exporter getExporterFor(String extension, OutputStream p return factory.createNewExporter(pos, params); } } + */ @GetGsrsRestApiMapping("/distcenter/{substanceKey}") public ResponseEntity findCenterBySubstanceKey(@PathVariable("substanceKey") String substanceKey) throws Exception {