java.lang.ObjectCacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.TaskCommandImpl
com.ibm.commerce.inventory.commands.AdjustInventoryReservationCmdImpl
Default implementation of the AdjustInventoryReservationCmd interface.
Adjusts the inventory for a given inventory reservation by the amount of the given quantity. Required arguments are inventory reservation number and adjustment quantity (which may be negative).
Behavior:
If quantity argument is negative it means we are releasing inventory. If this is the case, see if we have enough inventory reserved to satisfy the release amount.
If quantity argument is positive it means we are adding inventory to the reservation. If this is the case, see if we have enough inventory to satisfy the additional reservation amount.
Assuming the above edit checks are successful, adjust the quantity reserved by the amount of the quantity argument.
Field Summary | |
static java.lang.String | INVRESERVE_ID Constant InvReserveId. |
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.inventory.commands.AdjustInventoryReservationCmd |
defaultCommandClassName, NAME |
Fields inherited from interface com.ibm.commerce.command.ECCommand |
defaultCommandClassName |
Constructor Summary | |
AdjustInventoryReservationCmdImpl() Constructor for AdjustInventoryReservationCmdImpl. |
Method Summary | |
java.lang.Long | getInvRsrvId() Gets the id of the inventory reservation being adjusted. |
java.lang.Integer | getQuantity() Gets the number of inventory items to be adjusted in the reservation. |
boolean | isGeneric() Checks if command can be run by a generic user. |
boolean | isReadyToCallExecute() Checks if command is ready to be executed (run). |
void | performExecute() Adjust the inventory reservation quantity. |
void | reset() Resets the instance variables, quantity and reservation identifier. |
void | setInvRsrvId(java.lang.Long argInvRsrvId) Identifies the inventory reservation to be adjusted. |
void | setQuantity(java.lang.Integer argQuantity) Sets the adjustment quantity for the inventory reservation negatively or positively. |
void | validateParameters() Validates the command parameters. |
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 INVRESERVE_ID
Constructor Detail |
public AdjustInventoryReservationCmdImpl()
Method Detail |
public void validateParameters() throws ECException
public java.lang.Long getInvRsrvId()
public java.lang.Integer getQuantity()
public boolean isGeneric()
public boolean isReadyToCallExecute()
public void performExecute() throws ECException
public void reset()
public void setInvRsrvId(java.lang.Long argInvRsrvId)
public void setQuantity(java.lang.Integer argQuantity)
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.