public final class AddStaticLayersProcessor extends AbstractProcessor<AddStaticLayersProcessor.Input,java.lang.Void>
This processor adds the configured set of layers to the map.
This is useful when all maps should have a default set of background layers or overlays added to those that the client sends for printing.
This can simplify the client so the client only needs to be concerned with the data layers.
See also: !staticLayers attribute
[[examples=add_overlay_layer,report]]| Modifier and Type | Class and Description |
|---|---|
static class |
AddStaticLayersProcessor.Input
The object containing the values required for this processor.
|
static class |
AddStaticLayersProcessor.StaticLayerPosition
Indications where in the layer list to add the static layers.
|
AbstractProcessor.ContextProcessor.ExecutionContextMDC_JOB_ID_KEY| Modifier | Constructor and Description |
|---|---|
protected |
AddStaticLayersProcessor()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
AddStaticLayersProcessor.Input |
createInputParameter()
Returns a new/clean instance of a parameter object.
|
java.lang.Void |
execute(AddStaticLayersProcessor.Input values,
Processor.ExecutionContext context)
Perform the process on the input attributes.
|
protected void |
extraValidation(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
Perform any extra validation a subclass may need to perform.
|
void |
setPosition(AddStaticLayersProcessor.StaticLayerPosition position)
Set the position enumeration which indicates where the layers should be added to the map:
AddStaticLayersProcessor.StaticLayerPosition. |
getInputMapperBiMap, getInputPrefix, getOutputMapperBiMap, getOutputPrefix, getOutputType, setInputMapper, setInputPrefix, setOutputMapper, setOutputPrefix, setPrefix, toString, toString, validatepublic void setPosition(AddStaticLayersProcessor.StaticLayerPosition position)
AddStaticLayersProcessor.StaticLayerPosition.position - the position.protected void extraValidation(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
AbstractProcessorextraValidation in class AbstractProcessor<AddStaticLayersProcessor.Input,java.lang.Void>validationErrors - a list to add errors to so that all validation errors are reported as
one.configuration - the containing configuration@Nullable public AddStaticLayersProcessor.Input createInputParameter()
ProcessorValues object.
The way the properties will be looked up is to
Values object using the mapped
property name
HasDefaultValue annotation is on the field for
the property.
@Nullable public java.lang.Void execute(AddStaticLayersProcessor.Input values, Processor.ExecutionContext context) throws java.lang.Exception
Processorvalues - A Java object whose public fields are populated from the Values object (which is used for transferring properties between
processors).context - The execution context for a print task.Values object. The key in the
Values
object is the name of the field or if there is a mapping in the Processor.getOutputMapperBiMap()
map, the mapped name. The key is determined in a similar way as for the input object.java.lang.Exception