java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.inventory.commands.MakeReceiptAvailableCmdImpl
Default implementation of the MakeReceiptAvailableCmd
interface. Makes a receipt available to the distribution arrangement.
Uses the following access beans:
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT The internal copyright field. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.inventory.commands. MakeReceiptAvailableCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
MakeReceiptAvailableCmdImpl() |
Method Summary | |
---|---|
java.lang.Long |
getDistArrangId() Returns distribution arrangement identifier. |
java.lang.Long |
getItemspcId() Return item identifier. |
java.lang.Long |
getRcptAvailId() Return available receipt identifier. |
java.lang.Long |
getReceiptId() Return the receipt identifier. |
boolean |
isReadyToCallExecute() Identifies whether this command is ready to be executed. |
void |
performExecute() Makes a receipt available to the distribution arrangement. |
void |
reset() Resets the command local variable. |
void |
setDistArrangId(java.lang.Long newDistArrangId) Set distribution arrangement identifier. |
void |
setItemspcId(java.lang.Long newItemspcId) Set item identifier. |
void |
setRcptAvailId(java.lang.Long newRcptAvailId) Set available receipt identifier. |
void |
setReceiptId(java.lang.Long newReceiptId) Set the receipt identifier. |
void |
setRequestProperties(
TypedProperty newRequestProperties) Set request properties. |
void |
validateParameters() Checks the information needed for making a receipt available. |
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,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public MakeReceiptAvailableCmdImpl()
Method Detail |
---|
public java.lang.Long getDistArrangId()
MakeReceiptAvailableCmd
getDistArrangId
in interface
MakeReceiptAvailableCmd
MakeReceiptAvailableCmd.getDistArrangId()
,
setDistArrangId(java.lang.Long)
public java.lang.Long getItemspcId()
MakeReceiptAvailableCmd
getItemspcId
in interface
MakeReceiptAvailableCmd
MakeReceiptAvailableCmd.getItemspcId()
,
setItemspcId(java.lang.Long)
public java.lang.Long getRcptAvailId()
MakeReceiptAvailableCmd
getRcptAvailId
in interface
MakeReceiptAvailableCmd
MakeReceiptAvailableCmd.getRcptAvailId()
,
setRcptAvailId(java.lang.Long)
public java.lang.Long getReceiptId()
MakeReceiptAvailableCmd
getReceiptId
in interface
MakeReceiptAvailableCmd
MakeReceiptAvailableCmd.getReceiptId()
,
setReceiptId(java.lang.Long)
public void setDistArrangId(java.lang.Long newDistArrangId)
MakeReceiptAvailableCmd
setDistArrangId
in interface
MakeReceiptAvailableCmd
newDistArrangId
- distribution arrangement identifierMakeReceiptAvailableCmd.setDistArrangId(java.lang.Long)
,
getDistArrangId()
public void setItemspcId(java.lang.Long newItemspcId)
MakeReceiptAvailableCmd
setItemspcId
in interface
MakeReceiptAvailableCmd
newItemspcId
- item identifierMakeReceiptAvailableCmd.setItemspcId(java.lang.Long)
,
getItemspcId()
public void setRcptAvailId(java.lang.Long newRcptAvailId)
MakeReceiptAvailableCmd
setRcptAvailId
in interface
MakeReceiptAvailableCmd
newRcptAvailId
- available receipt identifierMakeReceiptAvailableCmd.setRcptAvailId(java.lang.Long)
,
getRcptAvailId()
public void setReceiptId(java.lang.Long newReceiptId)
MakeReceiptAvailableCmd
setReceiptId
in interface
MakeReceiptAvailableCmd
newReceiptId
- receipt identifierMakeReceiptAvailableCmd.setReceiptId(java.lang.Long)
,
getReceiptId()
public void setRequestProperties(TypedProperty newRequestProperties) throws ECApplicationException
setRequestProperties
in interface
MakeReceiptAvailableCmd
newRequestProperties
- request properties
ECApplicationException
public boolean isReadyToCallExecute()
isReadyToCallExecute
in class
AbstractECTargetableCommand
public void validateParameters() throws ECException
Parameters:
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECApplicationException
- If mandatory parameters are not passed in,
specify _ERR_BAD_MISSING_CMD_PARAMETERECException
public void performExecute() throws ECException
This is done by inserting a row into RCPTAVAIL table associating the receipt with the distribution arrangement.
The distribution arrangement will have a picking method of either LIFO or FIFO. If the picking method of the distribution arrangment is FIFO, the precedence of the rcptavail row will be MAX(precedence)+1. If the picking method of the distribution arrangment is LIFO, the precedence of the rcptavail row will be MIN(precedence)-1. If there are no rows in the rcptavail table, the precedence of the rcptavail row will be 1.
If distribution arrangement parameter is null, uses ItemSpecificationAccessBean and DistributionArrangementAccessBean to retrieve the base item id from the item specified id. Or if there is still no distribution arrangement, create one. This behavior allows a store to always allocate from inventory that it owns.
Uses InventoryJDBCHelperAccessBean().findAvailableReceiptMaxAndMinPrecedence to get the next precedence to use for new RCPTAVAIL row. Uses AvailableReceiptAccessBean to create and populate the row.
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
-
public void reset()
reset
in class
AbstractECTargetableCommand