@ComponentProfile(summary="Compare two metadata values and store the result against a 3rd metadata key", tag="service,metadata") public class MetadataComparisonService extends ServiceImp
Service
that compares two items of metadata.
Sometimes you just want to compare two metadata values and store the result against a 3rd metadata key. Well this does that.
In the adapter configuration file this class is aliased as metadata-comparison-service which is the preferred alternative to the fully qualified classname when building your configuration.
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
MetadataComparisonService() |
MetadataComparisonService(java.lang.String first,
java.lang.String second,
MetadataComparator mc) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeService() |
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
MetadataComparator |
getComparator() |
java.lang.String |
getFirstKey() |
java.lang.String |
getSecondKey() |
protected void |
initService() |
void |
prepare()
Prepare for initialisation.
|
void |
setComparator(MetadataComparator mc) |
void |
setFirstKey(java.lang.String key) |
void |
setSecondKey(java.lang.String key) |
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setLookupName, setUniqueId, start, stop
public MetadataComparisonService()
public MetadataComparisonService(java.lang.String first, java.lang.String second, MetadataComparator mc)
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 ServiceImp
CoreException
protected void closeService()
closeService
in class ServiceImp
public void prepare() throws CoreException
ComponentLifecycleExtension
CoreException
public java.lang.String getFirstKey()
public void setFirstKey(java.lang.String key)
public java.lang.String getSecondKey()
public void setSecondKey(java.lang.String key)
public MetadataComparator getComparator()
public void setComparator(MetadataComparator mc)