In - A Java bean input parameter object of the execute method. Object is populated from the
Values object.Out - A Java bean output/return object from the execute method. properties will be put into
the Values object so other processor can access the values.public abstract class AbstractProcessor<In,Out> extends java.lang.Object implements Processor<In,Out>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractProcessor.Context
Default implementation of
ExecutionContext. |
Processor.ExecutionContextMDC_JOB_ID_KEY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractProcessor(java.lang.Class<Out> outputType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
extraValidation(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
Perform any extra validation a subclass may need to perform.
|
com.google.common.collect.BiMap<java.lang.String,java.lang.String> |
getInputMapperBiMap()
Map the variable names to the processor inputs.
|
java.lang.String |
getInputPrefix()
Get the prefix to apply to each input value.
|
com.google.common.collect.BiMap<java.lang.String,java.lang.String> |
getOutputMapperBiMap()
Map output from processor to the variable in the Jasper Report.
|
java.lang.String |
getOutputPrefix()
Get the prefix to apply to each output value.
|
java.lang.Class<Out> |
getOutputType()
Get the class of the output type.
|
void |
setInputMapper(java.util.Map<java.lang.String,java.lang.String> inputMapper)
The input mapper.
|
void |
setInputPrefix(java.lang.String inputPrefix)
The prefix to apply to each input value.
|
void |
setOutputMapper(java.util.Map<java.lang.String,java.lang.String> outputMapper)
The output mapper.
|
void |
setOutputPrefix(java.lang.String outputPrefix)
The prefix to apply to each output value.
|
void |
setPrefix(java.lang.String prefix)
The prefix to apply to each value.
|
java.lang.String |
toString() |
void |
toString(java.lang.StringBuilder builder,
int indent,
java.lang.String parent)
Create a string representing this processor.
|
void |
validate(java.util.List<java.lang.Throwable> errors,
Configuration configuration)
validate that the configuration was correct.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateInputParameter, executeprotected AbstractProcessor(java.lang.Class<Out> outputType)
outputType - the type of the output of this processor. Used to calculate processor
dependencies.public final java.lang.Class<Out> getOutputType()
ProcessorgetOutputType in interface Processor<In,Out>@Nonnull public final com.google.common.collect.BiMap<java.lang.String,java.lang.String> getInputMapperBiMap()
ProcessorgetInputMapperBiMap in interface Processor<In,Out>public final void setPrefix(java.lang.String prefix)
prefix - the new prefixpublic final java.lang.String getInputPrefix()
ProcessorIf 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.
getInputPrefix in interface Processor<In,Out>public final void setInputPrefix(java.lang.String inputPrefix)
inputPrefix - the new prefixpublic final java.lang.String getOutputPrefix()
ProcessorIf 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.
getOutputPrefix in interface Processor<In,Out>public final void setOutputPrefix(java.lang.String outputPrefix)
outputPrefix - the new prefixpublic void toString(java.lang.StringBuilder builder,
int indent,
java.lang.String parent)
Processorpublic final void setInputMapper(@Nonnull
java.util.Map<java.lang.String,java.lang.String> inputMapper)
inputMapper - the values.@Nonnull public final com.google.common.collect.BiMap<java.lang.String,java.lang.String> getOutputMapperBiMap()
ProcessorgetOutputMapperBiMap in interface Processor<In,Out>public final void setOutputMapper(@Nonnull
java.util.Map<java.lang.String,java.lang.String> outputMapper)
outputMapper - the values.public final void validate(java.util.List<java.lang.Throwable> errors,
Configuration configuration)
ConfigurationObjectvalidate in interface ConfigurationObjecterrors - a list to add any detected errors to.configuration - the containing configurationprotected abstract void extraValidation(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
validationErrors - a list to add errors to so that all validation errors are reported as
one.configuration - the containing configurationpublic java.lang.String toString()
toString in class java.lang.Object