Package de.samply.reporter.app
Class ReporterController
java.lang.Object
de.samply.reporter.app.ReporterController
-
Constructor Summary
ConstructorsConstructorDescriptionReporterController(String httpRelativePath, String httpServletRequestScheme, ReportGenerator reportGenerator, ReportTemplateManager reportTemplateManager, ReportMetaInfoManager reportMetaInfoManager, ExporterClient exporterClient) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntityfetchAllReports(Integer page, Integer pageSize) org.springframework.http.ResponseEntity<Logs[]>org.springframework.http.ResponseEntity<org.springframework.core.io.InputStreamResource>fetchReport(String reportId) org.springframework.http.ResponseEntity<org.springframework.core.io.InputStreamResource>fetchReporTemplate(String reportTemplateId) org.springframework.http.ResponseEntity<ReportStatus>fetchReportStatus(String reportId) org.springframework.http.ResponseEntityorg.springframework.http.ResponseEntity<String[]>org.springframework.http.ResponseEntity<String>generate(jakarta.servlet.http.HttpServletRequest httpServletRequest, String templateId, String exportUrl, String contentType, Boolean isInternalRequest, String template) org.springframework.http.ResponseEntity<String>info()
-
Constructor Details
-
ReporterController
public ReporterController(@Value("${HTTP_RELATIVE_PATH:}") String httpRelativePath, @Value("${HTTP_SERVLET_REQUEST_SCHEME:http}") String httpServletRequestScheme, ReportGenerator reportGenerator, ReportTemplateManager reportTemplateManager, ReportMetaInfoManager reportMetaInfoManager, ExporterClient exporterClient)
-
-
Method Details
-
info
-
generate
@PostMapping("/generate") public org.springframework.http.ResponseEntity<String> generate(jakarta.servlet.http.HttpServletRequest httpServletRequest, @RequestParam(name="template-id",required=false) String templateId, @RequestParam(name="export-url",required=false) String exportUrl, @RequestHeader(name="Content-Type",required=false) String contentType, @RequestHeader(name="internal-request",required=false) Boolean isInternalRequest, @RequestBody(required=false) String template) throws ReportGeneratorException, ReportMetaInfoManagerException, com.fasterxml.jackson.core.JsonProcessingException - Throws:
ReportGeneratorExceptionReportMetaInfoManagerExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
fetchReport
@GetMapping(value="/report", produces="application/octet-stream") public org.springframework.http.ResponseEntity<org.springframework.core.io.InputStreamResource> fetchReport(@RequestParam(name="report-id") String reportId) throws ReportMetaInfoManagerException, FileNotFoundException -
fetchAllReports
@GetMapping("/reports-list") public org.springframework.http.ResponseEntity fetchAllReports(@RequestParam(name="page",required=false) Integer page, @RequestParam(name="page-size",required=false) Integer pageSize) throws ReportMetaInfoManagerException - Throws:
ReportMetaInfoManagerException
-
fetchReportStatus
@GetMapping("/report-status") public org.springframework.http.ResponseEntity<ReportStatus> fetchReportStatus(@RequestParam(name="report-id") String reportId) throws ReportMetaInfoManagerException - Throws:
ReportMetaInfoManagerException
-
fetchLogs
@GetMapping("/logs") public org.springframework.http.ResponseEntity<Logs[]> fetchLogs(@RequestParam(name="logs-size") int logsSize, @RequestParam(name="logs-last-line-reporter",required=false) String logsLastLine, @RequestParam(name="logs-last-line-exporter",required=false) String exporterLogsLastLine) -
fetchTemplateIds
@GetMapping("/report-template-ids") public org.springframework.http.ResponseEntity<String[]> fetchTemplateIds() -
fetchReporTemplate
@GetMapping(value="/report-template", produces="application/octet-stream") public org.springframework.http.ResponseEntity<org.springframework.core.io.InputStreamResource> fetchReporTemplate(@RequestParam(name="template-id") String reportTemplateId) throws FileNotFoundException - Throws:
FileNotFoundException
-
fetchRunningReports
@GetMapping("/running-reports") public org.springframework.http.ResponseEntity fetchRunningReports() throws ReportMetaInfoManagerException- Throws:
ReportMetaInfoManagerException
-