java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.command.BusinessPolicyCommandImpl | +--com.ibm.commerce.returns.commands.AutoApproveReturnItemByDaysPolicyCmdImpl
This is an automatic approval policy implementation based on the number of days since the item was shipped. The property passed to this policy may be of the following form:
days
property is specified then all items will
pass this approval check (that is, there would be no limitation on when items
could be returned).
If the ship date of the item cannot be determined (from the ORDSHIPHST table) then the item will fail this test and not be automatically approved.
If this automatic approval test is unsuccessful then the deny reason 'EXCDATE' will be logged for the RMA item.
Field Summary |
---|
Fields inherited from class com.ibm.commerce.command. BusinessPolicyCommandImpl |
policyId,
requestProperties |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.returns.commands. AutoApproveReturnItemPolicyCmd |
COPYRIGHT,
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
AutoApproveReturnItemByDaysPolicyCmdImpl() AutoApproveReturnItemByDaysPolicyCmdImpl constructor. |
Method Summary | |
---|---|
protected
void |
autoApproveRMAItem() Calculate whether the RMA item can be approved programatically based on the number of days since the item was shipped. |
protected
void |
determineDenyReason(java.lang.String denyCode) Log a reason for autoapprove denial. |
protected
java.lang.Integer |
getDays() Get the number of days in the return period. |
java.util.List |
getRMAItemDenyReasonList() Get the deny reason list. |
void |
performExecute() Execute the command. |
void |
reset() This method should be called after a command has been executed to reset its states variables. |
void |
setRequestProperties(
TypedProperty requestProperties) Set the request properties for the policy. |
void |
setRMAItemAB(
RMAItemAccessBean RMAItemAB) Set the RMA item being accessed. |
void |
setRMAItemDenyReasonList(java.util.List newRMAItemDenyReasons) Set the list of deny reason codes for this RMA item. |
void |
validateParameters() Performs parameter checking. |
Methods inherited from class com.ibm.commerce.command. BusinessPolicyCommandImpl |
getPolicyId,
getRequestProperties,
setPolicyId |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Methods inherited from interface com.ibm.commerce.command. BusinessPolicyCommand |
getPolicyId,
getRequestProperties,
setPolicyId |
Constructor Detail |
---|
public AutoApproveReturnItemByDaysPolicyCmdImpl()
Method Detail |
---|
protected void autoApproveRMAItem() throws FinderException, java.rmi.RemoteException, javax.naming.NamingException, CreateException, ECException
FinderException
java.rmi.RemoteException
javax.naming.NamingException
CreateException
ECException
protected void determineDenyReason(java.lang.String denyCode)
denyCode
- Code, generic across stores, of the deny
reasonprotected java.lang.Integer getDays()
public java.util.List getRMAItemDenyReasonList()
getRMAItemDenyReasonList
in interface
AutoApproveReturnItemPolicyCmd
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void reset()
AbstractECTargetableCommand
reset
in class
AbstractECTargetableCommand
public void setRequestProperties(TypedProperty requestProperties)
setRequestProperties
in interface
BusinessPolicyCommand
setRequestProperties
in class
BusinessPolicyCommandImpl
requestProperties
- The request
properties.public void setRMAItemAB(RMAItemAccessBean RMAItemAB)
setRMAItemAB
in interface
AutoApproveReturnItemPolicyCmd
public void setRMAItemDenyReasonList(java.util.List newRMAItemDenyReasons)
setRMAItemDenyReasonList
in interface
AutoApproveReturnItemPolicyCmd
newRMAItemDenyReasons
- The list of deny reason codes
applicable to this RMA item.public void validateParameters() throws ECException
AbstractECTargetableCommand
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException