public class ReserveInventoryCmdImpl extends TaskCommandImpl implements ReserveInventoryCmd
ReserveInventoryCmd
interface.
This task command creates a reservation of a requested quantity of
inventory of a given item from a given fulfillment center for a given
store. Following a successful reservation, the reservation number may
be obtained by calling the getReserveId() method.
Required parameters are:
Behavior
InventoryReserveAccessBean
ItemFulfillmentCenterAccessBean
InventoryJDBCHelperAccessBean#findAvailQuantityByItemFFCStore
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FFC_ID
Fulfillment center identifier field for this command is
FFCId . |
static java.lang.String |
ITEMSPC_ID
Item specified identifier field for this command is
ItemSpcId . |
static java.lang.String |
RESERVATION_INSTANCE
Reservation instance description field for this command is
ReservationInstance . |
static java.lang.String |
RESERVATION_TYPE
Reservation type field for this command is
ReservationId . |
defaultCommandClassName, NAME
Constructor and Description |
---|
ReserveInventoryCmdImpl()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getFFCId()
Gets the fulfillment center identifier set local for this command.
|
java.lang.Long |
getItemSpcId()
Gets the item specified id set local for this command.
|
java.lang.Integer |
getQuantity()
Gets the reserve quantity set local for this command.
|
java.lang.String |
getReservationInstance()
Gets the reservation instance description set local for this command.
|
java.lang.Long |
getReservationType()
Gets the reservation type set local for this command.
|
java.lang.Long |
getReserveId()
Gets the reserve identifier created from this command.
|
boolean |
isGeneric()
Tells whether this command can be run by a generic user.
|
boolean |
isReadyToCallExecute()
Indicates whether this command is ready to be executed.
|
void |
performExecute()
If quantity available is greater than or equal to quantity
requested.
|
boolean |
performSecurityCheck()
Performs security check.
|
void |
reset()
Resets instance variables.
|
void |
setFFCId(java.lang.Integer argFFCId)
Sets the fulfillment center identifier.
|
void |
setItemSpcId(java.lang.Long argItemSpcId)
Sets the item specified for reservation.
|
void |
setQuantity(java.lang.Integer argQuantity)
Sets the quantity of the reservation.
|
void |
setReservationInstance(java.lang.String argReservationInstance)
Sets the reservation description identifying the instance.
|
void |
setReservationType(java.lang.Long argReservationType)
Sets the reservation type.
|
void |
validateParameters()
Validates the command parameters.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String FFC_ID
FFCId
.public static final java.lang.String ITEMSPC_ID
ItemSpcId
.public static final java.lang.String RESERVATION_INSTANCE
ReservationInstance
.public static final java.lang.String RESERVATION_TYPE
ReservationId
.public ReserveInventoryCmdImpl()
public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException
- Throws ECSystemException, specifies _ERR_DIDNT_SET_MERCHANT
if the storeid isn't set, or _ERR_CMD_MISSING_PARAM if any
of the other fields are missing.public java.lang.Integer getFFCId()
public java.lang.Long getItemSpcId()
public java.lang.Integer getQuantity()
public java.lang.String getReservationInstance()
public java.lang.Long getReservationType()
public java.lang.Long getReserveId()
getReserveId
in interface ReserveInventoryCmd
public boolean isGeneric()
public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
public void performExecute() throws ECException
Utilizes these access beans:
InventoryReserveAccessBean
ItemFulfillmentCenterAccessBean
InventoryJDBCHelperAccessBean#findAvailQuantityByItemFFCStore
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- public boolean performSecurityCheck()
public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand
public void setFFCId(java.lang.Integer argFFCId)
ReserveInventoryCmd
setFFCId
in interface ReserveInventoryCmd
argFFCId
- fulfillment center idpublic void setItemSpcId(java.lang.Long argItemSpcId)
ReserveInventoryCmd
setItemSpcId
in interface ReserveInventoryCmd
argItemSpcId
- item idpublic void setQuantity(java.lang.Integer argQuantity)
ReserveInventoryCmd
setQuantity
in interface ReserveInventoryCmd
argQuantity
- reservation quantitypublic void setReservationInstance(java.lang.String argReservationInstance)
ReserveInventoryCmd
setReservationInstance
in interface ReserveInventoryCmd
argReservationInstance
- reservation descriptionpublic void setReservationType(java.lang.Long argReservationType)
ReserveInventoryCmd
INVRSRVTYP
table.setReservationType
in interface ReserveInventoryCmd
argReservationType
- reservation type