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.
-
-
Constructor Summary
Constructors Constructor Description ConfigurableJobExecutor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods 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
getConfigurationPath()
Get the path to the resource to configure a job invocation.abstract org.apache.sling.api.resource.ResourceResolverFactory
getResolverFactory()
A method to get the resource resolver factory, should be injected as a service.abstract String
getTitleKey()
Get the i18n key for this job.abstract String
getTopic()
Gets the topic of the job.org.apache.sling.event.jobs.consumer.JobExecutionResult
process(org.apache.sling.event.jobs.Job job, org.apache.sling.event.jobs.consumer.JobExecutionContext context)
-
-
-
Method Detail
-
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
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 interfaceorg.apache.sling.event.jobs.consumer.JobExecutor
-
-