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

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


     * @see javax.swing.SwingWorker#doInBackground()
     */
    @Override
    protected Void doInBackground() {
       
        ReportRequest request = new ReportRequest();
        request.setReportSpec(reportSpec);
        request.setProfileIds(profileIds);

        FileWriter fileWriter = null;
        try {
            targetFile = File.createTempFile("report~", ".xml", config.getTempDir());
            Report report = reportManager.generateReport(request, null, backgroundProgressObserver);
View Full Code Here


        when(reportManager.generateReport(requestCaptor.capture(), (Filter) isNull(), (CancellableProgressObserver) isNull()))
            .thenReturn(report);
       
        reportCommand.execute();

        ReportRequest reportRequest = requestCaptor.getValue();
       
        assertEquals(1, reportRequest.getProfileIds().size());
        assertEquals("12345", reportRequest.getProfileIds().get(0));
       
        verify(reportXmlWriter).writeReport(eq(report), any(FileWriter.class));
    }
View Full Code Here

            } catch (IOException e) {
                throw new CommandExecutionException(e);
            }
        }

        ReportRequest request = new ReportRequest();
        request.setProfileIds(profileIds);
       
        List<ReportSpec> reportSpecs = reportManager.listReportSpecs();
        for (ReportSpec reportSpec : reportSpecs) {
            if (reportSpec.getName().equals(reportType)) {
                request.setReportSpec(reportSpec);
                break;
            }
        }
       
        if (request.getReportSpec() == null) {
            throw new CommandExecutionException(
                    String.format("Report [%s] not found.", reportType));
        }
        writeReport(request, filter);
View Full Code Here

TOP

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

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.