@ComponentProfile(summary="Concatenate various metadata values into one", tag="service,metadata") public class MetadataAppenderService extends MetadataServiceImpl
If any value associated with a metadata key is null, then that value will be ignored.
In the adapter configuration file this class is aliased as metadata-appender-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 |
---|
MetadataAppenderService()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addAppendKey(java.lang.String string)
Adds a metadata key whose value to append.
|
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
java.util.List<java.lang.String> |
getAppendKeys()
Returns the
List of metadata keys whose values are to be
appended. |
java.lang.String |
getResultKey()
Returns the metadata key that the concatenated metadata values will be
stored against.
|
void |
setAppendKeys(java.util.List<java.lang.String> l)
Sets the
List of metadata keys whose values are to be
appended. |
void |
setResultKey(java.lang.String string)
Sets the metadata key that the concatenated metadata values will be stored
against.
|
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 MetadataAppenderService()
Creates a new instance. Default key for result metatadata is 'metadata-appender-service'.
public void doService(AdaptrisMessage msg)
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processpublic java.util.List<java.lang.String> getAppendKeys()
Returns the List
of metadata keys whose values are to be
appended.
List
of metadata keys whose values are to be
appendedpublic void setAppendKeys(java.util.List<java.lang.String> l)
Sets the List
of metadata keys whose values are to be
appended.
l
- the List
of metadata keys whose values are to be
appendedpublic void addAppendKey(java.lang.String string)
Adds a metadata key whose value to append.
string
- the metadata key whose value to append, may not be null or
empty.public java.lang.String getResultKey()
Returns the metadata key that the concatenated metadata values will be stored against.
public void setResultKey(java.lang.String string)
Sets the metadata key that the concatenated metadata values will be stored against.
string
- the metadata key that the concatenated metadata values will
be stored against, may not be null or empty.