Package uk.gov.nationalarchives.droid.report.interfaces

Examples of uk.gov.nationalarchives.droid.report.interfaces.ReportSpec


            }
            //FIXME: if there are no reports defined, value is not a ReportSpec
            // and we get an invalid cast operation here.  There must be a better
            // fix than testing for instance of ReportSpec...?
            if (value instanceof ReportSpec) {
                ReportSpec spec = (ReportSpec) value;
                setText(spec.getName());
            } else {
                setText("");
            }
            return this;
        }
View Full Code Here


                reportTransforms.addAll(globalTransforms);
               
                // Get any reports in the directory:
                for (File reportDef : reportDir.listFiles(xmlFileFilter)) {
                    if (reportDef.isFile()) {
                        ReportSpec reportSpec;
                        reportSpec = reportSpecDao.readReportSpec(reportDef.getPath());
                        reportSpec.setXslTransforms(reportTransforms);
                        reportSpecs.add(reportSpec);
                    }
                }
            }
        }
View Full Code Here

        reportCommand.setReportOutputType("DROID Report XML");
       
        ReportXmlWriter reportXmlWriter = mock(ReportXmlWriter.class);
        reportCommand.setReportXmlWriter(reportXmlWriter);
       
        final ReportSpec reportSpec = new ReportSpec();
        reportSpec.setName("MyCustomReport");
       
        when(reportManager.listReportSpecs()).thenReturn(Arrays.asList(new ReportSpec[] {reportSpec}));
        Report report = new Report();
       
        ArgumentCaptor<ReportRequest> requestCaptor = ArgumentCaptor.forClass(ReportRequest.class);
View Full Code Here

                    if (PDF_FORMAT.equalsIgnoreCase(reportOutputType)) {
                        FileOutputStream out = new FileOutputStream(destination);
                        transformer.transformToPdf(reader, XHTML_TRANSFORM_LOCATION, out);
                        out.close();
                    } else {
                        ReportSpec spec = request.getReportSpec();
                        File xslFile = getXSLFile(spec.getXslTransforms());
                        if (xslFile != null) {
                            FileWriter out = new FileWriter(destination);
                            transformer.transformUsingXsl(reader, xslFile, out);
                            out.close();
                        }
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.report.interfaces.ReportSpec

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.