Class RepositoryJobInfo
- java.lang.Object
-
- org.onehippo.repository.scheduling.RepositoryJobInfo
-
public class RepositoryJobInfo extends Object
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
Constructors Constructor Description RepositoryJobInfo(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.jcr.Node
createNode(javax.jcr.Session session)
Override the way the job node is created.String
getAttribute(String name)
Collection<String>
getAttributeNames()
String
getGroup()
Class<? extends RepositoryJob>
getJobClass()
String
getName()
void
setAttribute(String name, String value)
Set the value of an attribute.
-
-
-
Constructor Detail
-
RepositoryJobInfo
public RepositoryJobInfo(String name, Class<? extends RepositoryJob> jobClass)
Create a job within the default group.- Parameters:
name
- the name of the job.jobClass
- the class of the job to run.
-
RepositoryJobInfo
public RepositoryJobInfo(String name, String group, Class<? extends RepositoryJob> jobClass)
Create a job.- Parameters:
name
- the name of the job.group
- the jobs group.jobClass
- the class of the job to run
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the name of this job.
-
getGroup
public String getGroup()
- Returns:
- the group name of this job.
-
getJobClass
public Class<? extends RepositoryJob> getJobClass()
- Returns:
- the class of the job to run.
-
setAttribute
public void setAttribute(String name, String value)
Set the value of an attribute. Attributes will be available to theRepositoryJob
during execution via theRepositoryJobExecutionContext
-
getAttributeNames
public Collection<String> getAttributeNames()
- Returns:
- all the attributes that were added to this info.
-
createNode
public javax.jcr.Node createNode(javax.jcr.Session session) throws javax.jcr.RepositoryException
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:
javax.jcr.RepositoryException
-
-