Package org.mapfish.print.processor

Examples of org.mapfish.print.processor.ProcessorDependencyGraph


        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());
        assertEquals(3, count(processorGraph.toString(), "  +-- MergeDataSourceProcessor"));

        MergeDataSourceProcessor mergeDataSourceProcessor = null;
        List<ProcessorGraphNode<Object, Object>> allNodes = Lists.newArrayList();
        for (Processor<?, ?> processor : processorGraph.getAllProcessors()) {
            if (processor instanceof MergeDataSourceProcessor) {
                mergeDataSourceProcessor = (MergeDataSourceProcessor) processor;
            } else {
                allNodes.add(new ProcessorGraphNode(processor, null));
            }
View Full Code Here


        configurationFactory.setDoValidation(false);
        final Configuration config = configurationFactory.getConfig(getFile(baseDir() + "/config-forward-all.yaml"));
        final Template template = config.getTemplate("main");

        ProcessorDependencyGraph graph = template.getProcessorGraph();

        Values values = new Values();
        values.put(Values.CLIENT_HTTP_REQUEST_FACTORY_KEY, this.httpClientFactory);
        addExtraValues(values);
        forkJoinPool.invoke(graph.createTask(values));
    }
View Full Code Here

        this.configurationFactory.setDoValidation(false);
        final Configuration config = configurationFactory.getConfig(getFile(baseDir() + "/config.yaml"));
        final Template template = config.getTemplate("main");

        ProcessorDependencyGraph graph = template.getProcessorGraph();
        List<ProcessorGraphNode> roots = graph.getRoots();

        assertEquals(1, roots.size());
        final ProcessorGraphNode processor = roots.get(0);
        assertEquals(classUnderTest(), processor.getProcessor().getClass());

        final Set dependencies = processor.getAllProcessors();
        dependencies.remove(processor.getProcessor());
        assertEquals(1, dependencies.size());
        assertEquals(testProcessorClass(), dependencies.iterator().next().getClass());

        Values values = new Values();
        values.put(Values.CLIENT_HTTP_REQUEST_FACTORY_KEY, this.httpClientFactory);
        addExtraValues(values);
        forkJoinPool.invoke(graph.createTask(values));
    }
View Full Code Here

        this.configurationFactory.setDoValidation(false);
        final Configuration config = configurationFactory.getConfig(getFile(baseDir() + "/config-createmap.yaml"));
        final Template template = config.getTemplate("main");

        ProcessorDependencyGraph graph = template.getProcessorGraph();
        List<ProcessorGraphNode> roots = graph.getRoots();

        assertEquals(1, roots.size());
        final ProcessorGraphNode compositeClientHttpRequestFactoryProcessor = roots.get(0);
        assertEquals(classUnderTest(), compositeClientHttpRequestFactoryProcessor.getProcessor().getClass());
        final Set dependencies = compositeClientHttpRequestFactoryProcessor.getAllProcessors();
View Full Code Here

TOP

Related Classes of org.mapfish.print.processor.ProcessorDependencyGraph

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.