...
Create a new Java class that implements
ddf.catalog.transform.QueryResponseTransformer.
Code Block public class SampleResponseTransformer implements ddf.catalog.transform.QueryResponseTransformer
Implement the
transform
method.Code Block public BinaryContent transform(SourceResponse upstreamResponse, Map<String, Serializable> arguments) throws CatalogTransformerException
Import the
interface packages to the bundle manifest (in addition to any other required packages).Insert excerpt ApplicationName ApplicationName nopanel trueApplicationName Code Block xml xml Import-Package: ddf.catalog, ddf.catalog.transform
Create an OSGi descriptor file to communicate with the OSGi Service Registry (described in the Working with OSGi section). Export the service to the OSGi registry and declare service properties.
Code Block xml xml title Blueprint descriptor examplexml ... <service ref="[[SampleResponseTransformer]]" interface="ddf.catalog.transform.QueryResponseTransformer"> <service-properties> <entry key="shortname" value="[[sampletransform]]" /> <entry key="title" value="[[Sample Response Transformer]]" /> <entry key="description" value="[[A new transformer for response queues.]]" /> </service-properties> </service> ...
- Deploy OSGi Bundle to OSGi runtime.
...