Examples of ExportManager


Examples of org.jboss.dashboard.export.ExportManager

        selectedSectionIds.clear();
    }

    public CommandResponse actionExportSelectedKPIs(CommandRequest request) throws Exception {
        // Export in XML format all the KPIs and data providers in the system.
        ExportManager expMgr = DataDisplayerServices.lookup().getExportManager();
        ExportOptions options = expMgr.createExportOptions();
        options.setIgnoreKPIs(false);
        options.setIgnoreDataProviders(false);
        options.setKPIs(getSelectedKPIs());
        options.setDataProviders(getSelectedDataProviders());
        String xml = expMgr.format(options);

        // Send XML bytes as a stream response.
        int id = xml.hashCode();
        if (id < 0) id = id*-1;
        return new SendStreamResponse(new ByteArrayInputStream(xml.getBytes()), "inline;filename=kpiExport_" + id + ".kpiex");
View Full Code Here

Examples of org.jboss.dashboard.export.ExportManager

        selectedSectionIds.clear();
    }

    public CommandResponse actionExportSelectedKPIs(CommandRequest request) throws Exception {
        // Export in XML format all the KPIs and data providers in the system.
        ExportManager expMgr = DataDisplayerServices.lookup().getExportManager();
        ExportOptions options = expMgr.createExportOptions();
        options.setIgnoreKPIs(false);
        options.setIgnoreDataProviders(false);
        options.setKPIs(getSelectedKPIs());
        options.setDataProviders(getSelectedDataProviders());
        String xml = expMgr.format(options);

        // Send XML bytes as a stream response.
        int id = xml.hashCode();
        if (id < 0) id = id*-1;
        return new SendStreamResponse(new ByteArrayInputStream(xml.getBytes()), "inline;filename=kpiExport_" + id + ".kpiex");
View Full Code Here

Examples of org.jboss.dashboard.export.ExportManager

        selectedSectionIds.clear();
    }

    public CommandResponse actionExportSelectedKPIs(CommandRequest request) throws Exception {
        // Export in XML format all the KPIs and data providers in the system.
        ExportManager expMgr = DataDisplayerServices.lookup().getExportManager();
        ExportOptions options = expMgr.createExportOptions();
        options.setIgnoreKPIs(false);
        options.setIgnoreDataProviders(false);
        options.setKPIs(getSelectedKPIs());
        options.setDataProviders(getSelectedDataProviders());
        String xml = expMgr.format(options);

        // Send XML bytes as a stream response.
        int id = xml.hashCode();
        if (id < 0) id = id*-1;
        return new SendStreamResponse(new ByteArrayInputStream(xml.getBytes()), "inline;filename=kpiExport_" + id + ".xml");
View Full Code Here

Examples of org.jboss.dashboard.export.ExportManager

        selectedSectionIds.clear();
    }

    public CommandResponse actionExportSelectedKPIs(CommandRequest request) throws Exception {
        // Export in XML format all the KPIs and data providers in the system.
        ExportManager expMgr = DataDisplayerServices.lookup().getExportManager();
        ExportOptions options = expMgr.createExportOptions();
        options.setIgnoreKPIs(false);
        options.setIgnoreDataProviders(false);
        options.setKPIs(getSelectedKPIs());
        options.setDataProviders(getSelectedDataProviders());
        String xml = expMgr.format(options);

        // Send XML bytes as a stream response.
        int id = xml.hashCode();
        if (id < 0) id = id*-1;
        return new SendStreamResponse(new ByteArrayInputStream(xml.getBytes()), "inline;filename=kpiExport_" + id + ".kpiex");
View Full Code Here

Examples of uk.gov.nationalarchives.droid.export.interfaces.ExportManager

    @Test
    public void testExportThreeProfiles() throws Exception {
       
        final String destination = File.createTempFile("droid", "exportCommandTest").getAbsolutePath();
       
        ExportManager exportManager = mock(ExportManager.class);
        ProfileManager profileManager = mock(ProfileManager.class);
       
        ProfileInstance profile1 = mock(ProfileInstance.class);
        when(profile1.getUuid()).thenReturn("profile1");
       
        ProfileInstance profile2 = mock(ProfileInstance.class);
        when(profile2.getUuid()).thenReturn("profile2");

        ProfileInstance profile3 = mock(ProfileInstance.class);
        when(profile3.getUuid()).thenReturn("profile3");

        when(profileManager.open(eq(new File("foo1")), any(ProgressObserver.class))).thenReturn(profile1);
        when(profileManager.open(eq(new File("foo2")), any(ProgressObserver.class))).thenReturn(profile2);
        when(profileManager.open(eq(new File("foo3")), any(ProgressObserver.class))).thenReturn(profile3);
       
        Future future = mock(Future.class);
        when(exportManager.exportProfiles(any(List.class), eq(destination), (Filter) isNull(), eq(ExportOptions.ONE_ROW_PER_FORMAT), eq("UTF-8"))).thenReturn(future);
       
        ExportCommand command = new ExportCommand();
       
        String[] profileList = new String[] {"foo1", "foo2", "foo3"};
        command.setProfiles(profileList);
View Full Code Here

Examples of uk.gov.nationalarchives.droid.export.interfaces.ExportManager

    }

    @Test
    public void testExportProfileWithNarrowFilter() throws Exception {
       
        ExportManager exportManager = mock(ExportManager.class);
        ProfileManager profileManager = mock(ProfileManager.class);
       
        ProfileInstance profile1 = mock(ProfileInstance.class);
        when(profile1.getUuid()).thenReturn("profile1");
       
        when(profileManager.open(eq(new File("foo1")), any(ProgressObserver.class))).thenReturn(profile1);
       
        Future future = mock(Future.class);
        when(exportManager.exportProfiles(any(List.class), eq("destination"), any(Filter.class), eq(ExportOptions.ONE_ROW_PER_FORMAT), any(String.class))).thenReturn(future);
       
        ExportCommand command = new ExportCommand();
        command.setDqlFilterParser(new AntlrDqlParser());
       
        String[] profileList = new String[] {"foo1"};
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.