Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  1. Create a new Java class that implements ddf.catalog.transform.QueryResponseTransformer.

    Code Block
    public class SampleResponseTransformer implements ddf.catalog.transform.QueryResponseTransformer
    
  2. Implement the transform method.

    Code Block
    public BinaryContent transform(SourceResponse upstreamResponse, Map<String, Serializable> arguments) throws CatalogTransformerException
    
  3. Import the 

    Insert excerpt
    ApplicationName
    ApplicationName
    nopaneltrueApplicationName
    interface packages to the bundle manifest (in addition to any other required packages).

    Code Block
    xml
    xml
    Import-Package: ddf.catalog, ddf.catalog.transform
    
  4. 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
    titleBlueprint 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>
    ... 
  5. Deploy OSGi Bundle to OSGi runtime.

...