|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.returns.commands.AutoApproveReturnItemStandardChecksCmdImpl
Command used for the base evaluation of whether a return mechandise authorization (RMA) item may be approved programatically. Checks that item creditable (STOREITEM.CREDITABLE). Checks that all components of RMA item are expected for receipt (RMAITEMCMP.SHOULDRECEIVE = Y) or that based on an item setting (STOREITEM.RETURNNOTDESIRED) the merchant doesn't want physical merchandise to be returned (RMAITEMCMP.SHOULDRECEIVE = S). Checks if this RMA item were approved, would the total quantity approved still be within the quantity shipped for the order item (ORDSHIPHST.QYTSHIPPED); Each component is evaluated seperately. Checks if this RMA item were approved, would amount approved for credit still be within the amount deposited against the payment; the order payment is compared to all RMA items from that same order. For each failed test a deny reason is logged against the RMA item. The deny reason codes are ITMNOTCRED, PRODREQ, EXCSHIP, EXCPAY. These are translated to the corresponding store return reason id, before they are logged in RMAIDNYRSN.
Fields inherited from class com.ibm.commerce.command.AbstractECCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.returns.commands.AutoApproveReturnItemStandardChecksCmd |
COPYRIGHT, defaultCommandClassName, NAME |
Constructor Summary | |
AutoApproveReturnItemStandardChecksCmdImpl()
AutoApproveReturnItemStandardChecksCmdImpl constructor. |
Method Summary | |
protected boolean |
areAllComponentsBeingReturned(java.util.Vector vRMAItemCmps,
OrderItemAccessBean orderItemAccessBean,
java.lang.Long itemSpecID)
Checks if any RMA item components are marked as the customer does not intend to return the merchandise. |
protected void |
doStandardChecks()
Performs the non-policy driven logic of auto-approval |
java.util.List |
getRMAItemDenyReasonList()
Get the list of deny reasons for this RMA item |
protected boolean |
isItemCreditable(java.lang.Long itemSpecID)
Check if baseitem represented in RMAitem is creditable |
protected boolean |
isThisWithinAmountPaid(java.util.Vector vRMAItemCmps,
OrderItemAccessBean orderItemAccessBean,
com.ibm.commerce.returns.commands.OrderManagementJDBCHelperAccessBean rmaHelperAB)
Checks if this RMA item were approved, would amount approved for credit still be within the amount deposited against the payment; the order payment is compared to all RMA items from that same order. |
protected boolean |
isThisWithinQuantityShipped(java.util.Vector vRMAItemCmps,
OrderItemAccessBean orderItemAccessBean,
com.ibm.commerce.returns.commands.OrderManagementJDBCHelperAccessBean rmaHelperAB)
Checks if this RMA item were approved, would the total quantity approved still be within the quantity shipped for the order item; Each component is evaluated seperately. |
void |
performExecute()
Execute the command. |
void |
reset()
This method is called after a command has been executed to reset its states variables. |
void |
setRMAItemAB(RMAItemAccessBean RMAItemAB)
Set the RMA item being accessed. |
void |
setRMAItemDenyReasonList(java.util.List RMAItemDenyReasonList)
Set the list of deny reason id for this RMA item |
void |
validateParameters()
Performs server side parameter checking. |
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, 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.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Constructor Detail |
public AutoApproveReturnItemStandardChecksCmdImpl()
Method Detail |
protected boolean areAllComponentsBeingReturned(java.util.Vector vRMAItemCmps, OrderItemAccessBean orderItemAccessBean, java.lang.Long itemSpecID) throws javax.ejb.FinderException, java.rmi.RemoteException, javax.naming.NamingException, javax.ejb.CreateException
vRMAItemCmps
- Vector if RMA item componentsorderItemAccessBean
- Order item access beanitemSpecID
- Item Specification Idprotected void doStandardChecks() throws javax.ejb.FinderException, java.rmi.RemoteException, javax.naming.NamingException, javax.ejb.CreateException, ECException
public java.util.List getRMAItemDenyReasonList()
getRMAItemDenyReasonList
in interface AutoApproveReturnItemStandardChecksCmd
protected boolean isItemCreditable(java.lang.Long itemSpecID) throws javax.ejb.FinderException, java.rmi.RemoteException, javax.naming.NamingException, javax.ejb.CreateException, ECException
itemSpecID
- item specification Idprotected boolean isThisWithinAmountPaid(java.util.Vector vRMAItemCmps, OrderItemAccessBean orderItemAccessBean, com.ibm.commerce.returns.commands.OrderManagementJDBCHelperAccessBean rmaHelperAB) throws javax.ejb.FinderException, java.rmi.RemoteException, javax.naming.NamingException, javax.ejb.CreateException, java.sql.SQLException
vRMAItemCmps
- Vector of the RMA Item's componentsorderItemAccessBean
- access bean of the order item associated with this RMA item, if any.rmaHelperAB
- Initialized instance of the return processing helperprotected boolean isThisWithinQuantityShipped(java.util.Vector vRMAItemCmps, OrderItemAccessBean orderItemAccessBean, com.ibm.commerce.returns.commands.OrderManagementJDBCHelperAccessBean rmaHelperAB) throws javax.ejb.FinderException, java.rmi.RemoteException, javax.naming.NamingException, javax.ejb.CreateException, java.sql.SQLException
vRMAItemCmps
- Vector of the RMA Item's componentsorderItemAccessBean
- access bean of the order item associated with this RMA item, if any.rmaHelperAB
- Initialized instance of the return processing helperpublic void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.public void reset()
AbstractECCommand
reset
in class AbstractECCommand
public void setRMAItemAB(RMAItemAccessBean RMAItemAB)
setRMAItemAB
in interface AutoApproveReturnItemStandardChecksCmd
RMAitemAB
- the RMA item access bean.public void setRMAItemDenyReasonList(java.util.List RMAItemDenyReasonList)
setRMAItemDenyReasonList
in interface AutoApproveReturnItemStandardChecksCmd
RMAItemDenyReasonList
- List of deny reason ids applicable to this RMA itempublic void validateParameters() throws ECException
ECCommand
validateParameters
in interface ECCommand
validateParameters
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
ECException.
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |