| |
|
| java.lang.Object org.apache.lenya.cms.scheduler.SchedulerStore
SchedulerStore | public class SchedulerStore (Code) | | Store for scheduler jobs.
|
ELEMENT_JOB | final public static String ELEMENT_JOB(Code) | | ELEMENT_JOB The job element
|
ELEMENT_JOB_GROUP | final public static String ELEMENT_JOB_GROUP(Code) | | ELEMENT_JOB_GROUP The job group element
|
NAMESPACE | final public static String NAMESPACE(Code) | | The namespace for the jobs.xml file.
|
SNAPSHOT_FILE | final public static String SNAPSHOT_FILE(Code) | | SNAPSHOT_FILE The path to the stored jobs
|
TITLE_ELEMENT | final public static String TITLE_ELEMENT(Code) | | TITLE_ELEMENT The title element
|
SchedulerStore | public SchedulerStore()(Code) | | Ctor.
|
createSnapshot | protected Element createSnapshot(NamespaceHelper helper, Publication publication, JobWrapper[] jobs) throws SchedulerException(Code) | | Creates an XML element containing a snapshot of a job group.
Parameters: helper - The namespace helper to use. Parameters: publication - The publication to create the snapshot for Parameters: jobs - The jobs An XML element. throws: SchedulerException - when something went wrong. |
getJobElements | protected Element[] getJobElements(Publication publication) throws SchedulerException(Code) | | Returns the job elements of a publication.
Parameters: publication - An array of elements throws: SchedulerException - when something went wrong. |
getJobsFile | protected File getJobsFile(Publication publication) throws SchedulerException(Code) | | Returns the job snapshot file for a publication..
Parameters: publication - The publication. A file. throws: SchedulerException - when the publication could not be built. |
getNamespaceHelper | public static NamespaceHelper getNamespaceHelper(Document document)(Code) | | Returns a scheduler namespace helper for a document.
Parameters: document - The XML document. a namespace helper. |
getNamespaceHelper | public static NamespaceHelper getNamespaceHelper()(Code) | | Returns a new scheduler namespace helper with an document containing
a <sch:scheduler> element.
a namespace helper. |
getSnapshot | public Document getSnapshot(Publication publication, JobWrapper[] jobs) throws SchedulerException(Code) | | Return an xml description of all scheduled jobs for the given publication.
Parameters: publication - The publication. Parameters: jobs - The jobs to return An XML document. exception: SchedulerException - if an error occurs |
restoreJob | protected JobWrapper restoreJob(NamespaceHelper helper, Element jobElement, Publication publication) throws SchedulerException(Code) | | Restores the jobs from a certain XML element.
Parameters: helper - The namespace helper Parameters: jobElement - The XML element. Parameters: publication - The publication to restore jobs for A job wrapper throws: SchedulerException - if an error occurs |
restoreJobs | public JobWrapper[] restoreJobs(Publication publication) throws SchedulerException(Code) | | Restores the jobs of a certain job group from the snapshot file.
Parameters: publication - The publication A job wrapper throws: SchedulerException - when something went wrong. |
writeSnapshot | protected void writeSnapshot(Publication publication, JobWrapper[] jobs) throws SchedulerException(Code) | | Writes a job snapshot.
Parameters: publication - The publication. Parameters: jobs - The jobs to persist throws: SchedulerException - when something went wrong. |
|
|
|