public enum JobStatus extends Enum<JobStatus>
Enum Constant and Description |
---|
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.
|
Modifier and Type | Field and Description |
---|---|
static int |
ALL_STATUS_CODE
Constant representing ALL states.
|
static String |
JOBSTATUS_DONE_KEY
Localization key for the DONE JobStatus.
|
static String |
JOBSTATUS_FAILED_KEY
Localization key for the FAILED JobStatus.
|
static String |
JOBSTATUS_FAILED_REJECTED_KEY
Localization key for a JobStatus FAILED_REJECTED.
|
static String |
JOBSTATUS_NEW_KEY
Localization key for the NEW JobStatus.
|
static String |
JOBSTATUS_RESUBMITTED_KEY
Localization key for the RESUBMITTED JobStatus.
|
static String |
JOBSTATUS_STARTED_KEY
Localization key for the STARTED JobStatus.
|
static String |
JOBSTATUS_SUBMITTED_KEY
Localization key for the SUBMITTED JobStatus.
|
static String |
JOBSTATUS_UNKNOWN_KEY
Localization key for a unknown JobStatus.
|
Modifier and Type | Method and Description |
---|---|
static JobStatus |
fromOrdinal(int status)
Helper method that gives a proper object from e.g.
|
String |
getLocalizedString(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(String status)
Helper method that gives a proper object from e.g.
|
static JobStatus |
valueOf(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.
|
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
public static final int ALL_STATUS_CODE
public static String JOBSTATUS_NEW_KEY
public static String JOBSTATUS_SUBMITTED_KEY
public static String JOBSTATUS_STARTED_KEY
public static String JOBSTATUS_DONE_KEY
public static String JOBSTATUS_FAILED_KEY
public static String JOBSTATUS_RESUBMITTED_KEY
public static String JOBSTATUS_UNKNOWN_KEY
public static String JOBSTATUS_FAILED_REJECTED_KEY
public static JobStatus[] values()
for (JobStatus c : JobStatus.values()) System.out.println(c);
public static JobStatus valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static JobStatus fromOrdinal(int status)
status
- a certain integerArgumentNotValid
public static JobStatus parse(String status)
status
- a status stringArgumentNotValid
public String getLocalizedString(Locale l)
Strings are read from the harvester translation bundle found in Translation.properties in this module.
l
- The localeArgumentNotValid
- on null locale.public boolean legalChange(JobStatus newStatus)
newStatus
- a new JobStatusCopyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.