Class ReformatMetadata
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.services.metadata.MetadataServiceImpl
-
- com.adaptris.core.services.metadata.ReformatMetadata
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
,Service
,MetadataReformatter
,StateManagedComponent
- Direct Known Subclasses:
Base64MetadataService
,HexToStringService
,MetadataHashingService
,MetadataValueEscapeDoubleQuote
,MetadataValueEscapeSingleQuote
,MetadataValueToLowerCase
,MetadataValueToUpperCase
,ReformatDateService
,ReplaceMetadataValue
,TrimMetadataService
,UrlDecodeMetadataService
,UrlEncodeMetadataService
public abstract class ReformatMetadata extends MetadataServiceImpl implements MetadataReformatter
Implementation of
Service
that reformats matching metadata.Each matching metadata key from
getMetadataKeyRegexp()
will be taken and passed to concrete subclasses to modify.
-
-
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 ReformatMetadata()
ReformatMetadata(java.lang.String regexp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doService(AdaptrisMessage msg)
Adds the configured metadata to the message.java.lang.String
getMetadataKeyRegexp()
void
setMetadataKeyRegexp(java.lang.String s)
Set the regular expression to match 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.services.metadata.MetadataReformatter
reformat, reformat
-
-
-
-
Method Detail
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
Adds the configured metadata to the message.
- Specified by:
doService
in interfaceService
- Parameters:
msg
- the message to process- Throws:
ServiceException
- wrapping any underlyingException
s
-
getMetadataKeyRegexp
public java.lang.String getMetadataKeyRegexp()
- Returns:
- the metadataKeyRegexp
-
setMetadataKeyRegexp
public void setMetadataKeyRegexp(java.lang.String s)
Set the regular expression to match against.- Parameters:
s
- the metadataKeyRegexp to set
-
-