com.ibm.commerce.inventory.commands
Class GeneratePickBatchCmdImpl

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

public class GeneratePickBatchCmdImpl
extends TaskCommandImpl
implements GeneratePickBatchCmd

Generate a pick batch for specified fulfillment center and store.

The order releases with 'SHIP' status for the specified fulfillment center and store will be included in the pick batch generation. If there are more than the maximum number of eligible order releases when a pick batch is generated, only the maximum number of order releases are picked up in this pick batch and the rest will be picked up by the next pick batch generation. A pack slip XML will be generated for each eligible order release and a pick ticket XML will be generated for the whole batch. An invoice XML may also be generated for each eligible order release.


Field Summary
static java.lang.String COPYRIGHT
           
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.inventory.commands.GeneratePickBatchCmd
defaultCommandClassName, NAME
 
Constructor Summary
GeneratePickBatchCmdImpl()
           
 
Method Summary
 java.lang.String generatePackslip(java.lang.String pickBatchId, java.lang.String store_name, java.lang.String ffmcenter_name, java.lang.String order_number, java.lang.String release_number, java.lang.String customer_number, java.lang.String order_date)
          This method performs the generation of pack slip XML for an order release.
 void generatePickbatch(int maxOrderReleases)
          This method performs the generation of pick batch if there are any eligible order releases.
 java.lang.String generatePickticket(java.lang.String pickBatchId, java.lang.String store_name, java.lang.String ffmcenter_name)
          This method performs the generation of pick ticket XML the whole batch.
 java.lang.Integer getFfmcenterId()
          Return fulfillment center identifier.
 java.lang.Integer getLanguageId()
          Return language identifier.
 int getMaxOrdReleasesPerPickbatch()
          Return the moreOrderReleases flag to indicate if there are more eligible order releases not included in this pick batch.
 java.lang.String getMoreOrderReleases()
          Return the flag to indicate if there are more eligible order releases not included in this pick batch.
 java.lang.Long getPickBatchId()
          Return the pick batch identifier.
 java.lang.Integer getStoreentId()
          Return the store entity identidier.
 boolean isReadyToCallExecute()
          This command is ready to be executed.
 void performExecute()
          This method performs the generation of pick batch by calling generatePickBatch() method.
 void reset()
          This method resets the command local variable.
 void setFfmcenterId(java.lang.Integer newFfmcenterId)
          Set fulfillment center identifier.
 void setLanguageId(java.lang.Integer newLanguageId)
          Set language identifier.
 void setMaxOrdReleasesPerPickbatch(int newMaxOrdReleasesPerPickbatch)
          Set the maximum number of order releases included in a pick batch.
 void setMoreOrderReleases(java.lang.String newMoreOrderReleases)
          Set the moreOrderReleases flag to indicate if there are more eligible order releases not included in this pick batch.
 void setPickBatchId(java.lang.Long newPickBatchId)
          Set the pick batch identifier.
 void setRequestProperties(TypedProperty newRequestProperties)
          Set request properties.
 void setStoreentId(java.lang.Integer newStoreentId)
          Set the store entity identifier.
 void validateParameters()
          This method checks the information needed for pick batch generation.
 
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
Constructor Detail

GeneratePickBatchCmdImpl

public GeneratePickBatchCmdImpl()
Method Detail

generatePackslip

public java.lang.String generatePackslip(java.lang.String pickBatchId,
                                         java.lang.String store_name,
                                         java.lang.String ffmcenter_name,
                                         java.lang.String order_number,
                                         java.lang.String release_number,
                                         java.lang.String customer_number,
                                         java.lang.String order_date)
                                  throws ECException
This method performs the generation of pack slip XML for an order release.
Throws:
ECException -  

generatePickbatch

public void generatePickbatch(int maxOrderReleases)
                       throws ECException
This method performs the generation of pick batch if there are any eligible order releases. The order releases with 'SHIP' status for the specified fulfillment center and store will be included in the pick batch. If there are more than the maximum number of eligible order releases when a pick batch is generated, only the maximum number of order releases are picked up in this pick batch and the rest will be picked up by the next pick batch generation. A pack slip XML will be generated by calling generatePackslip() method and an invoice XML may be prepared for each eligible order release. A pick ticket XML will be generated for the whole batch by calling generatePickticket() method.
Throws:
ECException -  

generatePickticket

public java.lang.String generatePickticket(java.lang.String pickBatchId,
                                           java.lang.String store_name,
                                           java.lang.String ffmcenter_name)
                                    throws ECException
This method performs the generation of pick ticket XML the whole batch.
Throws:
ECException -  

getFfmcenterId

public java.lang.Integer getFfmcenterId()
Return fulfillment center identifier.
Specified by:
getFfmcenterId in interface GeneratePickBatchCmd
Returns:
java.lang.Integer

getLanguageId

public java.lang.Integer getLanguageId()
Return language identifier.
Specified by:
getLanguageId in interface GeneratePickBatchCmd
Returns:
java.lang.Integer

getMaxOrdReleasesPerPickbatch

public int getMaxOrdReleasesPerPickbatch()
Return the moreOrderReleases flag to indicate if there are more eligible order releases not included in this pick batch.
Specified by:
getMaxOrdReleasesPerPickbatch in interface GeneratePickBatchCmd
Returns:
int

getMoreOrderReleases

public java.lang.String getMoreOrderReleases()
Return the flag to indicate if there are more eligible order releases not included in this pick batch.
Specified by:
getMoreOrderReleases in interface GeneratePickBatchCmd
Returns:
java.lang.String

getPickBatchId

public java.lang.Long getPickBatchId()
Return the pick batch identifier.
Specified by:
getPickBatchId in interface GeneratePickBatchCmd
Returns:
java.lang.Long

getStoreentId

public java.lang.Integer getStoreentId()
Return the store entity identidier.
Specified by:
getStoreentId in interface GeneratePickBatchCmd
Returns:
java.lang.Integer

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 performs the generation of pick batch by calling generatePickBatch() method.
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

setFfmcenterId

public void setFfmcenterId(java.lang.Integer newFfmcenterId)
Set fulfillment center identifier.
Specified by:
setFfmcenterId in interface GeneratePickBatchCmd
Parameters:
newFfmcenterId - java.lang.Integer

setLanguageId

public void setLanguageId(java.lang.Integer newLanguageId)
Set language identifier.
Specified by:
setLanguageId in interface GeneratePickBatchCmd
Parameters:
newLanguageId - java.lang.Integer

setMaxOrdReleasesPerPickbatch

public void setMaxOrdReleasesPerPickbatch(int newMaxOrdReleasesPerPickbatch)
Set the maximum number of order releases included in a pick batch.
Specified by:
setMaxOrdReleasesPerPickbatch in interface GeneratePickBatchCmd
Parameters:
newMaxOrdReleasesPerPickbatch - int

setMoreOrderReleases

public void setMoreOrderReleases(java.lang.String newMoreOrderReleases)
Set the moreOrderReleases flag to indicate if there are more eligible order releases not included in this pick batch.
Specified by:
setMoreOrderReleases in interface GeneratePickBatchCmd
Parameters:
newMoreOrderReleases - java.lang.String

setPickBatchId

public void setPickBatchId(java.lang.Long newPickBatchId)
Set the pick batch identifier.
Specified by:
setPickBatchId in interface GeneratePickBatchCmd
Parameters:
newPickBatchId - java.lang.Long

setRequestProperties

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

setStoreentId

public void setStoreentId(java.lang.Integer newStoreentId)
Set the store entity identifier.
Specified by:
setStoreentId in interface GeneratePickBatchCmd
Parameters:
newStoreentId - java.lang.Integer

validateParameters

public void validateParameters()
                        throws ECException
This method checks the information needed for pick batch generation.
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.