Class MakeReceiptAvailableCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.TaskCommandImpl
-
- com.ibm.commerce.inventory.commands.MakeReceiptAvailableCmdImpl
-
- All Implemented Interfaces:
- com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, MakeReceiptAvailableCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
public class MakeReceiptAvailableCmdImpl extends TaskCommandImpl implements MakeReceiptAvailableCmd
Default implementation of theMakeReceiptAvailableCmd
interface. Makes a receipt available to the distribution arrangement.Uses the following access beans:
- ItemSpecificationAccessBean
- DistributionArrangementAccessBean
- InventoryJDBCHelperAccessBean().findAvailableReceiptMaxAndMinPrecedence
- AvailableReceiptAccessBean
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
The internal copyright field.-
Fields inherited from interface com.ibm.commerce.inventory.commands.MakeReceiptAvailableCmd
defaultCommandClassName, NAME
-
-
Constructor Summary
Constructors Constructor and Description MakeReceiptAvailableCmdImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description 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, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
The internal copyright field.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDistArrangId
public java.lang.Long getDistArrangId()
Description copied from interface:MakeReceiptAvailableCmd
Returns distribution arrangement identifier.- Specified by:
getDistArrangId
in interfaceMakeReceiptAvailableCmd
- Returns:
- Distribution arrangement identifier.
- See Also:
MakeReceiptAvailableCmd.getDistArrangId()
,setDistArrangId(java.lang.Long)
-
getItemspcId
public java.lang.Long getItemspcId()
Description copied from interface:MakeReceiptAvailableCmd
Return item identifier.- Specified by:
getItemspcId
in interfaceMakeReceiptAvailableCmd
- Returns:
- Item specified identifier.
- See Also:
MakeReceiptAvailableCmd.getItemspcId()
,setItemspcId(java.lang.Long)
-
getRcptAvailId
public java.lang.Long getRcptAvailId()
Description copied from interface:MakeReceiptAvailableCmd
Return available receipt identifier.- Specified by:
getRcptAvailId
in interfaceMakeReceiptAvailableCmd
- Returns:
- Available receipt identifier.
- See Also:
MakeReceiptAvailableCmd.getRcptAvailId()
,setRcptAvailId(java.lang.Long)
-
getReceiptId
public java.lang.Long getReceiptId()
Description copied from interface:MakeReceiptAvailableCmd
Return the receipt identifier.- Specified by:
getReceiptId
in interfaceMakeReceiptAvailableCmd
- Returns:
- Receipt identifier.
- See Also:
MakeReceiptAvailableCmd.getReceiptId()
,setReceiptId(java.lang.Long)
-
setDistArrangId
public void setDistArrangId(java.lang.Long newDistArrangId)
Description copied from interface:MakeReceiptAvailableCmd
Set distribution arrangement identifier.- Specified by:
setDistArrangId
in interfaceMakeReceiptAvailableCmd
- Parameters:
newDistArrangId
- distribution arrangement identifier- See Also:
MakeReceiptAvailableCmd.setDistArrangId(java.lang.Long)
,getDistArrangId()
-
setItemspcId
public void setItemspcId(java.lang.Long newItemspcId)
Description copied from interface:MakeReceiptAvailableCmd
Set item identifier.- Specified by:
setItemspcId
in interfaceMakeReceiptAvailableCmd
- Parameters:
newItemspcId
- item identifier- See Also:
MakeReceiptAvailableCmd.setItemspcId(java.lang.Long)
,getItemspcId()
-
setRcptAvailId
public void setRcptAvailId(java.lang.Long newRcptAvailId)
Description copied from interface:MakeReceiptAvailableCmd
Set available receipt identifier.- Specified by:
setRcptAvailId
in interfaceMakeReceiptAvailableCmd
- Parameters:
newRcptAvailId
- available receipt identifier- See Also:
MakeReceiptAvailableCmd.setRcptAvailId(java.lang.Long)
,getRcptAvailId()
-
setReceiptId
public void setReceiptId(java.lang.Long newReceiptId)
Description copied from interface:MakeReceiptAvailableCmd
Set the receipt identifier.- Specified by:
setReceiptId
in interfaceMakeReceiptAvailableCmd
- Parameters:
newReceiptId
- receipt identifier- See Also:
MakeReceiptAvailableCmd.setReceiptId(java.lang.Long)
,getReceiptId()
-
setRequestProperties
public void setRequestProperties(TypedProperty newRequestProperties) throws ECApplicationException
Set request properties.- DISTARRANG_ID
- ITEMSPC_ID
- RECEIPT_ID
- Specified by:
setRequestProperties
in interfaceMakeReceiptAvailableCmd
- Parameters:
newRequestProperties
- request properties- Throws:
ECApplicationException
-
isReadyToCallExecute
public boolean isReadyToCallExecute()
Identifies whether this command is ready to be executed.- Specified by:
isReadyToCallExecute
in interfacecom.ibm.websphere.command.Command
- Overrides:
isReadyToCallExecute
in classAbstractECTargetableCommand
- Returns:
- Always true.
-
validateParameters
public void validateParameters() throws ECException
Checks the information needed for making a receipt available.Parameters:
- receipt id (required)
- distribution arrangement id or item specified id (one is required)
- Specified by:
validateParameters
in interfaceECCommand
- Overrides:
validateParameters
in classAbstractECTargetableCommand
- Throws:
ECApplicationException
- If mandatory parameters are not passed in, specify _ERR_BAD_MISSING_CMD_PARAMETERECException
-
performExecute
public void performExecute() throws ECException
Makes a receipt available to the distribution arrangement.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 arrangement is FIFO, the precedence of the rcptavail row will be MAX(precedence)+1. If the picking method of the distribution arrangement 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.
- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
-- ECSystemException Naming error, _ERR_CREATE_EXCEPTION
- ECSystemException Finder error, _ERR_FINDER_EXCEPTION
- ECSystemException Naming error, _ERR_NAMING_EXCEPTION
- ECSystemException Remote error, _ERR_REMOTE_EXCEPTION
-
reset
public void reset()
Resets the command local variable.- Specified by:
reset
in interfacecom.ibm.websphere.command.Command
- Overrides:
reset
in classAbstractECTargetableCommand
-
-