|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.scheduler.SchedulerStore
public class SchedulerStore
Store for scheduler jobs.
| Field Summary | |
|---|---|
static java.lang.String |
ELEMENT_JOB
|
static java.lang.String |
ELEMENT_JOB_GROUP
|
static java.lang.String |
NAMESPACE
The namespace for the jobs.xml file. |
static java.lang.String |
SNAPSHOT_FILE
|
static java.lang.String |
TITLE_ELEMENT
|
| Constructor Summary | |
|---|---|
SchedulerStore()
Ctor. |
|
| Method Summary | |
|---|---|
protected org.w3c.dom.Element |
createSnapshot(NamespaceHelper helper,
Publication publication,
JobWrapper[] jobs)
Creates an XML element containting a snapshot of a job group. |
protected org.w3c.dom.Element[] |
getJobElements(Publication publication)
Returns the job elements of a publication. |
protected java.io.File |
getJobsFile(Publication publication)
Returns the job snapshot file for a publication.. |
static NamespaceHelper |
getNamespaceHelper()
Returns a new scheduler namespace helper with an document containing a <sch:scheduler> element. |
static NamespaceHelper |
getNamespaceHelper(org.w3c.dom.Document document)
Returns a scheduler namespace helper for a document. |
org.w3c.dom.Document |
getSnapshot(Publication publication,
JobWrapper[] jobs)
Return an xml description of all scheduled jobs for the given publication. |
protected JobWrapper |
restoreJob(NamespaceHelper helper,
org.w3c.dom.Element jobElement,
Publication publication)
Restores the jobs from a certain XML element. |
JobWrapper[] |
restoreJobs(Publication publication)
Restores the jobs of a certain job group from the snapshot file. |
protected void |
writeSnapshot(Publication publication,
JobWrapper[] jobs)
Writes a job snapshot. |
| 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 ELEMENT_JOB_GROUP
public static final java.lang.String ELEMENT_JOB
public static final java.lang.String TITLE_ELEMENT
public static final java.lang.String SNAPSHOT_FILE
public static final java.lang.String NAMESPACE
jobs.xml file.
| Constructor Detail |
|---|
public SchedulerStore()
publication - The publication.| Method Detail |
|---|
protected java.io.File getJobsFile(Publication publication)
throws org.quartz.SchedulerException
Publication - The publication.
org.quartz.SchedulerException - when the publication could not be built.
protected void writeSnapshot(Publication publication,
JobWrapper[] jobs)
throws org.quartz.SchedulerException
publication - The publication.
org.quartz.SchedulerException - when something went wrong.
public org.w3c.dom.Document getSnapshot(Publication publication,
JobWrapper[] jobs)
throws org.quartz.SchedulerException
publication - The publication.
org.quartz.SchedulerException - if an error occurspublic static NamespaceHelper getNamespaceHelper(org.w3c.dom.Document document)
document - The XML document.
public static NamespaceHelper getNamespaceHelper()
protected org.w3c.dom.Element createSnapshot(NamespaceHelper helper,
Publication publication,
JobWrapper[] jobs)
throws org.quartz.SchedulerException
helper - The namespace helper to use.jobGroup - The job group.
org.quartz.SchedulerException - when something went wrong.
public JobWrapper[] restoreJobs(Publication publication)
throws org.quartz.SchedulerException
jobGroup - The job group.
org.quartz.SchedulerException - when something went wrong.
protected JobWrapper restoreJob(NamespaceHelper helper,
org.w3c.dom.Element jobElement,
Publication publication)
throws org.quartz.SchedulerException
jobElement - The XML element.jobGroup - The job group the job belongs to.
org.quartz.SchedulerException
protected org.w3c.dom.Element[] getJobElements(Publication publication)
throws org.quartz.SchedulerException
publication -
org.quartz.SchedulerException - when something went wrong.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||