Class ConfigurableJobExecutor

java.lang.Object
org.apache.sling.cms.ConfigurableJobExecutor
All Implemented Interfaces:
org.apache.sling.event.jobs.consumer.JobExecutor

public abstract class ConfigurableJobExecutor extends Object implements org.apache.sling.event.jobs.consumer.JobExecutor
A Configurable Job Executor is a Sling Job which can be manually triggered by Sling CMS users.
  • Field Summary

    Fields inherited from interface org.apache.sling.event.jobs.consumer.JobExecutor

    PROPERTY_TOPICS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.apache.sling.event.jobs.consumer.JobExecutionResult
    doProcess(org.apache.sling.event.jobs.Job job, org.apache.sling.event.jobs.consumer.JobExecutionContext context, org.apache.sling.api.resource.ResourceResolver resolver)
    A method for Configurable Job Executors to extend.
    abstract String
    Get the path to the resource to configure a job invocation.
    abstract org.apache.sling.api.resource.ResourceResolverFactory
    A method to get the resource resolver factory, should be injected as a service.
    abstract String
    Get the i18n key for this job.
    abstract String
    Gets the topic of the job.
    final org.apache.sling.event.jobs.consumer.JobExecutionResult
    process(org.apache.sling.event.jobs.Job job, org.apache.sling.event.jobs.consumer.JobExecutionContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConfigurableJobExecutor

      public ConfigurableJobExecutor()
  • Method Details

    • doProcess

      public abstract org.apache.sling.event.jobs.consumer.JobExecutionResult doProcess(org.apache.sling.event.jobs.Job job, org.apache.sling.event.jobs.consumer.JobExecutionContext context, org.apache.sling.api.resource.ResourceResolver resolver)
      A method for Configurable Job Executors to extend.
      Parameters:
      job - the job configuration
      context - the job context
      resolver - an impersonated resource resolver for the user
      Returns:
      the result of executing the job
    • getConfigurationPath

      public abstract String getConfigurationPath()
      Get the path to the resource to configure a job invocation.
      Returns:
      the path to the resource to configure a resource invocation
    • getResolverFactory

      public abstract org.apache.sling.api.resource.ResourceResolverFactory getResolverFactory()
      A method to get the resource resolver factory, should be injected as a service.
      Returns:
      the resource resolver factory
    • getTitleKey

      public abstract String getTitleKey()
      Get the i18n key for this job.
      Returns:
      the job title i18n key
    • getTopic

      public abstract String getTopic()
      Gets the topic of the job. This will be used as the Sling Job Topic for invoking the job.
      Returns:
      the Sling Job Topic
    • process

      public final org.apache.sling.event.jobs.consumer.JobExecutionResult process(org.apache.sling.event.jobs.Job job, org.apache.sling.event.jobs.consumer.JobExecutionContext context)
      Specified by:
      process in interface org.apache.sling.event.jobs.consumer.JobExecutor