/** * Sets the active state of this job.<p> * * @param active the active state to set */ public void setActive(boolean active) { checkFrozen(); m_active = active; }
/** * Gets the next execution date.<p> * * @return the next execution date */ public Date getNextExecution() { return m_jobInfo.getExecutionTimeNext(); }
/** * @see org.opencms.main.CmsException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsException createException(CmsMessageContainer container, Throwable cause) { return new CmsSchedulerException(container, cause); } }
/** * Gets the job name.<p> * * @return the job name */ public String getName() { return m_jobInfo.getJobName(); }
/** * Gets the class name for the job.<p> * * @return the class name */ public String getClassName() { return m_jobInfo.getClassName(); }
/** * Clears the id of the job.<p> * * This is useful if you want to create a copy of a job without keeping the job id. * Use <code>{@link CmsScheduledJobInfo#clone()}</code> first to create the copy, * and then clear the id of the clone.<p> */ public void clearId() { setId(null); }
/** * Terminate any worker threads in this thread group.<p> * * Jobs currently in progress will be allowed to complete.<p> */ public void shutdown() { shutdown(true); }
/** * Gets the last execution date.<p> * * @return the last execution date */ public Date getLastExecution() { return m_jobInfo.getExecutionTimePrevious(); }
/** * Generates the schedule manager.<p> */ public void addScheduleManager() { m_scheduleManager = new CmsScheduleManager(m_configuredJobs); }
/** * @see java.lang.Thread#run() */ @Override public void run() { executeJob(jobInfo); } };
/** * Sets the is used for scheduling this job.<p> * * This is an internal operation that should only by performed by the * <code>{@link CmsScheduleManager}</code>, never by using this API directly.<p> * * @param id the id to set */ protected void setId(String id) { checkFrozen(); m_id = id; }
/** * @see org.opencms.main.CmsException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsException createException(CmsMessageContainer container, Throwable cause) { return new CmsSchedulerException(container, cause); } }
/** * Clears the id of the job.<p> * * This is useful if you want to create a copy of a job without keeping the job id. * Use <code>{@link CmsScheduledJobInfo#clone()}</code> first to create the copy, * and then clear the id of the clone.<p> */ public void clearId() { setId(null); }
/** * Terminate any worker threads in this thread group.<p> * * Jobs currently in progress will be allowed to complete.<p> */ public void shutdown() { shutdown(true); }
/** * Sets the Quartz trigger used for scheduling this job.<p> * * This is an internal operation that should only by performed by the * <code>{@link CmsScheduleManager}</code>, never by using this API directly.<p> * * @param trigger the Quartz trigger to set */ protected void setTrigger(Trigger trigger) { checkFrozen(); m_trigger = trigger; }
/** * Sets the Quartz trigger used for scheduling this job.<p> * * This is an internal operation that should only by performed by the * <code>{@link CmsScheduleManager}</code>, never by using this API directly.<p> * * @param trigger the Quartz trigger to set */ protected void setTrigger(Trigger trigger) { checkFrozen(); m_trigger = trigger; }
/** * Sets the active state of this job.<p> * * @param active the active state to set */ public void setActive(boolean active) { checkFrozen(); m_active = active; }
/** * Sets the is used for scheduling this job.<p> * * This is an internal operation that should only by performed by the * <code>{@link CmsScheduleManager}</code>, never by using this API directly.<p> * * @param id the id to set */ protected void setId(String id) { checkFrozen(); m_id = id; }
/** * Controls if the job instance class is reused for this job, * of if a new instance is generated every time the job is run.<p> * * @param reuseInstance must be true if the job instance class is to be reused */ public void setReuseInstance(boolean reuseInstance) { checkFrozen(); m_reuseInstance = reuseInstance; }
/** * Controls if the job instance class is reused for this job, * of if a new instance is generated every time the job is run.<p> * * @param reuseInstance must be true if the job instance class is to be reused */ public void setReuseInstance(boolean reuseInstance) { checkFrozen(); m_reuseInstance = reuseInstance; }