In - A Java DTO input parameter object of the execute method. The object properties are resolved by looking at the
public fields in the object and setting those fields. Only fields in the object itself will be inspected.
Object is populated from the Values object.Out - A Java DTO output/return object from the execute method.
properties will be put into the Values object so other processor can access the values.public interface Processor<In,Out> extends ConfigurationObject
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Processor.ExecutionContext
An execution context for a specific print task.
|
| Modifier and Type | Method and Description |
|---|---|
In |
createInputParameter()
Returns a new/clean instance of a parameter object.
|
Out |
execute(In values,
Processor.ExecutionContext context)
Perform the process on the input attributes.
|
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.
|
validatejava.lang.Class<Out> getOutputType()
@Nullable com.google.common.collect.BiMap<java.lang.String,java.lang.String> getInputMapperBiMap()
@Nullable In createInputParameter()
Values 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 Out execute(In values, Processor.ExecutionContext context) throws java.lang.Exception
values - 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
getOutputMapperBiMap() map, the mapped name. The key is determined in a similar way as for the input object.java.lang.Exception@Nullable com.google.common.collect.BiMap<java.lang.String,java.lang.String> getOutputMapperBiMap()
java.lang.String getInputPrefix()
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 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.
java.lang.String getOutputPrefix()
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 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.