@Deprecated public abstract class AbstractGoal extends Object implements JobConsumer, Goal
Goal
implementations. It implements the job's process method and aggregates information vital to a Goal, such as the
resource resolver and the environment.JobConsumer.AsyncHandler, JobConsumer.JobResult
PROPERTY_JOB_ASYNC_HANDLER, PROPERTY_TOPICS
Constructor and Description |
---|
AbstractGoal()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
JobConsumer.JobResult |
process(Job job)
Deprecated.
Execute the job.
|
abstract void |
run(Job job,
Environment environment,
ResourceResolver resolver)
Deprecated.
This method is executed by
AbstractGoal once an environment is subject
to the One-Click-Setup lifecycle. |
public JobConsumer.JobResult process(Job job)
JobConsumer
If the job has been processed successfully, JobConsumer.JobResult.OK
should be returned.
If the job has not been processed completely, but might be rescheduled JobConsumer.JobResult.FAILED
should be returned.
If the job processing failed and should not be rescheduled, JobConsumer.JobResult.CANCEL
should
be returned.
If the consumer decides to process the job asynchronously it should return JobConsumer.JobResult.ASYNC
and notify the job manager by using the JobConsumer.AsyncHandler
interface.
If the processing fails with throwing an exception/throwable, the process will not be rescheduled
and treated like the method would have returned JobConsumer.JobResult.CANCEL
.
process
in interface JobConsumer
job
- The jobpublic abstract void run(Job job, Environment environment, ResourceResolver resolver) throws OCSException
Goal
AbstractGoal
once an environment is subject
to the One-Click-Setup lifecycle.run
in interface Goal
job
- The Job
that represents the lifecycle.environment
- The Environment
which is the payload of the lifecycle.resolver
- The ResourceResolver
with which to access the repository.OCSException
- when the goal encounters an error condition."Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"