Package org.apache.sling.cms
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 -
Method Summary
Modifier and TypeMethodDescriptionabstract org.apache.sling.event.jobs.consumer.JobExecutionResultdoProcess(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 StringGet the path to the resource to configure a job invocation.abstract org.apache.sling.api.resource.ResourceResolverFactoryA method to get the resource resolver factory, should be injected as a service.abstract StringGet the i18n key for this job.abstract StringgetTopic()Gets the topic of the job.final org.apache.sling.event.jobs.consumer.JobExecutionResultprocess(org.apache.sling.event.jobs.Job job, org.apache.sling.event.jobs.consumer.JobExecutionContext context)
-
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 configurationcontext- the job contextresolver- an impersonated resource resolver for the user- Returns:
- the result of executing the job
-
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
Get the i18n key for this job.- Returns:
- the job title i18n key
-
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:
processin interfaceorg.apache.sling.event.jobs.consumer.JobExecutor
-