com.ibm.commerce.inventory.commands
Class MakeReceiptAvailableCmdImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.inventory.commands.MakeReceiptAvailableCmdImpl
All Implemented Interfaces:
ECCommand, MakeReceiptAvailableCmd, TaskCommand

public class MakeReceiptAvailableCmdImpl
extends TaskCommandImpl
implements MakeReceiptAvailableCmd

Make a receipt available to the distribution arrangement.


Field Summary
static java.lang.String COPYRIGHT
          The internal copyright field.
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.inventory.commands.MakeReceiptAvailableCmd
defaultCommandClassName, NAME
 
Constructor Summary
MakeReceiptAvailableCmdImpl()
           
 
Method Summary
 java.lang.Long getDistArrangId()
          Return 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()
          This command is ready to be executed.
 void performExecute()
          This method will make a receipt available to the distribution arrangement.
 void reset()
          This method 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()
          This method checks the information needed for making a receipt available.
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
The internal copyright field.
Constructor Detail

MakeReceiptAvailableCmdImpl

public MakeReceiptAvailableCmdImpl()
Method Detail

getDistArrangId

public java.lang.Long getDistArrangId()
Return distribution arrangement identifier.
Specified by:
getDistArrangId in interface MakeReceiptAvailableCmd
Returns:
java.lang.Long

getItemspcId

public java.lang.Long getItemspcId()
Return item identifier.
Specified by:
getItemspcId in interface MakeReceiptAvailableCmd
Returns:
java.lang.Long

getRcptAvailId

public java.lang.Long getRcptAvailId()
Return available receipt identifier.
Specified by:
getRcptAvailId in interface MakeReceiptAvailableCmd
Returns:
java.lang.Long

getReceiptId

public java.lang.Long getReceiptId()
Return the receipt identifier.
Specified by:
getReceiptId in interface MakeReceiptAvailableCmd
Returns:
java.lang.Long

isReadyToCallExecute

public boolean isReadyToCallExecute()
This command is ready to be executed.
Overrides:
isReadyToCallExecute in class AbstractECCommand
Following copied from class: com.ibm.commerce.command.AbstractECCommand
Returns:
boolean - true if we can execute the command false if we canot execute the command

performExecute

public void performExecute()
                    throws ECException
This method will make 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 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.

Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECCommand
Throws:
ECException -  

reset

public void reset()
This method resets the command local variable.
Overrides:
reset in class AbstractECCommand

setDistArrangId

public void setDistArrangId(java.lang.Long newDistArrangId)
Set distribution arrangement identifier.
Specified by:
setDistArrangId in interface MakeReceiptAvailableCmd
Parameters:
newDistArrangId - java.lang.Long

setItemspcId

public void setItemspcId(java.lang.Long newItemspcId)
Set item identifier.
Specified by:
setItemspcId in interface MakeReceiptAvailableCmd
Parameters:
newItemspcId - java.lang.Long

setRcptAvailId

public void setRcptAvailId(java.lang.Long newRcptAvailId)
Set available receipt identifier.
Specified by:
setRcptAvailId in interface MakeReceiptAvailableCmd
Parameters:
newRcptAvailId - java.lang.Long

setReceiptId

public void setReceiptId(java.lang.Long newReceiptId)
Set the receipt identifier.
Specified by:
setReceiptId in interface MakeReceiptAvailableCmd
Parameters:
newReceiptId - java.lang.Long

setRequestProperties

public void setRequestProperties(TypedProperty newRequestProperties)
                          throws ECApplicationException
Set request properties.
Specified by:
setRequestProperties in interface MakeReceiptAvailableCmd
Parameters:
reqParms - com.ibm.commerce.datatype.TypedProperty

validateParameters

public void validateParameters()
                        throws ECException
This method checks the information needed for making a receipt available.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECCommand
Throws:
com.ibm.commerce.exception.ECApplicationException. - If mandatory parameters are not passed in, throw ECApplicationException.