Class AbstractProcessor<IN,OUT>
- Type Parameters:
IN
- A Java bean input parameter object of the execute method. Object is populated from theValues
object.OUT
- A Java bean output/return object from the execute method. properties will be put into theValues
object so other processor can access the values.
- All Implemented Interfaces:
ConfigurationObject
,Processor<IN,
OUT>
- Direct Known Subclasses:
AbstractClientHttpRequestFactoryProcessor
,AddStaticLayersProcessor
,CompositeClientHttpRequestFactoryProcessor
,CreateMapPagesProcessor
,CreateMapProcessor
,CreateNorthArrowProcessor
,CreateOverviewMapProcessor
,CreateScalebarProcessor
,DataSourceProcessor
,DateFormatProcessor
,ForwardHeadersProcessor
,JasperReportBuilder
,LegendProcessor
,MergeDataSourceProcessor
,PdfConfigurationProcessor
,SetFeaturesProcessor
,SetStyleProcessor
,SetTiledWmsProcessor
,SetWmsCustomParamProcessor
,TableProcessor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Default implementation ofProcessor.ExecutionContext
.Nested classes/interfaces inherited from interface org.mapfish.print.processor.Processor
Processor.ExecutionContext
-
Field Summary
Fields inherited from interface org.mapfish.print.processor.Processor
MDC_APPLICATION_ID_KEY, MDC_JOB_ID_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
extraValidation
(List<Throwable> validationErrors, Configuration configuration) Perform any extra validation a subclass may need to perform.Map the variable names to the processor inputs.final String
Get the prefix to apply to each input value.Map output from processor to the variable in the Jasper Report.final String
Get the prefix to apply to each output value.Get the class of the output type.final void
setInputMapper
(Map<String, String> inputMapper) The input mapper.final void
setInputPrefix
(String inputPrefix) The prefix to apply to each input value.final void
setOutputMapper
(Map<String, String> outputMapper) The output mapper.final void
setOutputPrefix
(String outputPrefix) The prefix to apply to each output value.final void
The prefix to apply to each value.toString()
void
toString
(StringBuilder builder, int indent, String parent) Create a string representing this processor.final void
validate
(List<Throwable> errors, Configuration configuration) validate that the configuration was correct.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.mapfish.print.processor.Processor
createInputParameter, execute
-
Constructor Details
-
AbstractProcessor
Constructor.- Parameters:
outputType
- the type of the output of this processor. Used to calculate processor dependencies.
-
-
Method Details
-
getOutputType
Description copied from interface:Processor
Get the class of the output type. This is used when determining the outputs this processor produces.The public fields of the Processor will be the output of the processor and thus can be mapped to inputs of another processor.
- Specified by:
getOutputType
in interfaceProcessor<IN,
OUT>
-
getInputMapperBiMap
Description copied from interface:Processor
Map the variable names to the processor inputs.- Specified by:
getInputMapperBiMap
in interfaceProcessor<IN,
OUT>
-
setPrefix
The prefix to apply to each value. This provides a simple way to make all input and output values have unique values.- Parameters:
prefix
- the new prefix
-
getInputPrefix
Description copied from interface:Processor
Get the prefix to apply to each input value. This provides a simple way to make all output values have unique values.If input prefix is non-null and non-empty (whitespace is removed) then the prefix will be prepended to the normal name of the input value.
When a prefix is appended the normal name will be capitalized. For example: if the normal name is: map and the prefix is page1 then the final name will be page1Map.
Note: If a mapping is in the
Processor.getInputMapperBiMap()
then the prefix will be ignored for that value and the un-prefixed name from the input mapper will be used directly.Note: If a prefix has white space at the start or end it will be removed.
- Specified by:
getInputPrefix
in interfaceProcessor<IN,
OUT>
-
setInputPrefix
The prefix to apply to each input value. This provides a simple way to make all input values have unique values.- Parameters:
inputPrefix
- the new prefix
-
getOutputPrefix
Description copied from interface:Processor
Get the prefix to apply to each output value. This provides a simple way to make all output values have unique values.If output prefix is non-null and non-empty (whitespace is removed) then the prefix will be prepended to the normal name of the output value.
When a prefix is appended the normal name will be capitalized. For example: if the normal name is: map and the prefix is page1 then the final name will be page1Map.
Note: If a mapping is in the
Processor.getOutputMapperBiMap()
then the prefix will be ignored for that value and the un-prefixed name from the output mapper will be used directly.Note: If a prefix has white space at the start or end it will be removed.
- Specified by:
getOutputPrefix
in interfaceProcessor<IN,
OUT>
-
setOutputPrefix
The prefix to apply to each output value. This provides a simple way to make all output values have unique values.- Parameters:
outputPrefix
- the new prefix
-
toString
Description copied from interface:Processor
Create a string representing this processor. -
setInputMapper
The input mapper. See "Processors" to know more. Example:inputMapper: {attributeName: defaultInputParamName}
- Parameters:
inputMapper
- the values.
-
getOutputMapperBiMap
Description copied from interface:Processor
Map output from processor to the variable in the Jasper Report.- Specified by:
getOutputMapperBiMap
in interfaceProcessor<IN,
OUT>
-
setOutputMapper
The output mapper. See "Processors" to know more. Example:outputMapper: {defaultOutputName: templateParamName}
- Parameters:
outputMapper
- the values.
-
validate
Description copied from interface:ConfigurationObject
validate that the configuration was correct.- Specified by:
validate
in interfaceConfigurationObject
- Parameters:
errors
- a list to add any detected errors to.configuration
- the containing configuration
-
extraValidation
protected abstract void extraValidation(List<Throwable> validationErrors, Configuration configuration) Perform any extra validation a subclass may need to perform.- Parameters:
validationErrors
- a list to add errors to so that all validation errors are reported as one.configuration
- the containing configuration
-
toString
-