/** * Return the trigger state as a ${@link JobState}, that holds both the integer trigger's inner value of the state * and a String as a human readable representation of that state */ public JobState getJobStatus(BaseObject object) throws SchedulerException { return getProtectedPlugin().getJobStatus(object, this.context); }
/** * Return the trigger state as a ${@link JobState}, that holds both the integer trigger's inner value of the state * and a String as a human readable representation of that state */ public JobState getJobStatus(BaseObject object) throws SchedulerException, SchedulerPluginException { return getProtectedPlugin().getJobStatus(object, this.context); }
public boolean scheduleJob(BaseObject object) { try { getProtectedPlugin().scheduleJob(object, this.context); return true; } catch (Exception e) { this.context.put("error", e.getMessage()); return false; } }
public boolean scheduleJob(BaseObject object) { try { getProtectedPlugin().scheduleJob(object, this.context); return true; } catch (Exception e) { this.context.put("error", e.getMessage()); return false; } }
public JobState getJobStatus(Object object) throws SchedulerException, SchedulerPluginException { return getProtectedPlugin().getJobStatus(retrieveBaseObject(object), this.context); }
public JobState getJobStatus(Object object) throws SchedulerException, SchedulerPluginException { return getProtectedPlugin().getJobStatus(retrieveBaseObject(object), this.context); }
public Date getNextFireTime(BaseObject object) { try { return getProtectedPlugin().getNextFireTime(object, this.context); } catch (SchedulerPluginException e) { this.context.put("error", e.getMessage()); return null; } } }
public boolean resumeJob(BaseObject object) { try { getProtectedPlugin().resumeJob(object, this.context); LOGGER.debug("Resume Job: [{}]", object.getStringValue("jobName")); return true; } catch (XWikiException e) { this.context.put("error", e.getMessage()); return false; } }
public boolean resumeJob(BaseObject object) { try { getProtectedPlugin().resumeJob(object, this.context); LOG.debug("Resume Job : " + object.getStringValue("jobName")); return true; } catch (XWikiException e) { this.context.put("error", e.getMessage()); return false; } }
public Date getNextFireTime(BaseObject object) { try { return getProtectedPlugin().getNextFireTime(object, this.context); } catch (SchedulerPluginException e) { this.context.put("error", e.getMessage()); return null; } } }
public boolean pauseJob(BaseObject object) { try { getProtectedPlugin().pauseJob(object, this.context); LOG.debug("Pause Job : " + object.getStringValue("jobName")); return true; } catch (XWikiException e) { this.context.put("error", e.getMessage()); return false; } }
public boolean pauseJob(BaseObject object) { try { getProtectedPlugin().pauseJob(object, this.context); LOGGER.debug("Pause Job: [{}]", object.getStringValue("jobName")); return true; } catch (XWikiException e) { this.context.put("error", e.getMessage()); return false; } }
public boolean unscheduleJob(BaseObject object) { try { getProtectedPlugin().unscheduleJob(object, this.context); LOGGER.debug("Delete Job: [{}]", object.getStringValue("jobName")); return true; } catch (XWikiException e) { this.context.put("error", e.getMessage()); return false; } }
public boolean unscheduleJob(BaseObject object) { try { getProtectedPlugin().unscheduleJob(object, this.context); LOG.debug("Delete Job : " + object.getStringValue("jobName")); return true; } catch (XWikiException e) { this.context.put("error", e.getMessage()); return false; } }
/** * Give, for a BaseObject job in a {@link 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. * * @param object the BaseObject for which to give the fire time * @return the date the job has been executed */ public Date getPreviousFireTime(BaseObject object) { try { return getProtectedPlugin().getPreviousFireTime(object, this.context); } catch (SchedulerPluginException e) { this.context.put("error", e.getMessage()); return null; } }
/** * Trigger a BaseObject job (execute it now). * * @param object the BaseObject Job to be triggered * @return true on success, false on failure. */ public boolean triggerJob(BaseObject object) { try { getProtectedPlugin().triggerJob(object, this.context); LOGGER.debug("Trigger Job: [{}]", object.getStringValue("jobName")); return true; } catch (XWikiException e) { this.context.put("error", e.getMessage()); return false; } }
/** * Give, for a BaseObject job in a {@link 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. * * @param object the BaseObject for which to give the fire time * @return the date the job has been executed */ public Date getPreviousFireTime(BaseObject object) { try { return getProtectedPlugin().getPreviousFireTime(object, this.context); } catch (SchedulerPluginException e) { this.context.put("error", e.getMessage()); return null; } }
/** * Trigger a BaseObject job (execute it now). * * @param object the BaseObject Job to be triggered * @return true on success, false on failure. */ public boolean triggerJob(BaseObject object) { try { getProtectedPlugin().triggerJob(object, this.context); LOG.debug("Trigger Job : " + object.getStringValue("jobName")); return true; } catch (XWikiException e) { this.context.put("error", e.getMessage()); return false; } }