com.ibm.commerce.scheduler.beans
Class SchedulerStatusDataBean

java.lang.Object
  |
  +--com.ibm.commerce.beans.InputDataBeanImpl
        |
        +--com.ibm.commerce.beans.SmartDataBeanImpl
              |
              +--com.ibm.commerce.scheduler.beans.SchedulerStatusDataBean
All Implemented Interfaces:
DataBean, InputDataBean, SchedulerDataBean, java.io.Serializable, SmartDataBean

public class SchedulerStatusDataBean
extends SmartDataBeanImpl
implements SchedulerDataBean

A data bean that represents the status of different runs for scheduled jobs. The status includes entries when the job will be run and entries of past runs of jobs.

See Also:
Serialized Form

Field Summary
static java.lang.String _ACTUAL_END
          The job actual end time key for specifying the sorting of the status records.
static java.lang.String _ACTUAL_START
          The job actual start time key for specifying the sorting of the status records.
static java.lang.String _APPTYPE
          The job application type key for specifying the sorting of the status records.
static java.lang.String _JOBREFNUM
          The job reference key for specifying the sorting of the status records.
static java.lang.String _PATHINFO
          The job command key for specifying the sorting of the status records.
static java.lang.String _PREFER_START
          The job preferred start time key for specifying the sorting of the status records.
static java.lang.String _QUERY
          The job parameter key for specifying the sorting of the status records.
static java.lang.String _STATE
          The job state key for specifying the sorting of the status records.
static java.lang.String _STATUS
          The job status key for specifying the sorting of the status records.
static java.lang.String COPYRIGHT
          The IBM Copyright Statement.
 
Fields inherited from class com.ibm.commerce.beans. SmartDataBeanImpl
commandContext
 
Fields inherited from class com.ibm.commerce.beans. InputDataBeanImpl
requestProperties
 
Fields inherited from interface com.ibm.commerce.beans. DataBean
emptyString
 
Constructor Summary
SchedulerStatusDataBean()
          Creates the Scheduler Status Data Bean.
 
Method Summary
static java.sql.Timestamp convertTime(java.lang.String time)
          Convert the input time value to a Timestamp.
 java.sql.Timestamp defaultStartDateCriteria()
          Returns the default start time that is the 0:00 of the current day.
 java.lang.String getActualStart(int index)
          Returns the actual start time for the scheduled job status for the specified index.
 java.lang.String getApplicationType(int index)
          Returns the application of the job for the specified status entry.
 java.sql.Timestamp getCriteriaEnd()
          Returns the end time used for filtering the scheduled job status.
 java.sql.Timestamp getCriteriaStart()
          Returns the start time used for filtering the scheduled job status.
 java.lang.String getEnd(int index)
          Returns the time when the status of the job has completed.
 java.lang.String getJobReferenceNumber(int index)
          Returns the job reference number for the job status.
 java.lang.String getOrderBy()
          Returns the order by attribute which the status results are sorted by.
 java.lang.String getPathInfo(int index)
          Returns the command that will be or was executed for the job status.
 java.lang.String getPreferedStart(int index)
          The preferred start time of the particular run of the job.
 java.lang.String getQueryString(int index)
          The parameters when executing the job.
 java.lang.String getStart(int index)
          Returns the start time of the status entry.
 java.lang.String getState(int index)
          Returns the state of the status entry.
 java.lang.String getStatus(int index)
          Returns the status of the jobs status entry.
 void populate()
          Retrieves status entries for the scheduled jobs that match the specified store id and fall between the start and end time.
 boolean setCriteriaEnd(java.lang.String dateCriteria)
          Sets the end time criteria used for fetching the scheduled job history of jobs.
 boolean setCriteriaStart(java.lang.String dateCriteria)
          Sets the start time criteria used for fetching the scheduled job history of jobs.
 void setOrderBy(java.lang.String sortField)
          Sets the order by attribute when returning the status of the scheduled jobs.
 void setStoreId(java.lang.Integer newStoreId)
          Sets the store id of the scheduled jobs status to retrieve.
 int size()
          Returns the number of status entries returned for the scheduled jobs.
 
Methods inherited from class com.ibm.commerce.beans. SmartDataBeanImpl
fulfills, getCommandContext, getResources, setCommandContext
 
Methods inherited from class com.ibm.commerce.beans. InputDataBeanImpl
getRequestProperties, setRequestProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.beans. InputDataBean
getRequestProperties, setRequestProperties
 
Methods inherited from interface com.ibm.commerce.beans. SmartDataBean
getCommandContext, setCommandContext
 

Field Detail
public static final java.lang.String COPYRIGHT
The IBM Copyright Statement.
See Also:
Constant Field Values

_JOBREFNUM

public static final java.lang.String _JOBREFNUM
The job reference key for specifying the sorting of the status records.
See Also:
Constant Field Values

_PATHINFO

public static final java.lang.String _PATHINFO
The job command key for specifying the sorting of the status records.
See Also:
Constant Field Values

_QUERY

public static final java.lang.String _QUERY
The job parameter key for specifying the sorting of the status records.
See Also:
Constant Field Values

_APPTYPE

public static final java.lang.String _APPTYPE
The job application type key for specifying the sorting of the status records.
See Also:
Constant Field Values

_STATUS

public static final java.lang.String _STATUS
The job status key for specifying the sorting of the status records.
See Also:
Constant Field Values

_STATE

public static final java.lang.String _STATE
The job state key for specifying the sorting of the status records.
See Also:
Constant Field Values

_PREFER_START

public static final java.lang.String _PREFER_START
The job preferred start time key for specifying the sorting of the status records.
See Also:
Constant Field Values

_ACTUAL_START

public static final java.lang.String _ACTUAL_START
The job actual start time key for specifying the sorting of the status records.
See Also:
Constant Field Values

_ACTUAL_END

public static final java.lang.String _ACTUAL_END
The job actual end time key for specifying the sorting of the status records.
See Also:
Constant Field Values
Constructor Detail

SchedulerStatusDataBean

public SchedulerStatusDataBean()
Creates the Scheduler Status Data Bean.
Method Detail

convertTime

public static final java.sql.Timestamp convertTime(java.lang.String time)
                                            throws ECException
Convert the input time value to a Timestamp.
Parameters:
time - the time to comvert to a timestamp object.
Returns:
a Timestamp of that represents the given string.
Throws:
ECException - if there are any problems converting the given time.

defaultStartDateCriteria

public java.sql.Timestamp defaultStartDateCriteria()
Returns the default start time that is the 0:00 of the current day.
Returns:
the default start time.

getActualStart

public java.lang.String getActualStart(int index)
Returns the actual start time for the scheduled job status for the specified index.
Returns:
the actual start time of the status entry.

getApplicationType

public java.lang.String getApplicationType(int index)
Returns the application of the job for the specified status entry.
Returns:
the application type of the job for the status entry.

getCriteriaEnd

public java.sql.Timestamp getCriteriaEnd()
Returns the end time used for filtering the scheduled job status.
Returns:
the end time criteria.

getCriteriaStart

public java.sql.Timestamp getCriteriaStart()
Returns the start time used for filtering the scheduled job status.
Returns:
the start time criteria.

getEnd

public java.lang.String getEnd(int index)
Returns the time when the status of the job has completed. A value of null or an empty string means that the job has not completed running.
Returns:
the end time of the job status.

getJobReferenceNumber

public java.lang.String getJobReferenceNumber(int index)
Returns the job reference number for the job status.
Returns:
the job reference number of the job status.

getOrderBy

public java.lang.String getOrderBy()
Returns the order by attribute which the status results are sorted by.
Returns:
the order by status attribute.

getPathInfo

public java.lang.String getPathInfo(int index)
Returns the command that will be or was executed for the job status.
Returns:
the command to execute.

getPreferedStart

public java.lang.String getPreferedStart(int index)
The preferred start time of the particular run of the job.
Returns:
the perferred start time of the job's status.

getQueryString

public java.lang.String getQueryString(int index)
The parameters when executing the job.
Returns:
the parameters of the job.

getStart

public java.lang.String getStart(int index)
Returns the start time of the status entry.
Returns:
the start time of the status entry.

getState

public java.lang.String getState(int index)
Returns the state of the status entry.
Returns:
the state of the status entry.

getStatus

public java.lang.String getStatus(int index)
Returns the status of the jobs status entry.
Returns:
the status of the job status entry.

populate

public void populate()
              throws java.lang.Exception
Retrieves status entries for the scheduled jobs that match the specified store id and fall between the start and end time.
Specified by:
populate in interface SmartDataBean
Overrides:
populate in class SmartDataBeanImpl
Throws:
java.lang.Exception - if there are any problems retrieving the data.

setOrderBy

public void setOrderBy(java.lang.String sortField)
Sets the order by attribute when returning the status of the scheduled jobs. The default is order by is _ACTUAL_START.
Parameters:
sortField - the attribute the status records will be sorted by.

setStoreId

public void setStoreId(java.lang.Integer newStoreId)
Sets the store id of the scheduled jobs status to retrieve. If no store id is specified then jobs for all stores will be retrieved.
Parameters:
newStoreId - the store id of the store.

size

public int size()
Returns the number of status entries returned for the scheduled jobs.
Returns:
the number of status records found for the given time criteria.

setCriteriaEnd

public boolean setCriteriaEnd(java.lang.String dateCriteria)
Sets the end time criteria used for fetching the scheduled job history of jobs.
Returns:
whether the specified string can be converted into a valid timestamp.

setCriteriaStart

public boolean setCriteriaStart(java.lang.String dateCriteria)
Sets the start time criteria used for fetching the scheduled job history of jobs.
Returns:
whether the specified string can be converted into a valid timestamp.