public class EditJobCmdImpl extends AddJobCmdImpl implements EditJobCmd
This class edits the configuration or next start time of an existing schedule job.
The parameters passed to the command are:
pathInfo(required): This is the name of the command that the schedule job should execute.
start(required): This indicates when to start executing the job.
URL(required): This is the URL to which we should be redirected after the command has finished executing.
name(optional): This is the logon id of the job's user identity. The default value is the current user scheduling the job. Valid values include any existing users that have the access control authority to create a scheduled job.
queryString(optional): This is an object that represents the parameters specified when executing the job. This will be in the form of a URL query string. A value of
n1=v1indicates that parameter
n1will have a value of
v1when the job is executing. The default value is null which means there will be no parameters specified when the job is executing.
host(optional): This is the scheduler instance that should execute the job. Each scheduler instance can have a unique instance name (by default it is the WebSphere Commerce Server's web server host name). A scheduled job can run on a particular scheduler instance if specified. The default value is null which means that the job will run on any scheduler instance.
interval(optional): This is the time (in seconds) that indicates how often the job should be re-executed. The default value is 0 which means that the job will only be executed once. The value of the interval must be greater than or equal to 0.
attempts(optional): This is the number of attempts required to execute the job successfully. The default value is 0 which means the job will only have one attempt of a successful execution. The value specified must be greater than or equal to 0. If this parameter is specified, then the
delayparameter should be specified as well.
delay(optional): This is the time (in seconds) that indicates how long to wait before attempting to run the job again. This parameter must have a value greater than or equal to 0 and if this parameter is specified, then the
attemptsparameter must be specified as well.
schedulerPolicy(optional): This is the policy of the job when it fails to be executed. The default value is 0. A value of 0 indicates that the job will not be retried. A value of 1 means the job will be retried.
priority(optional): This is the priority of the job. The default value is
java.lang.Thread.NORM_PRIORTY. Valid values must be between the range of
applicationType(optional): This is the application type of the job. This is defined in the scheduler instance configuration. The default application types are default, broadcast, auction and inventory but others may be added. The default value is null which represents the default application type. A valid value must be one of the defined application types.
storeId(optional): this is the store identity of the job. The default value is the current store in the command context. Valid values include stores for which the current user has access control authority.
checkCmdId(optional): This is the task command used to determine whether the job needs to be executed or not. The default value is null which means that the job will always be executed. Valid values include any check command id found in the
This command retrieves the current configuration for the specified schedule job. It then creates a
new schedule job based on the specified configuration and using the old configuration value for those
parameters that were not specified. Then the original job is removed by calling the
command. After the execution of the command, the response properties will contain the information needed
to redirect to the specified URL.
AddJobCmdImpl, Serialized Form
|Modifier and Type||Field and Description|
IBM Copyright notice field.
|Constructor and Description|
This is the default constructor for this class.
|Modifier and Type||Method and Description|
This method returns the resources for the
This first calls the
This method extracts the required parameters from the request properties and sets them locally in the command.
This method validates the specified parameters of the command.
getApplicationType, getAttempts, getCheckCommandId, getDelay, getHost, getInterfaceName, getJobId, getJobInstanceId, getStoreId, getUserRefNum, setApplicationType, setAttempts, setCheckCommandId, setDelay, setDescription, setEndTime, setErrorUrl, setHost, setInterfaceName, setInterval, setJobId, setJobInfo, setName, setPathInfo, setPriority, setQueryString, setSequence, setStartTime, setStoreId, setStringEndTime, setStringStartTime, setUrl, setUserRefNum
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String COPYRIGHT
public AccessVector getResources() throws ECException
EditJobcommand. The resources returned are the store that the schedule job belongs to and the user identity under which the job will execute.
AccessVectorobject containing first the store the job belongs to and then the user identity of the command. The user identity is only returned if it differs from the current identity found in the command context.
ECException- This is thrown if there was a problem retrieving the schedule job's configuration from the database.
public void performExecute() throws ECException
RemoveJobcommand to remove the current job. The default implementation of
RemoveJobis to change the jobs configuration to deactivate the job. It also removes the
SCHACTIVErecord so it will not be picked up. To add the new job,
super.validateParameters()is called, followed by
super.performExecute(). If there is a problem adding the new copy of the job,
RemoveJobshould rollback because they are part of the same transaction.
ECException- This is thrown if there was a problem with calling the remove job command or calling the methods of the super class.
public void setRequestProperties(TypedProperty reqParms) throws ECException
ECApplicationExceptionif a required parameter is missing.
reqParms- This is an object that represents the parameters of the command.
ECException- This is thrown if there was a missing parameter.
public void validateParameters() throws ECException
ECException- This is thrown if there is a problem with either the parameters specified or the retrieval of the existing schedule job.