private void unregister(BaseObject jobObj, XWikiContext context) throws SchedulerPluginException { String status = jobObj.getStringValue("status"); if (status.equals(JobState.STATE_NORMAL) || status.equals(JobState.STATE_PAUSED)) { scheduleJob(jobObj, context); } if (status.equals(JobState.STATE_PAUSED)) { pauseJob(jobObj, context); } }
private void register(BaseObject jobObj, XWikiContext context) throws SchedulerPluginException { String status = jobObj.getStringValue("status"); if (status.equals(JobState.STATE_NORMAL) || status.equals(JobState.STATE_PAUSED)) { scheduleJob(jobObj, context); } if (status.equals(JobState.STATE_PAUSED)) { pauseJob(jobObj, context); } }
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 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; } }
this.pauseJob(jobObj, context);