com.ibm.commerce.scheduler.commands
Class RemoveJobCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.scheduler.commands.RemoveJobCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, RemoveJobCmd

public class RemoveJobCmdImpl
extends ControllerCommandImpl
implements RemoveJobCmd

Remove jobs from scheduler so it will not be processed any longer.

The parameters handled by this command are as follows.

The command validates that the required parameters are specified. Then it takes the specified job and changes it configuration so is has an ACTIVE value of "D". Then the row in the SCHACTIVE table and SCHBRDCST table that is linked to the job is removed.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          IBM Copyright notice field.
 
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.scheduler.commands. RemoveJobCmd
defaultCommandClassName, NAME
 
Constructor Summary
RemoveJobCmdImpl()
          Create the RemoveJob command object.
 
Method Summary
protected  java.lang.Long getJobRefNum()
          Gets the job reference number for the job to be removed.
  AccessVector getResources()
          Returns the resources for the command.
protected  java.lang.String getUrl()
          Gets the URL to be redirected to when this job finishes execution.
 void performExecute()
          Removes the record from the SCHACTIVE and set the ACTIVE flag in the SCHCONFIG record to D.
 void setJobRefNum(java.lang.Long jobrefnum)
          Sets the job reference number for the job to be removed.
 void setRequestProperties( TypedProperty reqParms)
          This method extracts the required parameters from the request properties and sets it locally in the command.
 void setUrl(java.lang.String url)
          Sets the URL to be redirected to at the end of the command.
 void validateParameters()
          Verifies the values of the parameters specified.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, 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, isReadyToCallExecute, reset, 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, isGeneric, 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
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM Copyright notice field.
See Also:
Constant Field Values
Constructor Detail

RemoveJobCmdImpl

public RemoveJobCmdImpl()
Create the RemoveJob command object.
Method Detail

getJobRefNum

protected java.lang.Long getJobRefNum()
Gets the job reference number for the job to be removed.
Returns:
the job reference number.

getResources

public AccessVector getResources()
                          throws ECException
Returns the resources for the command. The resouce for the command is the store which the job belongs to.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
An AccessVector containing the store the job belongs to.
Throws:
ECException - If there was a problem getting the store of the specified job.

getUrl

protected java.lang.String getUrl()
Gets the URL to be redirected to when this job finishes execution.
Returns:
The URL to redirect to.

performExecute

public void performExecute()
                    throws ECException
Removes the record from the SCHACTIVE and set the ACTIVE flag in the SCHCONFIG record to D.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - if there was a problem obtaining the record to delete.

setJobRefNum

public void setJobRefNum(java.lang.Long jobrefnum)
Sets the job reference number for the job to be removed.
Parameters:
jobrefnum - the job reference number of the job to remove.

setRequestProperties

public void setRequestProperties(TypedProperty reqParms)
                          throws ECApplicationException
This method extracts the required parameters from the request properties and sets it locally in the command. It throws an ECApplicationException if a required parameter is missing.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
reqParms - the parameters specified to the command.
Throws:
ECApplicationException - if a parameter was not specified.

setUrl

public void setUrl(java.lang.String url)
Sets the URL to be redirected to at the end of the command.
Parameters:
url - the URL to redirect to.

validateParameters

public void validateParameters()
                        throws ECException
Verifies the values of the parameters specified.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException - If the job reference number was missing or invalid or if the URL was not specified.