public enum ProcessState extends Enum<ProcessState>
Enum Constant and Description |
---|
COMPLETED
Represent the current completed state Throws StateNotAllowedException for all
|
PAUSE
Represent the current pause state Accept all Pause => do nothing Resume => change the state to running then run
all steps at the end change step to completed Next => Change the state to running then run the next step only.
|
RUNNING
Represent the current running state Accept Pause and cancel Pause => continue execution of current step (only for
step by step) then change state to : - pause if not last step - completed Cancel => continue execution of current
process (step or all steps) then change state to complete Throws StateNotAllowedException for other
|
Modifier and Type | Method and Description |
---|---|
void |
eval(ProcessState processState)
Evaluate for the current state if the given state is permitted or not
|
javax.ws.rs.core.Response.Status |
getEquivalentHttpStatus()
get equivalent http status
|
static ProcessState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ProcessState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ProcessState PAUSE
public static final ProcessState RUNNING
public static final ProcessState COMPLETED
public static ProcessState[] values()
for (ProcessState c : ProcessState.values()) System.out.println(c);
public static ProcessState 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 void eval(ProcessState processState) throws StateNotAllowedException
StateNotAllowedException
public javax.ws.rs.core.Response.Status getEquivalentHttpStatus()
Copyright © 2018 Vitam. All rights reserved.