public class SetPaymentDueDate extends GenericService implements PipelineProcessor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
static int[] |
RETCODES |
static int |
SUCCESS |
SERVICE_INFO_KEY
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACK
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
SetPaymentDueDate() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Date |
computePaymentDueDate(MutableRepositoryItem pInvoice,
InvoiceRequestInfo pInfo)
Compute and return the payment due date for an invoice based
on information in the invoice and the invoice request info object
used to initialize the repository item.
|
protected int |
getErrorReturnCode()
Return the value that the pipeline processor should return to the
pipeline chain in case of error.
|
int[] |
getRetCodes()
Return all possible return values for this processor.
|
boolean |
isEnabled()
Query whether this processor is enabled or disabled.
|
boolean |
isRollbackOnError()
Query whether failure of this processor is considered a fatal error.
|
int |
runProcess(java.lang.Object pParam,
PipelineResult pResult)
Copy properties from an InvoiceRequestInfo object into the corresponding
Invoice repository item, where both objects are obtained from the invoice
pipeline arguments supplied to this pipeline processor.
|
void |
setEnabled(boolean pEnabled)
Set the flag that allows applications to enable or disable this
pipeline processor without having to reconfigure the invoice pipeline.
|
void |
setRollbackOnError(boolean pRollbackOnError)
Specify whether or failure in this processor is considered fatal
error.
|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
public static final int SUCCESS
public static final int[] RETCODES
public void setEnabled(boolean pEnabled)
public boolean isEnabled()
public void setRollbackOnError(boolean pRollbackOnError)
public boolean isRollbackOnError()
protected java.util.Date computePaymentDueDate(MutableRepositoryItem pInvoice, InvoiceRequestInfo pInfo)
By default this method returns a date pInfo.netDays from today. It does not try to account for weekends, holidays, or other non-business days.
Application-specific subclasses can extend this logic by overriding computePaymentDueDate and calling the superclass method to compute the basic due date, then adjusting the resulting date and returning the adjusted value.
public int runProcess(java.lang.Object pParam, PipelineResult pResult)
runProcess
in interface PipelineProcessor
pParam
- Pipeline parameters, which should be an instance of InvoicePipelineArgs.pResult
- Standard pipeline result object.protected int getErrorReturnCode()
rollbackOnError
property.public int[] getRetCodes()
getRetCodes
in interface PipelineProcessor