Package org.mapfish.print.config

Examples of org.mapfish.print.config.Configuration


                            return error404(uri, httpMethod);
                        }
                    }
                }
        );
        final Configuration config = configurationFactory.getConfig(getFile(BASE_DIR + "config.yaml"));
        final Template template = config.getTemplate("main");
        PJsonObject requestData = loadJsonRequestData();
        Values values = new Values(requestData, template, this.parser, getTaskDirectory(), this.requestFactory, new File("."));
        template.getProcessorGraph().createTask(values).invoke();

        @SuppressWarnings("unchecked")
View Full Code Here


    @Test
    public void testBasicTableProperties() throws Exception {
        final String baseDir = BASIC_BASE_DIR;

        final Configuration config = configurationFactory.getConfig(getFile(baseDir + "config.yaml"));
        final Template template = config.getTemplate("main");
        PJsonObject requestData = loadJsonRequestData(baseDir);
        Values values = new Values(requestData, template, parser, getTaskDirectory(), this.httpRequestFactory, new File("."));
        forkJoinPool.invoke(template.getProcessorGraph().createTask(values));

        final JRMapCollectionDataSource tableDataSource = values.getObject("table", JRMapCollectionDataSource.class);
View Full Code Here

    }

    @Test
    public void testBasicTablePrint() throws Exception {
        final String baseDir = BASIC_BASE_DIR;
        final Configuration config = configurationFactory.getConfig(getFile(baseDir + "config.yaml"));
        PJsonObject requestData = loadJsonRequestData(baseDir);

        final AbstractJasperReportOutputFormat format = (AbstractJasperReportOutputFormat) this.outputFormat.get("pngOutputFormat");
        final File file = getFile(TableProcessorTest.class, baseDir);
        JasperPrint print = format.getJasperPrint(requestData, config, file, getTaskDirectory()).print;
View Full Code Here

    }

    @Test
    public void testDynamicTablePrint() throws Exception {
        final String baseDir = DYNAMIC_BASE_DIR;
        final Configuration config = configurationFactory.getConfig(getFile(baseDir + "config.yaml"));
        PJsonObject requestData = loadJsonRequestData(baseDir);

        final AbstractJasperReportOutputFormat format = (AbstractJasperReportOutputFormat) this.outputFormat.get("pngOutputFormat");
        final File file = getFile(TableProcessorTest.class, baseDir);
        JasperPrint print = format.getJasperPrint(requestData, config, file, getTaskDirectory()).print;
View Full Code Here

                return request;
            }
        });

        final String baseDir = IMAGE_CONVERTER_BASE_DIR;
        final Configuration config = configurationFactory.getConfig(getFile(baseDir + "config.yaml"));
        PJsonObject requestData = loadJsonRequestData(baseDir);

        final AbstractJasperReportOutputFormat format = (AbstractJasperReportOutputFormat) this.outputFormat.get("pngOutputFormat");
        final File file = getFile(TableProcessorTest.class, baseDir);
        JasperPrint print = format.getJasperPrint(requestData, config, file, getTaskDirectory()).print;
View Full Code Here

                return request;
            }
        });

        final String baseDir = TABLE_CONVERTERS;
        final Configuration config = configurationFactory.getConfig(getFile(baseDir + "config.yaml"));
        PJsonObject requestData = loadJsonRequestData(baseDir);

        final AbstractJasperReportOutputFormat format = (AbstractJasperReportOutputFormat) this.outputFormat.get("pngOutputFormat");
        final File file = getFile(TableProcessorTest.class, baseDir);
        JasperPrint print = format.getJasperPrint(requestData, config, file, getTaskDirectory()).print;
View Full Code Here

    }

    @Test
    public void testTableConvertersDynamic() throws Exception {
        final String baseDir = TABLE_CONVERTERS_DYNAMIC;
        final Configuration config = configurationFactory.getConfig(getFile(baseDir + "config.yaml"));
        PJsonObject requestData = loadJsonRequestData(baseDir);

        final AbstractJasperReportOutputFormat format = (AbstractJasperReportOutputFormat) this.outputFormat.get("pngOutputFormat");
        final File file = getFile(TableProcessorTest.class, baseDir);
        JasperPrint print = format.getJasperPrint(requestData, config, file, getTaskDirectory()).print;
View Full Code Here

                            return error404(uri, httpMethod);
                        }
                    }
                }
        );
        final Configuration config = configurationFactory.getConfig(getFile(BASE_DIR + "config.yaml"));
        final Template template = config.getTemplate("A4 landscape");
        PJsonObject requestData = loadJsonRequestData();
        Values values = new Values(requestData, template, this.parser, getTaskDirectory(), this.requestFactory, new File("."));
        template.getProcessorGraph().createTask(values).invoke();

        @SuppressWarnings("unchecked")
View Full Code Here

        PJsonObject requestData = loadJsonRequestData();
        doTest(requestData);
    }

    private void doTest(PJsonObject requestData) throws IOException, JSONException {
        final Configuration config = configurationFactory.getConfig(getFile(BASE_DIR + "config.yaml"));
        final Template template = config.getTemplate("main");
        Values values = new Values(requestData, template, parser, getTaskDirectory(), this.httpRequestFactory, new File("."));
        template.getProcessorGraph().createTask(values).invoke();

        @SuppressWarnings("unchecked")
        List<URI> layerGraphics = (List<URI>) values.getObject("layerGraphics", List.class);
View Full Code Here

    private ConfigurationFactory configurationFactory;

    @Test
    public void testCreateDependencies() throws Exception {
        final File configFile = getFile("merge-data-sources/config.yaml");
        final Configuration config = configurationFactory.getConfig(configFile);

        final Template template = config.getTemplate("A4 portrait");

        final ProcessorDependencyGraph processorGraph = template.getProcessorGraph();

        final List<ProcessorGraphNode> roots = processorGraph.getRoots();
        assertEquals(0, Collections2.filter(roots, FIND_MERGE_PROCESSOR).size());
View Full Code Here

TOP

Related Classes of org.mapfish.print.config.Configuration

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.