|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<JobStatus> dk.netarkivet.harvester.datamodel.JobStatus
public enum JobStatus
Enumeration of the possible states (alt.: status) a Job can be in.
Enum Constant Summary | |
---|---|
DONE
Job status done is used for a job that a harvester has successfully finished. |
|
FAILED
Job status failed is used for a job that has failed to execute correctly. |
|
FAILED_REJECTED
Job status for a job which has failed and which has been rejected for resubmission. |
|
NEW
Job status new is used for a job that has been created but not yet sent to a JMS queue. |
|
RESUBMITTED
Job status resubmitted is used for a job that had failed and a new job with this jobs data has been submitted. |
|
STARTED
Job status started is used for a job that a harvester has started. |
|
SUBMITTED
Job status submitted is used for a job that has been sent to a JMS queue, but not yet picked up by a harvester. |
Field Summary | |
---|---|
static int |
ALL_STATUS_CODE
Constant representing ALL states. |
static java.lang.String |
JOBSTATUS_DONE_KEY
Localization key for the DONE JobStatus. |
static java.lang.String |
JOBSTATUS_FAILED_KEY
Localization key for the FAILED JobStatus. |
static java.lang.String |
JOBSTATUS_FAILED_REJECTED_KEY
Localization key for a JobStatus FAILED_REJECTED |
static java.lang.String |
JOBSTATUS_NEW_KEY
Localization key for the NEW JobStatus. |
static java.lang.String |
JOBSTATUS_RESUBMITTED_KEY
Localization key for the RESUBMITTED JobStatus. |
static java.lang.String |
JOBSTATUS_STARTED_KEY
Localization key for the STARTED JobStatus. |
static java.lang.String |
JOBSTATUS_SUBMITTED_KEY
Localization key for the SUBMITTED JobStatus. |
static java.lang.String |
JOBSTATUS_UNKNOWN_KEY
Localization key for a unknown JobStatus. |
Method Summary | |
---|---|
static JobStatus |
fromOrdinal(int status)
Helper method that gives a proper object from e.g. |
java.lang.String |
getLocalizedString(java.util.Locale l)
Return a localized human-readable string describing this status. |
boolean |
legalChange(JobStatus newStatus)
True if it is legal to change from this status to a new status. |
static JobStatus |
parse(java.lang.String status)
Helper method that gives a proper object from e.g. |
static JobStatus |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static JobStatus[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final JobStatus NEW
public static final JobStatus SUBMITTED
public static final JobStatus STARTED
public static final JobStatus DONE
public static final JobStatus FAILED
public static final JobStatus RESUBMITTED
public static final JobStatus FAILED_REJECTED
Field Detail |
---|
public static final int ALL_STATUS_CODE
public static java.lang.String JOBSTATUS_NEW_KEY
public static java.lang.String JOBSTATUS_SUBMITTED_KEY
public static java.lang.String JOBSTATUS_STARTED_KEY
public static java.lang.String JOBSTATUS_DONE_KEY
public static java.lang.String JOBSTATUS_FAILED_KEY
public static java.lang.String JOBSTATUS_RESUBMITTED_KEY
public static java.lang.String JOBSTATUS_UNKNOWN_KEY
public static java.lang.String JOBSTATUS_FAILED_REJECTED_KEY
Method Detail |
---|
public static JobStatus[] values()
for (JobStatus c : JobStatus.values()) System.out.println(c);
public static JobStatus valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic static JobStatus fromOrdinal(int status)
status
- a certain integer
ArgumentNotValid
public static JobStatus parse(java.lang.String status)
status
- a status string
ArgumentNotValid
public java.lang.String getLocalizedString(java.util.Locale l)
l
- The locale
ArgumentNotValid
- on null locale.public boolean legalChange(JobStatus newStatus)
newStatus
- a new JobStatus
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |