Package org.mapfish.print.http

Examples of org.mapfish.print.http.MfClientHttpRequestFactory$RequestConfigurator


     *
     * @param sourceValues the values object containing the required elements
     */
    public void addRequiredValues(@Nonnull final Values sourceValues) {
        Object taskDirectory = sourceValues.getObject(TASK_DIRECTORY_KEY, Object.class);
        MfClientHttpRequestFactory requestFactory = sourceValues.getObject(CLIENT_HTTP_REQUEST_FACTORY_KEY,
                MfClientHttpRequestFactory.class);
        Template template = sourceValues.getObject(TEMPLATE_KEY, Template.class);
        PDFConfig pdfConfig = sourceValues.getObject(PDF_CONFIG, PDFConfig.class);
        String subReportDir = sourceValues.getObject(SUBREPORT_DIR, String.class);

View Full Code Here


    @SuppressWarnings("unchecked")
    @Override
    public MfClientHttpRequestFactory createFactoryWrapper(final Values values,
                                                         final MfClientHttpRequestFactory requestFactory) {
        MfClientHttpRequestFactory finalRequestFactory = requestFactory;
        // apply the parts in reverse so that the last part is the inner most wrapper (will be last to be called)
        for (int i = this.httpProcessors.size() - 1; i > -1; i--) {
            final HttpProcessor processor = this.httpProcessors.get(i);
            Object input = ProcessorUtils.populateInputParameter(processor, values);
            finalRequestFactory = processor.createFactoryWrapper(input, finalRequestFactory);
View Full Code Here

    @Nullable
    @Override
    public ClientHttpFactoryProcessorParam execute(final Values values,
                                                   final ExecutionContext context) throws Exception {
        MfClientHttpRequestFactory requestFactory = values.getObject(Values.CLIENT_HTTP_REQUEST_FACTORY_KEY,
                MfClientHttpRequestFactory.class);

        final ClientHttpFactoryProcessorParam output = new ClientHttpFactoryProcessorParam();
        output.clientHttpRequestFactory = createFactoryWrapper(values, requestFactory);
        return output;
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

    }

    @Test
    public void testCreateFactoryWrapperLegalRequest() throws Exception {
        ClientHttpFactoryProcessorParam params = new ClientHttpFactoryProcessorParam();
        final MfClientHttpRequestFactory factoryWrapper = restrictUrisProcessor.createFactoryWrapper(params, requestFactory);
        factoryWrapper.createRequest(new URI("http://localhost:8080/geoserver/wms"), HttpMethod.GET);
    }
View Full Code Here

TOP

Related Classes of org.mapfish.print.http.MfClientHttpRequestFactory$RequestConfigurator

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.