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 RepositoryJobTriggers. Jobs can have multiple such triggers associated with them.

  • Constructor Details

    • 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 Details

    • 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 the RepositoryJob during execution via the RepositoryJobExecutionContext
    • getAttribute

      public String getAttribute(String name)
      Returns:
      the value of an attribute by name.
    • getAttributeNames

      public Collection<String> getAttributeNames()
      Returns:
      all the attributes that were added to this info.
    • createNode

      public Node createNode(Session session) throws 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:
      RepositoryException