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

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

public class ReleaseExpiredAllocationsCmdImpl
extends ControllerCommandImpl
implements ReleaseExpiredAllocationsCmd

Default implementation of the controller command ReleaseExpiredAllocationsCmd interface. Invoked by the WebSphere Commerce scheduler, this command releases order item allocations for a given store that have exceeded their expiration times. If ATP is enable then if the item has been allocated then calls task command DeallocateExistingInventoryCmd or if the item has been backordered calls task command DeallocateExpectedInventoryCmd

Utilizes these access beans

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. ReleaseExpiredAllocationsCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Constructor Summary
ReleaseExpiredAllocationsCmdImpl()
          method description: This is the class constructor.
 
Method Summary
  AccessVector getResources()
          method description: Return command resources for access control.
 boolean isGeneric()
          method description:
 boolean isReadyToCallExecute()
          method description:
 void performExecute()
          method description: Release order item allocations for a given store that have exceeded their expiration times.
 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

ReleaseExpiredAllocationsCmdImpl

public ReleaseExpiredAllocationsCmdImpl()
method description: This is the class constructor.
Method Detail

getResources

public AccessVector getResources()
                          throws ECException
method description: Return command resources for access control.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
a vector of resource action pairs
ECException

isGeneric

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

isReadyToCallExecute

public boolean isReadyToCallExecute()
method description:
Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
Returns:
Return true to indicate that this command is ready to be executed.

performExecute

public void performExecute()
                    throws ECException
method description: Release order item allocations for a given store that have exceeded their expiration times.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECSystemException - If cannot commit the transaction started by the command throws com.ibm.commerce.exception.ECSystemException with ECMessage.STA_COMMIT_DB_FAILURE
ECSystemException - If the OrderJDBCHelper.findStaleOrderItems has a SQL exception throws com.ibm.commerce.exception.ECSystemException with ECMessage._ERR_FINDER_EXCEPTION
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 - incoming request properties
ECApplicationException

validateParameters

public void validateParameters()
                        throws ECException
method description: Validate command parameters. Check mandatory parameters.

Parameters