public abstract class DataScrubbing extends HubService
Concrete implementations of service will require 2 dates to be provided. The start and end date for the operation. These dates will be used to select the records from the database.
To provide these dates you will do so in the payload of the message, in the form of xml, in the following format (as default);
Notice also the format of the dates, an example; 2011-01-27 14:02:51
<Root>
<fromDate>yyyy-MM-dd hh24:mm:ss</fromDate>
<toDate>yyyy-MM-dd hh24:mm:ss</toDate>
</Root>
You may change the xml to any format you wish, in which case you must set the startDateXpath and the
endDateXpath to retrieve the from date and to date values from your xml. The default expression is
//fromDate/text() and //toDate/text() respectively. The XPath resolution is not namespace aware.
You may also change the format of the date, in which case you will need to modify the dateFormat so
SimpleDateFormat.parse(date) will correctly generate a date from the date string. The default format is
yyyy-MM-dd HH:mm:ss
CONSTRAINT_EXCEPTION, DEADLOCK_EXCEPTIONlogCONFIRMATION_ID_KEY| Constructor and Description |
|---|
DataScrubbing() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doLogging(AdaptrisMessage msg) |
java.lang.String |
getDateFormat() |
protected java.util.Date |
getEndDate(AdaptrisMessage msg) |
java.lang.String |
getEndDateXpath() |
KeyValuePairSet |
getNamespaceContext() |
protected java.util.Date |
getStartDate(AdaptrisMessage msg) |
java.lang.String |
getStartDateXpath() |
DocumentBuilderFactoryBuilder |
getXmlDocumentFactoryConfig() |
protected void |
handleException(java.lang.Exception e) |
protected java.lang.String |
resolve(AdaptrisMessage msg,
java.lang.String xpathExpression) |
void |
setDateFormat(java.lang.String format) |
void |
setEndDateXpath(java.lang.String xpathExpression) |
void |
setNamespaceContext(KeyValuePairSet namespaceContext) |
void |
setStartDateXpath(java.lang.String xpathExpression) |
void |
setXmlDocumentFactoryConfig(DocumentBuilderFactoryBuilder xml) |
closeService, commit, currentFactory, executeWithStopwatch, getStopwatchEnabled, initService, isEnabled, parseExceptionForCause, parseExceptionForRetryCauses, prepareService, setStopwatchEnabled, start, stop, stopwatchEnabledpreparechangeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsConfirmation, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isConfirmation, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, rethrowServiceException, retrieveComponentState, setContinueOnFail, setIsConfirmation, setIsTrackingEndpoint, setLookupName, setUniqueIdprotected java.util.Date getStartDate(AdaptrisMessage msg) throws ServiceException
ServiceExceptionprotected java.util.Date getEndDate(AdaptrisMessage msg) throws ServiceException
ServiceExceptionprotected void doLogging(AdaptrisMessage msg) throws ServiceException
ServiceExceptionprotected void handleException(java.lang.Exception e)
throws ServiceException
ServiceExceptionprotected java.lang.String resolve(AdaptrisMessage msg, java.lang.String xpathExpression) throws ServiceException
ServiceExceptionpublic java.lang.String getStartDateXpath()
public void setStartDateXpath(java.lang.String xpathExpression)
public java.lang.String getEndDateXpath()
public void setEndDateXpath(java.lang.String xpathExpression)
public java.lang.String getDateFormat()
public void setDateFormat(java.lang.String format)
public KeyValuePairSet getNamespaceContext()
public void setNamespaceContext(KeyValuePairSet namespaceContext)
public DocumentBuilderFactoryBuilder getXmlDocumentFactoryConfig()
public void setXmlDocumentFactoryConfig(DocumentBuilderFactoryBuilder xml)
Copyright Adaptris