com.ibm.commerce.scheduler.commands

Class RemoveJobCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, RemoveJobCmd, com.ibm.commerce.scheduler.OmitSchedulerJobId, Protectable, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class RemoveJobCmdImpl
    extends ControllerCommandImpl
    implements RemoveJobCmd

    This class removes jobs from the scheduler so that they will no longer be processed.

    The parameters handled by this command are as follows.

    • jobId (required): This is the job reference number of the scheduled job to remove.
    • URL (required): This is the URL to redirect to after the command has finished executing.

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

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • RemoveJobCmdImpl

        public RemoveJobCmdImpl()
        This is the default constructor for this class. It calls the constructor from the superclass.
    • Method Detail

      • getResources

        public AccessVector getResources()
                                  throws ECException
        This method gets the resources for the command. The resource for the command is the store to which the job belongs.
        Specified by:
        getResources in interface ECCommand
        Overrides:
        getResources in class AbstractECTargetableCommand
        Returns:
        This method returns an AccessVector object containing the store to which the job belongs.
        Throws:
        ECException - This is thrown if there was a problem getting the store of the specified job.
      • performExecute

        public void performExecute()
                            throws ECException
        This method removes the record from the SCHACTIVE table and sets the ACTIVE flag in the SCHCONFIG record to D.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - This is thrown if there was a problem obtaining the record to delete.
      • setJobRefNum

        public void setJobRefNum(java.lang.Long jobrefnum)
        This method sets the job reference number for the job to be removed.
        Parameters:
        jobrefnum - This is the job reference number of the job to remove.
      • setUrl

        public void setUrl(java.lang.String url)
        This method sets the URL to which we should be redirected at the end of the command.
        Parameters:
        url - This is the redirect URL.