com.ibm.commerce.scheduler.commands
Class CleanJobCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.scheduler.commands.CleanJobCmdImpl
All Implemented Interfaces:
AccCommand, CleanJobCmd, ControllerCommand, ECCommand, ECTargetableCommand, Protectable

public class CleanJobCmdImpl
extends ControllerCommandImpl
implements CleanJobCmd

Remove job entries from scheduler status table if the job entry is completed.


Field Summary
static java.lang.String COPYRIGHT
           
 
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.CleanJobCmd
defaultCommandClassName, NAME
 
Constructor Summary
CleanJobCmdImpl()
          CleanJobCmdImpl constructor.
 
Method Summary
protected static java.sql.Timestamp convertTime(java.lang.String time)
          Convert the input time value to a Timestamp.
 java.sql.Timestamp getEndTime()
          Gets the timestamp for the end time for the request.
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 getStringEndTime()
          Gets the string value for the end time.
protected  java.lang.String getUrl()
          Gets the url to be redirected to at the end of the command.
 void performExecute()
          This is the real function part of the CleanJob command - clean job entries from scheduler status table if the job is completed.
 void setEndTime(java.sql.Timestamp endTime)
          Sets the timestamp value for the end time.
 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 setStringEndTime(java.lang.String endTime)
          Sets the string value for the end time.
 void setUrl(java.lang.String url)
          Sets the url to be redirected to at the end of the command.
 void validateParameters()
          Checks the validity of the parameters
 
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, reset, 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

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

CleanJobCmdImpl

public CleanJobCmdImpl()
CleanJobCmdImpl constructor.
Method Detail

convertTime

protected static java.sql.Timestamp convertTime(java.lang.String time)
                                         throws ECException
Convert the input time value to a Timestamp.

Parameters:
time - String - input time value
Returns:
Timestamp

getEndTime

public java.sql.Timestamp getEndTime()
Gets the timestamp for the end time for the request.

Returns:
Timestamp - end time timestamp

getJobRefNum

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

getResources

public AccessVector getResources()
                          throws ECException
Returns the resources for the command.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
com.ibm.commerce.accesscontrol.AccessVector
Throws:
ECException - The exception description.

getStringEndTime

protected java.lang.String getStringEndTime()
Gets the string value for the end time.

Returns:
String - end time value

getUrl

protected java.lang.String getUrl()
Gets the url to be redirected to at the end of the command.

Returns:
String - url

performExecute

public void performExecute()
                    throws ECException
This is the real function part of the CleanJob command - clean job entries from scheduler status table if the job is completed.
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.

setEndTime

public void setEndTime(java.sql.Timestamp endTime)
Sets the timestamp value for the end time.

Parameters:
endtime - Timestamp - end time value

setJobRefNum

public void setJobRefNum(java.lang.Long jobrefnum)
Sets the job reference number for the job to be removed.

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 - com.ibm.commerce.datatype.TypedProperty
Throws:
ECApplicationException -  

setStringEndTime

public void setStringEndTime(java.lang.String endTime)
Sets the string value for the end time.

Parameters:
endtimeString - - end time value

setUrl

public void setUrl(java.lang.String url)
Sets the url to be redirected to at the end of the command.

Parameters:
url - String - url

validateParameters

public void validateParameters()
                        throws ECException
Checks the validity of the parameters
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
ECException. -