public class ReturnBaseCmdImpl extends ControllerCommandImpl
Modifier and Type | Field and Description |
---|---|
protected static int | ADMIN_RETURN_EDITOR
A caller
|
static java.lang.String | COPYRIGHT
Copyright statement.
|
Constructor and Description |
---|
ReturnBaseCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected void | checkAndCSRLock(java.lang.Long rmaId) |
protected void | checkAndCSRLock(java.lang.Long[] rmaIds) |
protected void | checkAndUnlock(java.lang.Long rmaId) |
protected void | checkAndUnlock(java.lang.Long[] rmaIds) |
protected void | checkLock(java.lang.Long rmaId) |
protected void | checkLock(java.lang.Long[] rmaIds) |
protected void | checkThreshold(com.ibm.commerce.order.utils.ThresholdCheckContext context)
Performs a check to see if the threshold has been exceeded in the given context.
|
protected void | forceUnlock(java.lang.Long rmaId) |
protected void | forceUnlock(java.lang.Long[] rmaIds) |
protected com.ibm.commerce.order.utils.AdminConfigLoader<com.ibm.commerce.order.utils.OrderThreshold.Part> | getAdminConfigLoader()
Returns the object that is used to get thresholds.
|
protected boolean | isThresholdAcceptable(com.ibm.commerce.order.utils.ThresholdCheckContext context)
Returns whether the threshold in the given context has been exceeded.
|
protected boolean | lock(java.lang.Long[] rmaIds, boolean takeOverLock) |
protected boolean | lock(java.lang.Long rmaId, boolean takeOverLock) |
protected void | thresholdExceeded(com.ibm.commerce.order.utils.ThresholdCheckContext context)
Takes some action to react to a threshold that has been exceeded.
|
public static final java.lang.String COPYRIGHT
protected static final int ADMIN_RETURN_EDITOR
protected void checkLock(java.lang.Long rmaId) throws ECException
protected void checkAndCSRLock(java.lang.Long rmaId) throws ECException
protected void checkAndUnlock(java.lang.Long rmaId) throws ECException
protected void checkAndCSRLock(java.lang.Long[] rmaIds) throws ECException
protected void checkAndUnlock(java.lang.Long[] rmaIds) throws ECException
protected void checkLock(java.lang.Long[] rmaIds) throws ECException
protected boolean lock(java.lang.Long rmaId, boolean takeOverLock) throws ECException
protected boolean lock(java.lang.Long[] rmaIds, boolean takeOverLock) throws ECException
protected void forceUnlock(java.lang.Long rmaId) throws ECException
protected void forceUnlock(java.lang.Long[] rmaIds) throws ECException
protected com.ibm.commerce.order.utils.AdminConfigLoader<com.ibm.commerce.order.utils.OrderThreshold.Part> getAdminConfigLoader()
protected final void checkThreshold(com.ibm.commerce.order.utils.ThresholdCheckContext context) throws ECException
The different situations that result in a call to this method are described by the constants in OrderThreshold. See ThresholdCheckContext for instructions on how to create a ThresholdCheckContext.
This method cannot be overridden, in order to ensure that the basic flow of "check" followed by "action" is performed. However, the "check" and "action" steps can both be customized by overriding the corresponding methods. In order to customize, override isThresholdAcceptable(ThresholdCheckContext) or thresholdExceeded(ThresholdCheckContext).
protected boolean isThresholdAcceptable(com.ibm.commerce.order.utils.ThresholdCheckContext context)
The default behavior depends on the type of threshold. For a quantity, the value will be directly compared with the threshold. For a non-quantity threshold, the value will be added to the current amount and compared with the threshold.
protected void thresholdExceeded(com.ibm.commerce.order.utils.ThresholdCheckContext context) throws ECException
The default behavior is to throw an exception with an error message that explains the problem to the user (by calling ThresholdCheckContext.throwDefaultException()). A message is also written to the log file for the administrator (by calling ThresholdCheckContext.log(Logger, String)).