Developing an Endpoint
Prerequisites
- Understand the desired component for development as described in the DDF Catalog section.
- Review existing implementations in the source code and application documentation.
- Have an IDE and the ability to create OSGi bundles.
- Understand the Use of the Whiteboard Design Pattern section and how to publish services to the OSGi service registry.
Overview
Endpoints expose the Catalog Framework to Endpoint clients that work with metadata. Common Endpoint operations include create, update, delete, and query. SOAP and REST are two example protocols that are exposed as Endpoints. See Included Endpoints for more examples.
Creating a New Endpoint
Creating an Endpoint consists of five main steps:
- Create a Java class that implements the Endpoint's business logic. Example: Creating a web service that external clients can invoke.
- Add Endpoint's business logic, invoking
CatalogFramework
calls as needed. Import the DDF packages to the bundle's manifest for run-time (in addition to any other required packages):
Import-Package: ddf.catalog, ddf.catalog.*
It is recommended to use the maven bundle plugin to create the Endpoint bundle's manifest as opposed to directly editing the manifest file.
- Retrieve an instance of
CatalogFramework
from the OSGi registry.- Check the Working with OSGi - Service Registry section for examples.
- Deploy the packaged service to DDF.
- Check the Working with OSGi - Bundles section.
No implementation of an interface is required
Unlike other DDF components that require you to implement a standard interface, no implementation of an interface is required in order to create an endpoint.
Common Endpoint Business Logic
Methods | Use |
---|---|
Ingest | Add, modify, and remove metadata using the ingest-related CatalogFramework methods: create , update , and delete . |
Query | Request metadata using the query method. |
Source | Get available Source information. |
Resource | Retrieve products referenced in Metacards from Sources. |
Transform | Convert common Catalog Framework data types to and from other data formats. |
See Working with the Catalog Framework for more details.