Package org.mapfish.print.config

Examples of org.mapfish.print.config.Configuration


        final PJsonObject requestData = CreateMapProcessorFixedScaleBBoxGeoJsonTest.loadJsonRequestData()
                .getJSONObject("attributes")
                .getJSONObject("mapDef")
                .getJSONArray("layers").getJSONObject(0);

        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(new File("."));
        configuration.setFileLoaderManager(this.fileLoaderManager);

        Template template = new Template();
        template.setConfiguration(configuration);

        GeoJsonLayer.GeoJsonParam param = new GeoJsonLayer.GeoJsonParam();
View Full Code Here


    public void testGeoIllegalFileUrl() throws Exception {
        final File file = getFile(CreateMapProcessorFlexibleScaleBBoxGeoJsonTest.class, BASE_DIR + "geojson.json");
        final PJsonObject requestData = parseJSONObjectFromString("{type:\"geojson\";style:\"polygon\";geoJson:\""
                                                                  + file.toURI().toURL() + "\"}");

        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(File.createTempFile("xyz", ".yaml"));
        configuration.setFileLoaderManager(this.fileLoaderManager);

        Template template = new Template();
        template.setConfiguration(configuration);

        GeoJsonLayer.GeoJsonParam param = new GeoJsonLayer.GeoJsonParam();
View Full Code Here

    }


    @Test(expected = IllegalArgumentException.class)
    public void testGeoIllegalFileUrl2() throws Exception {
        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(File.createTempFile("xyz", ".yaml"));
        configuration.setFileLoaderManager(this.fileLoaderManager);

        Template template = new Template();
        template.setConfiguration(configuration);

        GeoJsonLayer.GeoJsonParam param = new GeoJsonLayer.GeoJsonParam();
View Full Code Here

    @Test(expected = Exception.class)
    public void testGeoNotUrlNotGeoJson() throws Exception {
        final File file = getFile(CreateMapProcessorFlexibleScaleBBoxGeoJsonTest.class, BASE_DIR + "geojson.json");
        final PJsonObject requestData = parseJSONObjectFromString("{type:\"geojson\";style:\"polygon\";geoJson:\"Random\"}");

        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(file);
        configuration.setFileLoaderManager(this.fileLoaderManager);

        Template template = new Template();
        template.setConfiguration(configuration);

        GeoJsonLayer.GeoJsonParam param = new GeoJsonLayer.GeoJsonParam();
View Full Code Here

    @Autowired
    private TestHttpClientFactory httpRequestFactory;

    @Test
    public void testExecute() throws Exception {
        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.httpRequestFactory, new File("."));

        this.forkJoinPool.invoke(template.getProcessorGraph().createTask(values));
View Full Code Here

        );
        final PJsonObject requestData = parseJSONObjectFromString("{type:\"geojson\";style:\"polygon\";geoJson:\"http://"
                                                                  + host + "/" + BASE_DIR + "geojson.json" + "\"}");

        final File file = getFile(CreateMapProcessorFlexibleScaleBBoxGeoJsonTest.class, BASE_DIR + "geojson.json");
        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(file);
        configuration.setFileLoaderManager(this.fileLoaderManager);

        Template template = new Template();
        template.setConfiguration(configuration);

        GeoJsonLayer.GeoJsonParam param = new GeoJsonLayer.GeoJsonParam();
View Full Code Here

    public void testRelativeFileUrl() throws Exception {
        final File file = getFile(CreateMapProcessorFlexibleScaleBBoxGeoJsonTest.class, BASE_DIR + "geojson.json");
        final PJsonObject requestData = parseJSONObjectFromString("{type:\"geojson\";style:\"polygon\";geoJson:\"file://"
                                                                  + file.getName() + "\"}");

        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(file);
        configuration.setFileLoaderManager(this.fileLoaderManager);

        Template template = new Template();
        template.setConfiguration(configuration);

        GeoJsonLayer.GeoJsonParam param = new GeoJsonLayer.GeoJsonParam();
View Full Code Here

                            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

                            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

                            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

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.