Package org.mapfish.print.http

Examples of org.mapfish.print.http.ConfigFileResolvingHttpRequestFactory$ConfigFileResolvingRequest


    private final ConfigFileResolvingHttpRequestFactory httpRequestFactory;
    private JasperReportsContext jasperReportsContext;

    MapfishPrintRepositoryService(@Nonnull final Configuration configuration,
                                  @Nonnull final MfClientHttpRequestFactoryImpl httpRequestFactory) {
        this.httpRequestFactory = new ConfigFileResolvingHttpRequestFactory(httpRequestFactory, configuration);
        this.jasperReportsContext = DefaultJasperReportsContext.getInstance();
    }
View Full Code Here


        Assert.isTrue(!taskDirectory.mkdirs() || taskDirectory.exists());

        // add task dir. to values so that all processors can access it
        this.values.put(TASK_DIRECTORY_KEY, taskDirectory);
        this.values.put(CLIENT_HTTP_REQUEST_FACTORY_KEY, new ConfigFileResolvingHttpRequestFactory(httpRequestFactory,
                template.getConfiguration()));
        this.values.put(TEMPLATE_KEY, template);
        this.values.put(PDF_CONFIG, template.getPdfConfig());
        this.values.put(SUBREPORT_DIR, jasperTemplateBuild.getAbsolutePath());
View Full Code Here

    }

    @Test
    public void testTreatStringAsGeoJson() throws Exception {
        Configuration configuration = configurationFactory.getConfig(getFile("geojson/config.yaml"));
        MfClientHttpRequestFactory configRequestFactory = new ConfigFileResolvingHttpRequestFactory(requestFactory, configuration);
        FeaturesParser featuresParser = new FeaturesParser( configRequestFactory, false);
        for (File geojsonExample : getGeoJsonExamples()) {
            try {
                int numFeatures = getNumExpectedFeatures(geojsonExample);
                final String geojson = Files.toString(geojsonExample, Constants.DEFAULT_CHARSET);
View Full Code Here

    @Before
    public void setup() throws IOException {
        this.config = this.configurationFactory.getConfig(getFile(BASE_DIR + "config.yaml"));
        this.requestFactoryWrapper =
                new ConfigFileResolvingHttpRequestFactory(this.requestFactory, config);
        this.bgColor = ColorParser.toColor("rgba(255, 255, 255, 0)");
    }
View Full Code Here

        Configuration configuration = new Configuration();
        configuration.setFileLoaderManager(this.fileLoaderManager);
        configuration.setConfigurationFile(getFile("/org/mapfish/print/processor/map/center_wmts_fixedscale/thinline.sld"));

        ConfigFileResolvingHttpRequestFactory requestFactory = new ConfigFileResolvingHttpRequestFactory(this.clientHttpRequestFactory,
                configuration);
        final Optional<Style> styleOptional = parserPlugin.parseStyle(configuration,
                requestFactory, "http://" + host + "/org/mapfish/print/processor/map/center_wmts_fixedscale/thinline.sld", mapContext);

        assertTrue(styleOptional.isPresent());
View Full Code Here

    private Optional<Style> loadStyle(String configFile, String styleString) throws Throwable {
        Configuration configuration = new Configuration();
        configuration.setFileLoaderManager(this.fileLoaderManager);
        configuration.setConfigurationFile(getFile(configFile));

        ConfigFileResolvingHttpRequestFactory requestFactory = new ConfigFileResolvingHttpRequestFactory(this.httpClient, configuration);

        return parser.parseStyle(configuration, requestFactory,
                styleString, null);
    }
View Full Code Here

        File file = getFile(FileSLDParserPluginTest.class, "singleStyle.sld");
        Configuration config = new Configuration();
        config.setConfigurationFile(tempFile);
        config.setFileLoaderManager(this.fileLoaderManager);

        ConfigFileResolvingHttpRequestFactory requestFactory = new ConfigFileResolvingHttpRequestFactory(this.clientHttpRequestFactory,
                config);

        assertFalse(this.parser.parseStyle(config, requestFactory, file.getAbsolutePath(), mapContext).isPresent());
    }
View Full Code Here

        File file = getFile(FileSLDParserPluginTest.class, fileName);
        Configuration config = new Configuration();
        config.setConfigurationFile(file);
        config.setFileLoaderManager(this.fileLoaderManager);

        ConfigFileResolvingHttpRequestFactory requestFactory = new ConfigFileResolvingHttpRequestFactory(this.clientHttpRequestFactory,
                config);

        return this.parser.parseStyle(config, requestFactory, styleString, mapContext);
    }
View Full Code Here

TOP

Related Classes of org.mapfish.print.http.ConfigFileResolvingHttpRequestFactory$ConfigFileResolvingRequest

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.