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 MetadataServiceImplService 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 voidaddAppendKey(java.lang.String string)Adds a metadata key whose value to append.voiddoService(AdaptrisMessage msg)Apply the service to the message.java.util.List<java.lang.String>getAppendKeys()Returns theListof metadata keys whose values are to be appended.java.lang.StringgetResultKey()Returns the metadata key that the concatenated metadata values will be stored against.voidsetAppendKeys(java.util.List<java.lang.String> l)Sets theListof metadata keys whose values are to be appended.voidsetResultKey(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:ServiceApply the service to the message.
- Parameters:
msg- theAdaptrisMessageto process
-
getAppendKeys
public java.util.List<java.lang.String> getAppendKeys()
Returns the
Listof metadata keys whose values are to be appended.- Returns:
- the
Listof metadata keys whose values are to be appended
-
setAppendKeys
public void setAppendKeys(java.util.List<java.lang.String> l)
Sets the
Listof metadata keys whose values are to be appended.- Parameters:
l- theListof 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.
-
-