Class AbstractProcessor<IN,OUT>
- Type Parameters:
IN- A Java bean input parameter object of the execute method. Object is populated from theValuesobject.OUT- A Java bean output/return object from the execute method. properties will be put into theValuesobject 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 classDefault 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 voidextraValidation(List<Throwable> validationErrors, Configuration configuration) Perform any extra validation a subclass may need to perform.Map the variable names to the processor inputs.final StringGet the prefix to apply to each input value.Map output from processor to the variable in the Jasper Report.final StringGet the prefix to apply to each output value.Get the class of the output type.final voidsetInputMapper(Map<String, String> inputMapper) The input mapper.final voidsetInputPrefix(String inputPrefix) The prefix to apply to each input value.final voidsetOutputMapper(Map<String, String> outputMapper) The output mapper.final voidsetOutputPrefix(String outputPrefix) The prefix to apply to each output value.final voidThe prefix to apply to each value.toString()voidtoString(StringBuilder builder, int indent, String parent) Create a string representing this processor.final voidvalidate(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, waitMethods 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:ProcessorGet 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:
getOutputTypein interfaceProcessor<IN,OUT>
-
getInputMapperBiMap
Description copied from interface:ProcessorMap the variable names to the processor inputs.- Specified by:
getInputMapperBiMapin 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:ProcessorGet 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:
getInputPrefixin 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:ProcessorGet 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:
getOutputPrefixin 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:ProcessorCreate 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:ProcessorMap output from processor to the variable in the Jasper Report.- Specified by:
getOutputMapperBiMapin 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:ConfigurationObjectvalidate that the configuration was correct.- Specified by:
validatein 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
-