| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.scheduler.SchedulerWrapper
public class SchedulerWrapper
| Field Summary | |
|---|---|
static java.lang.String | 
CLASS_ATTRIBUTE
 | 
static java.lang.String | 
ELEMENT_TRIGGER
 | 
static java.lang.String | 
ELEMENT_TRIGGERS
 | 
static java.lang.String | 
JOB_ID
 | 
static java.lang.String | 
JOB_PREFIX
 | 
static java.lang.String | 
TYPE_ATTRIBUTE
 | 
| Constructor Summary | |
|---|---|
SchedulerWrapper(java.lang.String servletContextPath,
                 java.lang.String schedulerConfigurationPath)
Creates a new instance of SchedulerWrapper  | 
|
| Method Summary | |
|---|---|
protected  void | 
addJob(org.quartz.JobDetail detail)
Adds a job.  | 
protected  void | 
addJob(org.quartz.JobDetail detail,
       org.quartz.Trigger trigger)
Adds a job.  | 
protected  void | 
addJob(java.lang.String jobGroup,
       java.util.Date startTime,
       java.lang.Class jobClass,
       org.quartz.JobDataMap map)
Adds a job.  | 
 void | 
addJob(java.lang.String jobGroup,
       java.util.Date startTime,
       javax.servlet.http.HttpServletRequest request)
Adds a job.  | 
protected  void | 
deleteJob(java.lang.String jobName,
          java.lang.String jobGroup)
Deletes a job.  | 
 void | 
deleteJobs(Document document)
Deletes the jobs for a certain document.  | 
protected  JobWrapper[] | 
getJobWrappers(java.lang.String jobGroupName)
Returns the job wrappers for a certain job group.  | 
protected static java.lang.String | 
getNextJobId()
Returns the next job ID to use (calculated using the current time).  | 
protected  Publication | 
getPublication(java.lang.String jobGroup)
Returns the publication for a job group.  | 
protected  org.apache.avalon.framework.configuration.Configuration | 
getSchedulerConfiguration()
Reads the scheduler configuration.  | 
protected  java.lang.String | 
getSchedulerConfigurationPath()
Returns the scheduler configuration path.  | 
protected  java.lang.String | 
getServletContextPath()
Returns the servlet context path.  | 
 org.w3c.dom.Document | 
getSnapshot()
Return an xml description of all scheduled jobs.  | 
protected  org.w3c.dom.Element | 
getSnapshot(NamespaceHelper helper,
            java.lang.String group)
Returns the snapshot of a certain job group.  | 
 org.w3c.dom.Document | 
getSnapshot(java.lang.String[] jobGroupNames)
Return an XML description certain job groups.  | 
protected  SchedulerStore | 
getStore()
Returns the store.  | 
protected  org.quartz.Trigger | 
getTrigger(java.lang.String jobName,
           java.lang.String jobGroup)
Returns the trigger of a certain job.  | 
protected  org.w3c.dom.Element | 
getTriggerTypes(NamespaceHelper helper)
Returns an XML element containing the trigger types.  | 
 void | 
modifyJob(java.lang.String jobId,
          java.lang.String jobGroup,
          java.util.Date startTime)
Modifies the execution time of a job.  | 
 void | 
restoreJobs(java.lang.String jobGroup)
Restores the jobs of a certain job group from the snapshot file.  | 
 void | 
shutdown()
Shuts down the scheduler.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String JOB_PREFIX
public static final java.lang.String JOB_ID
public static final java.lang.String ELEMENT_TRIGGERS
public static final java.lang.String ELEMENT_TRIGGER
public static final java.lang.String TYPE_ATTRIBUTE
public static final java.lang.String CLASS_ATTRIBUTE
| Constructor Detail | 
|---|
public SchedulerWrapper(java.lang.String servletContextPath,
                        java.lang.String schedulerConfigurationPath)
servletContextPath - The servlet context path.schedulerConfigurationPath - The scheduler configuration path.| Method Detail | 
|---|
protected SchedulerStore getStore()
public void shutdown()
protected java.lang.String getServletContextPath()
protected java.lang.String getSchedulerConfigurationPath()
protected static java.lang.String getNextJobId()
protected void addJob(java.lang.String jobGroup,
                      java.util.Date startTime,
                      java.lang.Class jobClass,
                      org.quartz.JobDataMap map)
               throws org.quartz.SchedulerException,
                      PublicationException
jobGroup - The job group.startTime - The start time.jobClass - The class of the job.map - The job parameters.
org.quartz.SchedulerException - if an error occurs.
PublicationException - if an error occurs.
public void addJob(java.lang.String jobGroup,
                   java.util.Date startTime,
                   javax.servlet.http.HttpServletRequest request)
            throws org.quartz.SchedulerException
jobGroup - The job group.startTime - The start time.request - The request to obtain the parameters from.
org.quartz.SchedulerException - when something went wrong.
protected Publication getPublication(java.lang.String jobGroup)
                              throws PublicationException
jobGroup - A job group.
PublicationException - when the publication does not exist.
protected void addJob(org.quartz.JobDetail detail,
                      org.quartz.Trigger trigger)
detail - The job information.trigger - The trigger to trigger the job.protected void addJob(org.quartz.JobDetail detail)
detail - The job information.
protected void deleteJob(java.lang.String jobName,
                         java.lang.String jobGroup)
jobName - The job name.jobGroup - The job group.protected org.apache.avalon.framework.configuration.Configuration getSchedulerConfiguration()
protected org.w3c.dom.Element getTriggerTypes(NamespaceHelper helper)
helper - The namespace helper of the document that shall contain the element.
protected org.quartz.Trigger getTrigger(java.lang.String jobName,
                                        java.lang.String jobGroup)
                                 throws org.quartz.SchedulerException
jobName - The job name.jobGroup - The job group.
org.quartz.SchedulerException - when something went wrong.
public org.w3c.dom.Document getSnapshot(java.lang.String[] jobGroupNames)
                                 throws org.quartz.SchedulerException
jobGroupNames - The job group names.
org.quartz.SchedulerException - if an error occurs
protected org.w3c.dom.Element getSnapshot(NamespaceHelper helper,
                                          java.lang.String group)
                                   throws org.quartz.SchedulerException
helper - The namespace helper.group - The job group.
org.quartz.SchedulerException - when something went wrong.
protected JobWrapper[] getJobWrappers(java.lang.String jobGroupName)
                               throws org.quartz.SchedulerException
jobGroupName - The job group.
org.quartz.SchedulerException - when something went wrong.
public org.w3c.dom.Document getSnapshot()
                                 throws org.quartz.SchedulerException
org.quartz.SchedulerException - if an error occurs
public void restoreJobs(java.lang.String jobGroup)
                 throws org.quartz.SchedulerException
jobGroup - The job group.
org.quartz.SchedulerException - when something went wrong.
public void modifyJob(java.lang.String jobId,
                      java.lang.String jobGroup,
                      java.util.Date startTime)
               throws org.quartz.SchedulerException
jobId - The job ID.jobGroup - The job group.startTime - The new start time.
org.quartz.SchedulerException - when the job was not found.
public void deleteJobs(Document document)
                throws org.quartz.SchedulerException,
                       PublicationException
document - A document.
org.quartz.SchedulerException - when something went wrong.
PublicationException - when something went wrong.
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||