@ComponentProfile(summary="Copy metadata values to other metadata keys", tag="service,metadata") public class CopyMetadataService extends MetadataServiceImpl
Updates message metadata by
If the configured 'original' metadata key does not exist, then metadata is not copied, if the 'new' metadata key already exists, it is overwritten.
In the adapter configuration file this class is aliased as copy-metadata-service which is the preferred alternative to the fully qualified classname when building your configuration.
MetadataServiceImpl.LogWrapper
DEBUG, ERROR, INFO, TRACE, WARN
log
Constructor and Description |
---|
CopyMetadataService() |
Modifier and Type | Method and Description |
---|---|
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
KeyValuePairCollection |
getMetadataKeys()
Returns a KeyValuePairCollection in which the key is the key
to look up, and the value is the key to store whatever was found against.
|
void |
setMetadataKeys(KeyValuePairCollection m)
Sets a KeyValuePairCollection in which the key is the key to
look up, and the value is the key to store whatever was found against the
key.
|
closeService, getMetadataLogger, initService, logMetadata, logMetadata, logMetadata, logMetadata, prepare, setMetadataLogger, withMetadataLogger
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
public void doService(AdaptrisMessage msg) throws ServiceException
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
spublic KeyValuePairCollection getMetadataKeys()
Returns a KeyValuePairCollection in which the key is the key to look up, and the value is the key to store whatever was found against.
public void setMetadataKeys(KeyValuePairCollection m)
Sets a KeyValuePairCollection in which the key is the key to look up, and the value is the key to store whatever was found against the key.
m
- a KeyValuePairCollection