org.apache.lenya.cms.scheduler
Class TaskJob

java.lang.Object
  extended by org.apache.lenya.cms.scheduler.ServletJob
      extended by org.apache.lenya.cms.scheduler.TaskJob
All Implemented Interfaces:
org.quartz.Job

public class TaskJob
extends ServletJob

A TaskJob is a Job that executes a Task. The task ID is obtained from the task-id request parameter.


Field Summary
 
Fields inherited from class org.apache.lenya.cms.scheduler.ServletJob
ATTRIBUTE_CLASS, ATTRIBUTE_DOCUMENT_URL, ATTRIBUTE_ID, ATTRIBUTE_SERVLET_CONTEXT, ELEMENT_JOB, PARAMETER_DOCUMENT_URL
 
Constructor Summary
TaskJob()
           
 
Method Summary
 org.quartz.JobDataMap createJobData(javax.servlet.http.HttpServletRequest request)
          Creates the job data for a job.
 void execute(org.quartz.JobExecutionContext context)
           Called by the Scheduler when a Trigger fires that is associated with the Job.
 org.quartz.JobDetail load(org.w3c.dom.Element jobElement, java.lang.String jobGroup, java.lang.String servletContextPath)
          Loads a job details object from an XML element.
 org.w3c.dom.Element save(NamespaceHelper helper, org.quartz.JobDetail jobDetail)
          DOCUMENT ME!
protected  java.util.Map stripPrefixes(java.util.Map wrapperMap)
          Un-prefix the parameters.
 
Methods inherited from class org.apache.lenya.cms.scheduler.ServletJob
getDocumentUrl, setDocumentUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskJob

public TaskJob()
Method Detail

stripPrefixes

protected java.util.Map stripPrefixes(java.util.Map wrapperMap)
                               throws org.quartz.SchedulerException
Un-prefix the parameters.

Parameters:
wrapperMap - the prefixed parameters.
Returns:
the parameters
Throws:
org.quartz.SchedulerException - when something went wrong.

createJobData

public org.quartz.JobDataMap createJobData(javax.servlet.http.HttpServletRequest request)
                                    throws org.quartz.SchedulerException
Creates the job data for a job.

Overrides:
createJobData in class ServletJob
Parameters:
servletContextPath - The servlet context path.
request - The request.
Returns:
A job data map.
Throws:
org.quartz.SchedulerException - when something went wrong.

execute

public void execute(org.quartz.JobExecutionContext context)
             throws org.quartz.JobExecutionException

Called by the Scheduler when a Trigger fires that is associated with the Job.

Parameters:
context - DOCUMENT ME!
Throws:
org.quartz.JobExecutionException - if there is an exception while executing the job.

load

public org.quartz.JobDetail load(org.w3c.dom.Element jobElement,
                                 java.lang.String jobGroup,
                                 java.lang.String servletContextPath)
                          throws org.quartz.SchedulerException
Loads a job details object from an XML element.

Overrides:
load in class ServletJob
Parameters:
jobElement - The XML element.
jobGroup - The job group the job belongs to.
servletContextPath - The servlet context path.
Returns:
A job details object.
Throws:
org.quartz.SchedulerException - when something went wrong.

save

public org.w3c.dom.Element save(NamespaceHelper helper,
                                org.quartz.JobDetail jobDetail)
                         throws org.quartz.SchedulerException
DOCUMENT ME!

Overrides:
save in class ServletJob
Parameters:
jobDetail - DOCUMENT ME!
helper - namespace helper
Returns:
DOCUMENT ME!
Throws:
org.quartz.SchedulerException - when something went wrong.


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.