Package org.jboss.seam.reports.spi

Examples of org.jboss.seam.reports.spi.ReportOutputBinding


    @Inject
    private BeanManager bm;

    @Override
    public void render(PentahoSeamReport report, OutputStream output) throws ReportException {
        ReportOutputBinding an = getAnnotation(ip.getAnnotated(), ReportOutputBinding.class, bm);
        MasterReport mr = report.getDelegate();
        try {
            if ("PDF".equals(an.value())) {
                PdfReportUtil.createPDF(mr, output);
            } else if ("XLS".equals(an.value())) {
                ExcelReportUtil.createXLS(mr, output);
            } else if ("CSV".equals(an.value())) {
                CSVReportUtil.createCSV(mr, output, "UTF-8");
            } else if ("XML".equals(an.value())) {
                XmlTableReportUtil.createStreamXML(mr, output);
            } else {
                throw new ReportException("Unknown output format: " + an);
            }
        } catch (ReportProcessingException ex) {
View Full Code Here


    }

    @SuppressWarnings("unchecked")
    protected Class<JRExporter> getExporterClass() {
        Class<JRExporter> clazz;
        ReportOutputBinding an = getReportOutputBinding();
        String value = an.value();
        String outputType = firstLetterCaps(value);
        String className = RENDERER_PREFIX + outputType + RENDERER_SUFFIX;
        try {
            clazz = (Class<JRExporter>) Reflections.classForName(className);
        } catch (ClassNotFoundException cnfe) {
View Full Code Here

        }
        return clazz;
    }

    protected ReportOutputBinding getReportOutputBinding() {
        ReportOutputBinding an = getAnnotation(injectionPoint.getAnnotated(), ReportOutputBinding.class, beanManager);
        return an;
    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.reports.spi.ReportOutputBinding

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.