Class RepositoryJobInfo
java.lang.Object
org.onehippo.repository.scheduling.RepositoryJobInfo
Captures information about a repository job.
Jobs have names and are grouped. A job must have a unique name within a given group.
Jobs are triggered by RepositoryJobTrigger
s. Jobs can have multiple such triggers
associated with them.
-
Constructor Summary
ConstructorDescriptionRepositoryJobInfo
(String name, Class<? extends RepositoryJob> jobClass) Create a job within the default group.RepositoryJobInfo
(String name, String group, Class<? extends RepositoryJob> jobClass) Create a job. -
Method Summary
Modifier and TypeMethodDescriptioncreateNode
(Session session) Override the way the job node is created.getAttribute
(String name) getGroup()
Class<? extends RepositoryJob>
getName()
void
setAttribute
(String name, String value) Set the value of an attribute.
-
Constructor Details
-
RepositoryJobInfo
Create a job within the default group.- Parameters:
name
- the name of the job.jobClass
- the class of the job to run.
-
RepositoryJobInfo
Create a job.- Parameters:
name
- the name of the job.group
- the jobs group.jobClass
- the class of the job to run
-
-
Method Details
-
getName
- Returns:
- the name of this job.
-
getGroup
- Returns:
- the group name of this job.
-
getJobClass
- Returns:
- the class of the job to run.
-
setAttribute
Set the value of an attribute. Attributes will be available to theRepositoryJob
during execution via theRepositoryJobExecutionContext
-
getAttribute
- Returns:
- the value of an attribute by name.
-
getAttributeNames
- Returns:
- all the attributes that were added to this info.
-
createNode
Override the way the job node is created.- Parameters:
session
- JCR session with which to create a new job node.- Returns:
- a newly created node representing the job,
or
null
to let the system create one. - Throws:
RepositoryException
-