Tabnine Logo
SchedulerPlugin.saveStatus
Code IndexAdd Tabnine to your IDE (free)

How to use
saveStatus
method
in
com.xpn.xwiki.plugin.scheduler.SchedulerPlugin

Best Java code snippets using com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.saveStatus (Showing top 8 results out of 315)

origin: org.xwiki.platform/xwiki-platform-scheduler-api

if (object.getStringValue("status").equals("Paused")) {
  getScheduler().pauseJob(new JobKey(xjob));
  saveStatus("Paused", object, context);
} else {
  saveStatus("Normal", object, context);
LOGGER.debug("Schedule Job: [{}]", object.getStringValue("jobName"));
getScheduler().scheduleJob(trigger);
saveStatus("Normal", object, context);
break;
origin: com.xpn.xwiki.platform.plugins/xwiki-plugin-scheduler

/**
 * Unschedule the given job
 * 
 * @param object the unwrapped XObject job to be unscheduled
 */
public void unscheduleJob(BaseObject object, XWikiContext context) throws SchedulerPluginException
{
  try {
    getScheduler().deleteJob(getObjectUniqueId(object, context), Scheduler.DEFAULT_GROUP);
    saveStatus("None", object, context);
  } catch (SchedulerException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_JOB_XCLASS_NOT_FOUND,
      "Error while unscheduling job " + object.getStringValue("jobName"), e);
  } catch (XWikiException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_JOB_XCLASS_NOT_FOUND,
      "Error while saving status of job " + object.getStringValue("jobName"), e);
  }
}
origin: com.xpn.xwiki.platform.plugins/xwiki-plugin-scheduler

/**
 * Resume the job with the given name (un-pause)
 * 
 * @param object the non-wrapped XObject Job to be resumed
 */
public void resumeJob(BaseObject object, XWikiContext context) throws SchedulerPluginException
{
  try {
    getScheduler().resumeJob(getObjectUniqueId(object, context), Scheduler.DEFAULT_GROUP);
    saveStatus("Normal", object, context);
  } catch (SchedulerException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_RESUME_JOB,
      "Error occured while trying to resume job " + object.getStringValue("jobName"), e);
  } catch (XWikiException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_RESUME_JOB,
      "Error occured while trying to save status of job " + object.getStringValue("jobName"), e);
  }
}
origin: com.xpn.xwiki.platform.plugins/xwiki-plugin-scheduler

/**
 * Pause the job with the given name by pausing all of its current triggers.
 * 
 * @param object the non-wrapped XObject Job to be paused
 */
public void pauseJob(BaseObject object, XWikiContext context) throws SchedulerPluginException
{
  try {
    getScheduler().pauseJob(getObjectUniqueId(object, context), Scheduler.DEFAULT_GROUP);
    saveStatus("Paused", object, context);
  } catch (SchedulerException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_PAUSE_JOB,
      "Error occured while trying to pause job " + object.getStringValue("jobName"), e);
  } catch (XWikiException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_PAUSE_JOB,
      "Error occured while trying to save status of job " + object.getStringValue("jobName"), e);
  }
}
origin: com.xpn.xwiki.platform.plugins/xwiki-plugin-scheduler

if (object.getStringValue("status").equals("Paused")) {
  getScheduler().pauseJob(xjob, Scheduler.DEFAULT_GROUP);
  saveStatus("Paused", object, context);
} else {
  saveStatus("Normal", object, context);
LOG.debug("Schedule Job : " + object.getStringValue("jobName"));
getScheduler().scheduleJob(trigger);
saveStatus("Normal", object, context);
break;
origin: org.xwiki.platform/xwiki-platform-scheduler-api

/**
 * Unschedule the given job
 * 
 * @param object the unwrapped XObject job to be unscheduled
 */
public void unscheduleJob(BaseObject object, XWikiContext context) throws SchedulerPluginException
{
  String job = getObjectUniqueId(object, context);
  try {
    getScheduler().deleteJob(new JobKey(job));
    saveStatus("None", object, context);
  } catch (SchedulerException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_JOB_XCLASS_NOT_FOUND,
      "Error while unscheduling job " + object.getStringValue("jobName"), e);
  } catch (XWikiException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_JOB_XCLASS_NOT_FOUND,
      "Error while saving status of job " + object.getStringValue("jobName"), e);
  }
}
origin: org.xwiki.platform/xwiki-platform-scheduler-api

/**
 * Pause the job with the given name by pausing all of its current triggers.
 * 
 * @param object the non-wrapped XObject Job to be paused
 */
public void pauseJob(BaseObject object, XWikiContext context) throws SchedulerPluginException
{
  String job = getObjectUniqueId(object, context);
  try {
    getScheduler().pauseJob(new JobKey(job));
    saveStatus("Paused", object, context);
  } catch (SchedulerException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_PAUSE_JOB,
      "Error occured while trying to pause job " + object.getStringValue("jobName"), e);
  } catch (XWikiException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_PAUSE_JOB,
      "Error occured while trying to save status of job " + object.getStringValue("jobName"), e);
  }
}
origin: org.xwiki.platform/xwiki-platform-scheduler-api

/**
 * Resume the job with the given name (un-pause)
 * 
 * @param object the non-wrapped XObject Job to be resumed
 */
public void resumeJob(BaseObject object, XWikiContext context) throws SchedulerPluginException
{
  String job = getObjectUniqueId(object, context);
  try {
    getScheduler().resumeJob(new JobKey(job));
    saveStatus("Normal", object, context);
  } catch (SchedulerException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_RESUME_JOB,
      "Error occured while trying to resume job " + object.getStringValue("jobName"), e);
  } catch (XWikiException e) {
    throw new SchedulerPluginException(SchedulerPluginException.ERROR_SCHEDULERPLUGIN_RESUME_JOB,
      "Error occured while trying to save status of job " + object.getStringValue("jobName"), e);
  }
}
com.xpn.xwiki.plugin.schedulerSchedulerPluginsaveStatus

Popular methods of SchedulerPlugin

  • scheduleJob
  • getDefaultSchedulerInstance
  • getJobStatus
    Retrieve the job's status of a given com.xpn.xwiki.plugin.scheduler.SchedulerPlugin#XWIKI_JOB_CLASS
  • getNextFireTime
    Get the next fire time for the given job name SchedulerJob
  • getObjectUniqueId
    Compute a cross-document unique com.xpn.xwiki.objects.BaseObject id, by concatenating its name (it's
  • getPreviousFireTime
    Give, for a BaseObject job in a JobState#STATE_NORMAL state, the previous date at which the job has
  • getScheduler
  • getTrigger
    Get Trigger object of the given job
  • pauseJob
    Pause the job with the given name by pausing all of its current triggers.
  • prepareJobStubContext
    Create and feed a stub context for the job execution thread. Stub context data are retrieved from jo
  • restoreExistingJobs
    Restore the existing job, by looking up for such job in the database and re-scheduling those accordi
  • resumeJob
    Resume the job with the given name (un-pause)
  • restoreExistingJobs,
  • resumeJob,
  • setScheduler,
  • setStatusListener,
  • triggerJob,
  • unscheduleJob,
  • getWikiIdPrefix,
  • onDocumentEvent,
  • onWikiDeletedEvent

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • getSystemService (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now