A Java manipulator is your own code in Java that takes records from any number of pipeline components in Forge or, optionally, your source data, and changes it according to your processing requirements. A Java manipulator can then write any records you choose to its output.
For example, a Java manipulator can write the “transformed” records into its output, so that the records can be passed to the next pipeline component in Forge.
Java manipulators are the most generic way of modifying your data and records in the pipeline. In other words, content adapters represent a specific case of Java manipulators. You create Java manipulators with the Content Adapter Development Kit API.
A Java manipulator has the following characteristics:
It adheres to the Adapter interface provided with the CADK. It uses the interface described in the Content Adapter API (Javadoc), and requires you to import all the Java classes supplied with the Content Adapter Development Kit.
It can have any number of inputs. It can take either source data, or, most importantly, it can take the records from record adapters or other components in the pipeline, and transform them further, according to your needs.
It can have only one output. Do not emit empty records from your Java manipulator, that is record objects with no
PVal
objects specified. This can cause Forge to abort processing after acquiring the empty record.It has a simplified debugging mechanism. You import the JVM
java.util.logging.Logger
into your Java manipulator code. You can then make calls to theLogger
object in different parts of your code to print the logging messages that are logged in the Forge log.It can transform your records in any way you want; it isn't limited to just changing
Pval
values.