public class SingletonStateMachine extends AbstractStateMachine implements StateMachine
states and operations.
Please note: The singleton resource must be created outside the scope of this state machine. Once created the Form.Operation.VIEW operation is used to view the resource.
(0)----view()----+ +--------+
| | |
+---------remove()---------+ | | clear()
| | | | reset()
| +--+---v---+--+ |
| | <-----+
| +-----view()----> READONLY |
| | | <-----+------+
+--v-------+--+ +--+-------^--+ | |
| | | | | |
| EMPTY | edit() cancel() save() |
| | | | | |
+-------------+ +--v-------+--+ | |
| | | |
| EDITING +-----+ clear()
| | |
+------+------+ |
| |
+-------------------+
(0) Initial states| Constructor and Description |
|---|
SingletonStateMachine() |
SingletonStateMachine(EnumSet<Form.Operation> operations) |
| Modifier and Type | Method and Description |
|---|---|
protected Form.State |
initial() |
protected String |
name() |
protected <C> void |
safeExecute(Form.Operation operation,
C context)
The context is used for the
Form.Operation.VIEW operation. |
current, execute, reset, supports, supportspublic SingletonStateMachine()
public SingletonStateMachine(EnumSet<Form.Operation> operations)
protected Form.State initial()
initial in class AbstractStateMachineprotected <C> void safeExecute(Form.Operation operation, C context)
Form.Operation.VIEW operation. It's expected to be the next state.safeExecute in class AbstractStateMachineprotected String name()
name in class AbstractStateMachineCopyright © 2018 JBoss, a division of Red Hat. All rights reserved.