|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xpn.xwiki.plugin.XWikiDefaultPlugin
com.xpn.xwiki.plugin.scheduler.SchedulerPlugin
public class SchedulerPlugin
See SchedulerPluginApi for documentation.
| Field Summary | |
|---|---|
static String |
XWIKI_JOB_CLASS
Fullname of the XWiki Scheduler Job Class representing a job that can be scheduled by this plugin. |
| Constructor Summary | |
|---|---|
SchedulerPlugin(String name,
String className,
com.xpn.xwiki.XWikiContext context)
Default plugin constructor. |
|
| Method Summary | |
|---|---|
JobState |
getJobStatus(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
Retrieve the job's status of a given XWIKI_JOB_CLASS job
XObject, by asking the actual job status to the quartz scheduler instance. |
String |
getName()
|
Date |
getNextFireTime(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
Get the next fire time for the given job name SchedulerJob |
Api |
getPluginApi(com.xpn.xwiki.plugin.XWikiPluginInterface plugin,
com.xpn.xwiki.XWikiContext context)
|
Date |
getPreviousFireTime(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
Give, for a BaseObject job in a JobState.STATE_NORMAL state, the previous date at which the job has been
executed. |
org.quartz.Scheduler |
getScheduler()
|
void |
init(com.xpn.xwiki.XWikiContext context)
|
void |
pauseJob(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
Pause the job with the given name by pausing all of its current triggers. |
void |
resumeJob(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
Resume the job with the given name (un-pause) |
boolean |
scheduleJob(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
|
void |
setScheduler(org.quartz.Scheduler scheduler)
|
void |
triggerJob(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
Trigger a job (execute it now) |
void |
unscheduleJob(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
Unschedule the given job |
void |
virtualInit(com.xpn.xwiki.XWikiContext context)
|
| Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin |
|---|
beginParsing, beginRendering, commonTagsHandler, downloadAttachment, endParsing, endRendering, endRenderingHandler, flushCache, flushCache, getClassName, insidePREHandler, outsidePREHandler, setClassName, setName, startRenderingHandler |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String XWIKI_JOB_CLASS
| Constructor Detail |
|---|
public SchedulerPlugin(String name,
String className,
com.xpn.xwiki.XWikiContext context)
XWikiDefaultPlugin.XWikiDefaultPlugin(String,String,com.xpn.xwiki.XWikiContext)| Method Detail |
|---|
public void init(com.xpn.xwiki.XWikiContext context)
init in interface com.xpn.xwiki.plugin.XWikiPluginInterfaceinit in class com.xpn.xwiki.plugin.XWikiDefaultPluginXWikiPluginInterface.init(com.xpn.xwiki.XWikiContext)public void virtualInit(com.xpn.xwiki.XWikiContext context)
virtualInit in interface com.xpn.xwiki.plugin.XWikiPluginInterfacevirtualInit in class com.xpn.xwiki.plugin.XWikiDefaultPluginXWikiPluginInterface.virtualInit(com.xpn.xwiki.XWikiContext)
public JobState getJobStatus(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
throws org.quartz.SchedulerException
XWIKI_JOB_CLASS job
XObject, by asking the actual job status to the quartz scheduler instance. It's the actual status, as the one
stored in the XObject may be changed manually by users.
object - the XObject to give the status of
JobState
instance
org.quartz.SchedulerException
public boolean scheduleJob(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
throws SchedulerPluginException
SchedulerPluginException
public void pauseJob(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
throws SchedulerPluginException
object - the non-wrapped XObject Job to be paused
SchedulerPluginException
public void resumeJob(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
throws SchedulerPluginException
object - the non-wrapped XObject Job to be resumed
SchedulerPluginException
public void triggerJob(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
throws SchedulerPluginException
object - the non-wrapped XObject Job to be triggeredcontext - the XWiki context
SchedulerPluginException
public void unscheduleJob(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
throws SchedulerPluginException
object - the unwrapped XObject job to be unscheduled
SchedulerPluginException
public Date getPreviousFireTime(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
throws SchedulerPluginException
JobState.STATE_NORMAL state, the previous date at which the job has been
executed. Note that this method does not compute a date from the CRON expression, it only returns a date value
which is set each time the job is executed. If the job has never been fired this method will return null.
object - unwrapped XObject job for which the next fire time will be givencontext - the XWiki context
SchedulerPluginException
public Date getNextFireTime(com.xpn.xwiki.objects.BaseObject object,
com.xpn.xwiki.XWikiContext context)
throws SchedulerPluginException
object - unwrapped XObject job for which the next fire time will be given
SchedulerPluginException
public Api getPluginApi(com.xpn.xwiki.plugin.XWikiPluginInterface plugin,
com.xpn.xwiki.XWikiContext context)
getPluginApi in interface com.xpn.xwiki.plugin.XWikiPluginInterfacegetPluginApi in class com.xpn.xwiki.plugin.XWikiDefaultPluginpublic String getName()
getName in interface com.xpn.xwiki.plugin.XWikiPluginInterfacegetName in class com.xpn.xwiki.plugin.XWikiDefaultPluginpublic void setScheduler(org.quartz.Scheduler scheduler)
scheduler - the scheduler to usepublic org.quartz.Scheduler getScheduler()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||