@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("test", requestData, template, getTaskDirectory(), this.httpRequestFactory, new File(".")); this.forkJoinPool.invoke(template.getProcessorGraph().createTask(values)); @SuppressWarnings("unchecked") List<URI> layerGraphics = (List<URI>) values.getObject("layerGraphics", List.class); assertEquals(1, layerGraphics.size()); new ImageSimilarity(getFile(BASE_DIR + "expectedSimpleImage.png")). assertSimilarity(new File(layerGraphics.get(0)), 5); }
@Override public final Void execute(final Input values, final ExecutionContext context) throws Exception { for (MapLayer layer: values.map.getLayers()) { context.stopIfCanceled(); if (layer instanceof AbstractFeatureSourceLayer) { final SimpleFeatureCollection features = values.features.getFeatures( values.clientHttpRequestFactoryProvider.get()); ((AbstractFeatureSourceLayer) layer).setFeatureCollection(features); } } return null; }
SetFeaturesProcessor extends
        AbstractProcessor<SetFeaturesProcessor.Input, Void> { @Override public final Void execute(final Input values, final ExecutionContext context) throws Exception { for (MapLayer layer: values.map.getLayers()) { context.stopIfCanceled(); if (layer instanceof AbstractFeatureSourceLayer) { final SimpleFeatureCollection features = values.features.getFeatures( values.clientHttpRequestFactoryProvider.get()); ((AbstractFeatureSourceLayer) layer).setFeatureCollection(features); } } return null; } }
SetFeaturesProcessor extends
        AbstractProcessor<SetFeaturesProcessor.Input, Void> { @Override public final Void execute(final Input values, final ExecutionContext context) throws Exception { for (MapLayer layer: values.map.getLayers()) { context.stopIfCanceled(); if (layer instanceof AbstractFeatureSourceLayer) { final SimpleFeatureCollection features = values.features.getFeatures( values.clientHttpRequestFactoryProvider.get()); ((AbstractFeatureSourceLayer) layer).setFeatureCollection(features); } } return null; } protected  SetFeaturesProcessor(); }
SetFeaturesProcessor extends
        AbstractProcessor<SetFeaturesProcessor.Input, Void> { @Override public final Void execute(final Input values, final ExecutionContext context) throws Exception { for (MapLayer layer: values.map.getLayers()) { context.stopIfCanceled(); if (layer instanceof AbstractFeatureSourceLayer) { final SimpleFeatureCollection features = values.features.getFeatures( values.clientHttpRequestFactoryProvider.get()); ((AbstractFeatureSourceLayer) layer).setFeatureCollection(features); } } return null; } protected  SetFeaturesProcessor(); @Override final Input createInputParameter(); @Override final Void execute(final Input values, final ExecutionContext context); }
SetFeaturesProcessor extends
        AbstractProcessor<SetFeaturesProcessor.Input, Void> { @Override public final Void execute(final Input values, final ExecutionContext context) throws Exception { for (MapLayer layer: values.map.getLayers()) { context.stopIfCanceled(); if (layer instanceof AbstractFeatureSourceLayer) { final SimpleFeatureCollection features = values.features.getFeatures( values.clientHttpRequestFactoryProvider.get()); ((AbstractFeatureSourceLayer) layer).setFeatureCollection(features); } } return null; } protected  SetFeaturesProcessor(); @Override final Input createInputParameter(); @Override final Void execute(final Input values, final ExecutionContext context);  }