java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.returns.commands.ReturnItemToInventoryCmdImpl
Default implementation of the task command
ReturnItemToInventoryCmd
interface. Command used to return
merchandise to pool of inventory which can be used for new inventory
allocations. If a new receipt must be created because of the trackable status
of the item, it is done by calling CreateReceiptCmd. The values required by
CreateReceiptCmd are calculated within this command.
Utilizes these access beans
ReceiptAccessBean
StoreEntityAccessBean
VersionSpecificationAccessBean
ItemSpecificationAccessBean
StoreItemAccessBean
OrderItemShippingHistoryAccessBean
InventoryJDBCHelperAccessBean
Field Summary |
---|
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.returns.commands. ReturnItemToInventoryCmd |
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 | |
---|---|
ReturnItemToInventoryCmdImpl() ReturnItemToInventoryCmdImpl constructor. |
Method Summary | |
---|---|
protected
void |
callCreateReceipt(java.lang.Integer quantity, java.lang.Long vendorID,
java.math.BigDecimal cost, java.lang.String ccurr,
java.lang.Long rtnRcptDspId) Calls CreateReceipt command for creating a receipt |
void |
createItemffmctr(java.lang.Long itemspcId) The createItemffmctr method is called to add a new row in itemffmctr for this item, store and fufillment center when a receipt is created. |
protected
void |
formulateNewReceipt() Determine what values the new receipt should have |
protected
boolean |
isItemTrackable() Whether the baseitem is marked trackable for inventory purposes. |
protected
void |
lookupOriginalReceipt() Resolve required values not passed as arguments |
void |
performExecute() Execute the command. |
void |
reset() This method should be called after a command has been executed to reset its states variables. |
void |
setDispositionDate(java.sql.Timestamp DispositionDate) Set the date the new inventory receipt(s) are for |
void |
setFulfillmentCenter(java.lang.Integer ffmCenterId) Set the fulfillment center to which inventory is being returned. |
void |
setOrderItemsId(java.lang.Long orderItemsId) Set the order item from which the merchandise in question came. |
void |
setQuantity(java.lang.Integer quantity) Set the quantity to returned to inventory. |
void |
setRtnRcptDspId(java.lang.Long rtnRcptDspId) Set the Return Receipt Dispositionthe new inventory receipt(s) are for |
void |
setVersionSpecId(java.lang.Long versionSpecId) Set the order item from which the merchandise in question came. |
void |
validateParameters() Check parameters. |
protected
boolean |
wasItemTrackableAtAllocation() Was inventory for item trackable at the time of allocation. |
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 |
Constructor Detail |
---|
public ReturnItemToInventoryCmdImpl()
Method Detail |
---|
protected void callCreateReceipt(java.lang.Integer quantity, java.lang.Long vendorID, java.math.BigDecimal cost, java.lang.String ccurr, java.lang.Long rtnRcptDspId) throws ECException
quantity
- inventory quantityvendorID
- vendor idcost
- unit costccurr
- currencyrtnRcptDspId
- return receipt disposition idECException
protected void formulateNewReceipt() throws FinderException, java.rmi.RemoteException, javax.naming.NamingException, CreateException, ECException
FinderException
java.rmi.RemoteException
javax.naming.NamingException
CreateException
ECException
protected boolean isItemTrackable() throws FinderException, java.rmi.RemoteException, javax.naming.NamingException, CreateException, ECException
FinderException
java.rmi.RemoteException
javax.naming.NamingException
CreateException
ECException
protected void lookupOriginalReceipt() throws FinderException, java.rmi.RemoteException, javax.naming.NamingException, CreateException, ECException
FinderException
java.rmi.RemoteException
javax.naming.NamingException
CreateException
ECException
public void performExecute() throws ECException
There's 4 different scenarios that have to be covered and how we handle them
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void reset()
AbstractECTargetableCommand
reset
in class
AbstractECTargetableCommand
public void setDispositionDate(java.sql.Timestamp DispositionDate)
setDispositionDate
in interface
ReturnItemToInventoryCmd
DispositionDate
- Return Receipt Dispostion
Datepublic void setFulfillmentCenter(java.lang.Integer ffmCenterId)
setFulfillmentCenter
in interface
ReturnItemToInventoryCmd
ffmCenterId
- Fulfillment Center
identifierpublic void setOrderItemsId(java.lang.Long orderItemsId)
setOrderItemsId
in interface
ReturnItemToInventoryCmd
orderItemsId
- Order Item identifierpublic void setQuantity(java.lang.Integer quantity)
setQuantity
in interface
ReturnItemToInventoryCmd
quantity
- Inventory Quantitypublic void setRtnRcptDspId(java.lang.Long rtnRcptDspId)
setRtnRcptDspId
in interface
ReturnItemToInventoryCmd
rtnRcptDspId
- Return Receipt Dispostion
IDpublic void setVersionSpecId(java.lang.Long versionSpecId)
setVersionSpecId
in interface
ReturnItemToInventoryCmd
versionSpecId
- Order Item identifierpublic void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECApplicationException
- If required parameters not specified or
parameters are invalid, throws
com.ibm.commerce.exception.ECApplicationException with
ECMessage._ERR_BAD_MISSING_CMD_PARAMETERECException
protected boolean wasItemTrackableAtAllocation() throws FinderException, java.rmi.RemoteException, javax.naming.NamingException, CreateException, ECException
FinderException
java.rmi.RemoteException
javax.naming.NamingException
CreateException
ECException
public void createItemffmctr(java.lang.Long itemspcId) throws ECException
itemspcId
- item specified idECException