com.ibm.commerce.inventory.scheduled.commands
Class ProcessBackordersCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.inventory.scheduled.commands.ProcessBackordersCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, ProcessBackordersCmd

public class ProcessBackordersCmdImpl
extends ControllerCommandImpl
implements ProcessBackordersCmd

This ProcessBackordersComd is invoked by the WebSphere Commerce scheduler, this command attempts to allocate inventory to backordered items for a given store.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.inventory.scheduled.commands. ProcessBackordersCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Constructor Summary
ProcessBackordersCmdImpl()
          This is the class constructor.
 
Method Summary
  AccessVector getResources()
          Returns command resources for access control by instantiating an AccessVector using the StoreAccessBean
 boolean isGeneric()
          method description: Return false to indicate that this command can not be run by a generic user.
 boolean isReadyToCallExecute()
          method description: Return true to indicate that this command is ready to be executed.
 void performExecute()
          method description: Call the Order query to see if there are locked orders with status='B'.
 void reset()
          method description: Reset instance variables.
 void setRequestProperties( TypedProperty reqParms)
          method description: Set command request properties.
 void validateParameters()
          method description: Validate command parameters.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, 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
 
Methods inherited from interface com.ibm.commerce.command. ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command. AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

Constructor Detail

ProcessBackordersCmdImpl

public ProcessBackordersCmdImpl()
This is the class constructor.
Method Detail

getResources

public AccessVector getResources()
                          throws ECException
Returns command resources for access control by instantiating an AccessVector using the StoreAccessBean
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
av

This command uses the following AccessBean:


isGeneric

public boolean isGeneric()
method description: Return false to indicate that this command can not be run by a generic user.
Specified by:
isGeneric in interface ControllerCommand
Overrides:
isGeneric in class ControllerCommandImpl
Returns:
true if this command can be called by a generic user false if this command cannot be called by a generic user

isReadyToCallExecute

public boolean isReadyToCallExecute()
method description: Return true to indicate that this command is ready to be executed.
Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
Returns:
true if we can execute the command false if we canot execute the command

performExecute

public void performExecute()
                    throws ECException
method description: Call the Order query to see if there are locked orders with status='B'. If there are then for each order call AllocateInventory to allocate inventory. Then call ProcessOrder to process the order.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
ECException

reset

public void reset()
method description: Reset instance variables.
Overrides:
reset in class AbstractECTargetableCommand

setRequestProperties

public void setRequestProperties(TypedProperty reqParms)
                          throws ECApplicationException
method description: Set command request properties.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
reqParms - request properties
ECApplicationException

validateParameters

public void validateParameters()
                        throws ECException
method description: Validate command parameters.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
ECException