[ 
https://issues.apache.org/jira/browse/SLING-3169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13794967#comment-13794967
 ] 

Carsten Ziegeler commented on SLING-3169:
-----------------------------------------

[[email protected]] I'Ve committed my above mentioned changes and we now 
have a single JobState enumeration with the four values (QUEUED, ACTIVE, 
SUCCEEDED, CANCELLED). Before discussing the FAILED state, let's see if the 
current solution is better than the previous one:
I've added a JobExecutionResult interface (which is the result of job 
processing from a job executor) - to avoid the problem that e.g. QUEUED or 
ACTIVE is returned as the state I've added methods to the JobExecutionContext 
to create the result object, either it's the simple "constant" result or by 
using the builder pattern, its possible to add more information. This way, 
client code newer has to explicitely use the enumeration.
Once we are clear about JobState we might want to use that instead of the isXYZ 
methods in JobExecutionResult
WDYT?

> Naming of Job related enumerations
> ----------------------------------
>
>                 Key: SLING-3169
>                 URL: https://issues.apache.org/jira/browse/SLING-3169
>             Project: Sling
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: Extensions Event 3.3.0
>
>
> This is a follow up from SLING-3028 based on comments by Stefan Seifert:
>     I find the enum name Job.JobType not ideal, because it does not stand of 
> a type but for a state of the job. But there is a JobState enum in the 
> consumer API package already.
>     I find the enum and class names JobState and JobStatus in the consumer 
> package not ideal, because they do not stand for a state, but for a job 
> result.
>   



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to