Package org.apache.syncope.common.types

Examples of org.apache.syncope.common.types.ReportExecExportFormat


        } catch (IOException e) {
            throw new IllegalStateException("Could not get output stream", e);
        }
        ReportExec reportExec = getAndCheckReportExecInternal(executionId);

        ReportExecExportFormat format = (fmt == null) ? ReportExecExportFormat.XML : fmt;

        response.setContentType(MediaType.APPLICATION_OCTET_STREAM);
        response.addHeader(SyncopeConstants.CONTENT_DISPOSITION_HEADER,
                "attachment; filename=" + reportExec.getReport().getName() + "." + format.name().toLowerCase());

        exportExecutionResultInternal(os, reportExec, format);
    }
View Full Code Here


        return reportController.readExecution(executionId);
    }

    @Override
    public Response exportExecutionResult(final Long executionId, final ReportExecExportFormat fmt) {
        final ReportExecExportFormat format = (fmt == null) ? ReportExecExportFormat.XML : fmt;
        final ReportExec reportExec = reportController.getAndCheckReportExecInternal(executionId);
        StreamingOutput sout = new StreamingOutput() {

            @Override
            public void write(final OutputStream os) throws IOException {
                reportController.exportExecutionResultInternal(os, reportExec, format);
            }
        };
        String disposition = "attachment; filename=" + reportExec.getReport().getName() + "." + format.name().
                toLowerCase();
        return Response.ok(sout)
                .header(SyncopeConstants.CONTENT_DISPOSITION_HEADER, disposition)
                .build();
    }
View Full Code Here

        } catch (IOException e) {
            throw new IllegalStateException("Could not get output stream", e);
        }
        ReportExec reportExec = getAndCheckReportExecInternal(executionId);

        ReportExecExportFormat format = (fmt == null) ? ReportExecExportFormat.XML : fmt;

        response.setContentType(MediaType.APPLICATION_OCTET_STREAM);
        response.addHeader(SyncopeConstants.CONTENT_DISPOSITION_HEADER,
                "attachment; filename=" + reportExec.getReport().getName() + "." + format.name().toLowerCase());

        exportExecutionResultInternal(os, reportExec, format);
    }
View Full Code Here

        return controller.readExecution(executionId);
    }

    @Override
    public Response exportExecutionResult(final Long executionId, final ReportExecExportFormat fmt) {
        final ReportExecExportFormat format = (fmt == null) ? ReportExecExportFormat.XML : fmt;
        final ReportExec reportExec = controller.getAndCheckReportExec(executionId);
        StreamingOutput sout = new StreamingOutput() {

            @Override
            public void write(final OutputStream os) throws IOException {
                controller.exportExecutionResult(os, reportExec, format);
            }
        };
        String disposition = "attachment; filename=" + reportExec.getReport().getName() + "." + format.name().
                toLowerCase();
        return Response.ok(sout).
                header(HttpHeaders.CONTENT_DISPOSITION, disposition).
                build();
    }
View Full Code Here

TOP

Related Classes of org.apache.syncope.common.types.ReportExecExportFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.