com.ibm.commerce.order.commands
Class OrderScheduleCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.order.commands.OrderScheduleCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderScheduleCmd, Protectable

public class OrderScheduleCmdImpl
extends ControllerCommandImpl
implements OrderScheduleCmd

Submits a recurring order, which will be processed by the job scheduler.


Field Summary
protected static java.lang.String istrCheckParametersFunc
           
protected static java.lang.String istrEnforceOrderOwnershipByCurrentStoreFunc
           
protected static java.lang.String istrIsReadyToCallExecuteFunc
           
protected static java.lang.String istrPerformFunc
           
protected static java.lang.String istrSetRequestPropertiesFunc
           
protected static java.lang.String istrThisClass
           
 
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.order.commands.OrderScheduleCmd
COPYRIGHT, NAME
 
Fields inherited from interface com.ibm.commerce.command.ECCommand
defaultCommandClassName
 
Fields inherited from interface com.ibm.commerce.command.ECTargetableCommand
COPYRIGHT
 
Constructor Summary
OrderScheduleCmdImpl()
           
 
Method Summary
 AddJobCmd getAddJobCmd()
          Gets AddJob cmd instance.
 java.lang.String getHost()
          Gets the hostname responsible for processing an order.
 java.lang.Integer getInterval()
          Gets the number of seconds between successive executions of this order.
 java.lang.Long getOrderId()
          Gets the order which needs to be processed as a recurring order.
 java.lang.String[] getOutOrderName()
          Gets the names of the name-value pairs to be added to the redirection URL.
 java.lang.Integer getRecoveryAttempts()
          Gets the number of times the job scheduler will retry processing the order should order processing failure occur.
 java.lang.Integer getRecoveryDelay()
          Gets the amount of time (in seconds) before order processing is retried in case of order processing failure.
 AccessVector getResources()
          Gets the access vector accessed by this command.
 java.lang.String getStartTime()
          The time at which the first execution of this order should occur.
 java.lang.String getUrl()
          Gets redirection URL.
 void performExecute()
          Contains the actual business logic of the command.
 void reset()
          This method should be called after a command has been executed to reset its state variables.
 void setAddJobCmd(AddJobCmdImpl newAddJobCmd)
          Sets AddJob cmd instance.
 void setHost(java.lang.String newHost)
          Sets the hostname responsible for processing an order.
 void setInterval(java.lang.Integer newInterval)
          Sets the number of seconds between successive executions of this order.
 void setOrderId(java.lang.Long newOrderId)
          Sets the order which needs to be processed as a recurring order.
 void setOutOrderName(java.lang.String[] newOutOrderName)
          Sets the names of the name-value pairs to be added to the redirection URL.
 void setRecoveryAttempts(java.lang.Integer newRecoveryAttempts)
          Sets the number of times the job scheduler will retry processing the order should order processing failure occur.
 void setRecoveryDelay(java.lang.Integer newRecoveryDelay)
          Sets the amount of time (in seconds) before order processing is retried in case of order processing failure.
 void setRequestProperties(TypedProperty aReqParms)
          The WebController calls this method before invoking the execute method in this command to set the request properties for this command.
 void setStartTime(java.lang.String newStartTime)
          The time at which the first execution of this order should occur in the format YYYY:MM:DD:hh:mm:ss.
 void setUrl(java.lang.String astrUrl)
          Sets redirection URL.
 void validateParameters()
          Performs server side parameter checking.
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

istrCheckParametersFunc

protected static java.lang.String istrCheckParametersFunc

istrEnforceOrderOwnershipByCurrentStoreFunc

protected static java.lang.String istrEnforceOrderOwnershipByCurrentStoreFunc

istrIsReadyToCallExecuteFunc

protected static java.lang.String istrIsReadyToCallExecuteFunc

istrPerformFunc

protected static java.lang.String istrPerformFunc

istrSetRequestPropertiesFunc

protected static java.lang.String istrSetRequestPropertiesFunc

istrThisClass

protected static java.lang.String istrThisClass
Constructor Detail

OrderScheduleCmdImpl

public OrderScheduleCmdImpl()
Method Detail

getAddJobCmd

public AddJobCmd getAddJobCmd()
Gets AddJob cmd instance.

getHost

public java.lang.String getHost()
Gets the hostname responsible for processing an order.

getInterval

public java.lang.Integer getInterval()
Gets the number of seconds between successive executions of this order.

getOrderId

public java.lang.Long getOrderId()
Gets the order which needs to be processed as a recurring order.

getOutOrderName

public java.lang.String[] getOutOrderName()
Gets the names of the name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of a scheduled order model.

getRecoveryAttempts

public java.lang.Integer getRecoveryAttempts()
Gets the number of times the job scheduler will retry processing the order should order processing failure occur.

getRecoveryDelay

public java.lang.Integer getRecoveryDelay()
Gets the amount of time (in seconds) before order processing is retried in case of order processing failure.

getResources

public AccessVector getResources()
                          throws ECException
Description copied from interface: ECCommand
Gets the access vector accessed by this command. The default implementation returns null indicating that no protectable resource is accessed by this command. It is the responsibilities of the command writer to return the protectable primary resource(s) and the corresponding actions accessed by this command.

Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Returns:
AccessVector - a vector of resource action pairs

getStartTime

public java.lang.String getStartTime()
The time at which the first execution of this order should occur.

getUrl

public java.lang.String getUrl()
Gets redirection URL.

performExecute

public void performExecute()
                    throws ECException
Contains the actual business logic of the command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

reset

public void reset()
This method should be called after a command has been executed to reset its state variables.
Overrides:
reset in class AbstractECTargetableCommand

setAddJobCmd

public void setAddJobCmd(AddJobCmdImpl newAddJobCmd)
Sets AddJob cmd instance.

setHost

public void setHost(java.lang.String newHost)
Sets the hostname responsible for processing an order. Use this method when job scheduler instances are running on multiple hosts and processing this order needs to be restricted to a certain host.
Specified by:
setHost in interface OrderScheduleCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderScheduleCmd
Parameters:
astrHost - java.lang.String - host name

setInterval

public void setInterval(java.lang.Integer newInterval)
Sets the number of seconds between successive executions of this order.
Specified by:
setInterval in interface OrderScheduleCmd
Parameters:
anInterval - java.lang.Integer - interval in seconds

setOrderId

public void setOrderId(java.lang.Long newOrderId)
Sets the order which needs to be processed as a recurring order.
Specified by:
setOrderId in interface OrderScheduleCmd
Parameters:
orderNumber - java.lang.Long - order identifier

setOutOrderName

public void setOutOrderName(java.lang.String[] newOutOrderName)
Sets the names of the name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of a scheduled order model.
Specified by:
setOutOrderName in interface OrderScheduleCmd

setRecoveryAttempts

public void setRecoveryAttempts(java.lang.Integer newRecoveryAttempts)
Sets the number of times the job scheduler will retry processing the order should order processing failure occur. When setting the number of recovery attempts you must also set the recovery delay (setRecoveryDelay())
Specified by:
setRecoveryAttempts in interface OrderScheduleCmd
Parameters:
anRecAttempts - java.lang.Integer - number of recovery attempts

setRecoveryDelay

public void setRecoveryDelay(java.lang.Integer newRecoveryDelay)
Sets the amount of time (in seconds) before order processing is retried in case of order processing failure. When setting the recovery delay you must also set the number of recovery attempts (setRecoveryAttempts())
Specified by:
setRecoveryDelay in interface OrderScheduleCmd
Parameters:
anRecDelay - java.lang.Integer - number of seconds to delay between retrying to recover from order processing failure

setRequestProperties

public void setRequestProperties(TypedProperty aReqParms)
                          throws ECApplicationException,
                                 ECException
The WebController calls this method before invoking the execute method in this command to set the request properties for this command.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Following copied from interface: com.ibm.commerce.command.ControllerCommand
Parameters:
requestProperties - com.ibm.commerce.datatype.TypedProperty
Throws:
com.ibm.commerce.exception.ECException. -  

setStartTime

public void setStartTime(java.lang.String newStartTime)
The time at which the first execution of this order should occur in the format YYYY:MM:DD:hh:mm:ss. Only hh:mm:ss is mandatory.
Specified by:
setStartTime in interface OrderScheduleCmd
Parameters:
astrStartTime - java.lang.String - start time for order processing

setUrl

public void setUrl(java.lang.String astrUrl)
Sets redirection URL.

validateParameters

public void validateParameters()
                        throws ECException
Performs server side parameter checking.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
ECException. -