Class MetadataAppenderService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.services.metadata.MetadataServiceImpl
-
- com.adaptris.core.services.metadata.MetadataAppenderService
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
,Service
,StateManagedComponent
@ComponentProfile(summary="Concatenate various metadata values into one", tag="service,metadata") public class MetadataAppenderService extends MetadataServiceImpl
Service to append multiple metadata keys together to form a new key.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adaptris.core.services.metadata.MetadataServiceImpl
MetadataServiceImpl.LogWrapper
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.services.metadata.MetadataServiceImpl
DEBUG, ERROR, INFO, TRACE, WARN
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description MetadataAppenderService()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 theList
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 theList
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.-
Methods inherited from class com.adaptris.core.services.metadata.MetadataServiceImpl
closeService, getMetadataLogger, initService, logMetadata, logMetadata, logMetadata, logMetadata, prepare, setMetadataLogger, withMetadataLogger
-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
-
-
-
Method Detail
-
doService
public void doService(AdaptrisMessage msg)
Description copied from interface:Service
Apply the service to the message.
- Parameters:
msg
- theAdaptrisMessage
to process
-
getAppendKeys
public java.util.List<java.lang.String> getAppendKeys()
Returns the
List
of metadata keys whose values are to be appended.- Returns:
- the
List
of metadata keys whose values are to be appended
-
setAppendKeys
public void setAppendKeys(java.util.List<java.lang.String> l)
Sets the
List
of metadata keys whose values are to be appended.- Parameters:
l
- theList
of metadata keys whose values are to be appended
-
addAppendKey
public void addAppendKey(java.lang.String string)
Adds a metadata key whose value to append.
- Parameters:
string
- the metadata key whose value to append, may not be null or empty.
-
getResultKey
public java.lang.String getResultKey()
Returns the metadata key that the concatenated metadata values will be stored against.
- Returns:
- the metadata key that the concatenated metadata will be stored against
-
setResultKey
public void setResultKey(java.lang.String string)
Sets the metadata key that the concatenated metadata values will be stored against.
- Parameters:
string
- the metadata key that the concatenated metadata values will be stored against, may not be null or empty.
-
-