public class FrameworkProducer
extends org.apache.camel.impl.DefaultProducer
Producer would map
to a Camel catalog:framework. The message sent to
this component should have header named "operation" with a value of "CREATE", "UPDATE" or
"DELETE".
For the CREATE and UPDATE operation, the message body can contain a List of
Metacards or a single Metacard object.
For the DELETE operation, the message body can contain a List of String or a single String object. The String objects represent the IDs of
Metacards that you would want to delete.
The exchange's "in" message will be set with the affected Metacards. In the case of a CREATE, it will be updated with the created Metacards. In the case of the UPDATE, it will be updated with the updated Metacards and with the DELETE it will contain the deleted Metacards.
| USE CASE | ROUTE NODE | HEADER | MESSAGE BODY | EXCHANGE MODIFICATION |
|---|---|---|---|---|
| Create Metacard(s) | catalog:framework | operation:CREATE | List<Metacard> or Metacard | exchange.getIn().getBody() updated with List of Metacards created |
| Update Metacard(s) | catalog:framework | operation:UPDATE | List<Metacard> or Metacard | exchange.getIn().getBody() updated with List of Metacards updated |
| Delete Metacard(s) | catalog:framework | operation:DELETE | List<String> or String (IDs of Metacards to delete) | exchange.getIn().getBody() updated with List of Metacards deleted |
| Constructor and Description |
|---|
FrameworkProducer(org.apache.camel.Endpoint endpoint,
CatalogFramework catalogFramework)
Constructs the
Producer for the custom Camel CatalogComponent. |
| Modifier and Type | Method and Description |
|---|---|
void |
process(org.apache.camel.Exchange exchange) |
createExchange, createExchange, createExchange, doStart, doStop, getEndpoint, isSingleton, toStringdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic FrameworkProducer(org.apache.camel.Endpoint endpoint,
CatalogFramework catalogFramework)
Producer for the custom Camel CatalogComponent.endpoint - the Camel endpoint that created this consumercatalogFramework - the DDF Catalog Framework to usepublic void process(org.apache.camel.Exchange exchange)
throws FrameworkProducerException
FrameworkProducerExceptionThis work is licensed under a Creative Commons Attribution 4.0 International License.