Class JobTrigger
- java.lang.Object
-
- org.pentaho.platform.api.scheduler2.JobTrigger
-
- All Implemented Interfaces:
Serializable
,IJobTrigger
- Direct Known Subclasses:
ComplexJobTrigger
,CronJobTrigger
,SimpleJobTrigger
public abstract class JobTrigger extends Object implements Serializable, IJobTrigger
The marker superclass for the various types of job triggers.- Author:
- aphillips
- See Also:
SimpleJobTrigger
,ComplexJobTrigger
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static SimpleJobTrigger
ONCE_NOW
-
Constructor Summary
Constructors Constructor Description JobTrigger()
JobTrigger(Date startTime, Date endTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCronDescription()
Returns the User friendly description of a Cron StringString
getCronString()
Returns the Cron String used by quartz Schedulerlong
getDuration()
Date
getEndTime()
Returns the trigger end time.Date
getStartTime()
Returns the trigger start time.String
getUiPassParam()
void
setCronDescription(String cronDescription)
Sets the user friendly description of a cron String=void
setCronString(String cronString)
Sets the cron String used by the quartz schedulervoid
setDuration(long duration)
void
setEndTime(Date endTime)
Sets the trigger end time.void
setStartTime(Date startTime)
Sets the trigger start time.void
setUiPassParam(String uiPassParam)
The value of this field comes from the UI and is persisted in quartz but not used by quartz or the server.
-
-
-
Field Detail
-
ONCE_NOW
public static final SimpleJobTrigger ONCE_NOW
-
-
Method Detail
-
getStartTime
public Date getStartTime()
Description copied from interface:IJobTrigger
Returns the trigger start time.- Specified by:
getStartTime
in interfaceIJobTrigger
- Returns:
- the trigger start time.
-
setStartTime
public void setStartTime(Date startTime)
Description copied from interface:IJobTrigger
Sets the trigger start time.- Specified by:
setStartTime
in interfaceIJobTrigger
- Parameters:
startTime
- when to start the trigger. If null the trigger starts immediately.
-
getEndTime
public Date getEndTime()
Description copied from interface:IJobTrigger
Returns the trigger end time.- Specified by:
getEndTime
in interfaceIJobTrigger
- Returns:
- the trigger end time.
-
setEndTime
public void setEndTime(Date endTime)
Description copied from interface:IJobTrigger
Sets the trigger end time.- Specified by:
setEndTime
in interfaceIJobTrigger
- Parameters:
endTime
- when to end the trigger. If null the trigger runs indefinitely
-
getUiPassParam
public String getUiPassParam()
- Specified by:
getUiPassParam
in interfaceIJobTrigger
- Returns:
- the uiPassParam
-
setUiPassParam
public void setUiPassParam(String uiPassParam)
Description copied from interface:IJobTrigger
The value of this field comes from the UI and is persisted in quartz but not used by quartz or the server. It is strictly a way for the UI to persist something. In the present implementation, this field holds the scheduleType.- Specified by:
setUiPassParam
in interfaceIJobTrigger
- Parameters:
uiPassParam
- A User Interface provided string
-
getCronString
public String getCronString()
Description copied from interface:IJobTrigger
Returns the Cron String used by quartz Scheduler- Specified by:
getCronString
in interfaceIJobTrigger
- Returns:
- the cronString
-
setCronString
public void setCronString(String cronString)
Description copied from interface:IJobTrigger
Sets the cron String used by the quartz scheduler- Specified by:
setCronString
in interfaceIJobTrigger
- Parameters:
cronString
- the cronString to set
-
getDuration
public long getDuration()
- Specified by:
getDuration
in interfaceIJobTrigger
- Returns:
- a long that represents in milliseconds how long this trigger should be in effect once triggered
-
setDuration
public void setDuration(long duration)
- Specified by:
setDuration
in interfaceIJobTrigger
- Parameters:
duration
- Sets the length of time in milliseconds that this trigger should be in effect.
-
getCronDescription
public String getCronDescription()
Description copied from interface:IJobTrigger
Returns the User friendly description of a Cron String- Specified by:
getCronDescription
in interfaceIJobTrigger
- Returns:
- the cronDescription
-
setCronDescription
public void setCronDescription(String cronDescription)
Description copied from interface:IJobTrigger
Sets the user friendly description of a cron String=- Specified by:
setCronDescription
in interfaceIJobTrigger
- Parameters:
cronDescription
- the cronString to set
-
-