@ComponentProfile(summary="Convert object metadata into normal metadata", tag="service,metadata") public class ConvertObjectMetadataService extends MetadataServiceImpl
Implementation of Service
that copies Object metadata to standard metadata, overwriting standard metadata.
Object Metadata values are not easily translated to Strings; Object.toString()
is used to perform the string conversion;
this may produce metadata values that have no semantic meaning. The key from object metadata is preserved as the metadata key for
the new element. Internally, the adapter uses String keys for object metadata; however this is not enforced for custom services,
so behaviour may vary depending on what custom components are in use as the key names may not be consistent or predictable.
In the adapter configuration file this class is aliased as convert-object-metadata-service which is the preferred alternative to the fully qualified classname when building your configuration.
MetadataServiceImpl.LogWrapper
DEBUG, ERROR, INFO, TRACE, WARN
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
ConvertObjectMetadataService() |
ConvertObjectMetadataService(java.lang.String regexp) |
Modifier and Type | Method and Description |
---|---|
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
java.lang.String |
getObjectMetadataKeyRegexp() |
protected void |
initService() |
void |
setObjectMetadataKeyRegexp(java.lang.String s)
Set the regular expression used to parse object metadata keys.
|
closeService, getMetadataLogger, logMetadata, logMetadata, logMetadata, logMetadata, prepare, setMetadataLogger, withMetadataLogger
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsConfirmation, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isConfirmation, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, rethrowServiceException, retrieveComponentState, setContinueOnFail, setIsConfirmation, setIsTrackingEndpoint, setLookupName, setUniqueId, start, stop
public ConvertObjectMetadataService()
public ConvertObjectMetadataService(java.lang.String regexp)
public void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
sprotected void initService() throws CoreException
initService
in class MetadataServiceImpl
CoreException
public java.lang.String getObjectMetadataKeyRegexp()
public void setObjectMetadataKeyRegexp(java.lang.String s)
s
- Pattern