SalesPoint v3.3 API

sale
Class GateChangeTransition

java.lang.Object
  extended by sale.GateChangeTransition
All Implemented Interfaces:
Serializable, Transition

public class GateChangeTransition
extends Object
implements Transition

Convenience implementation of a Transition that simply changes to another gate. Additionally, some other useful Transitions are provided.

Since:
v2.0
Author:
Steffen Zschaler
See Also:
Transition, Gate, Serialized Form

Field Summary
static Transition CHANGE_TO_COMMIT_GATE
          Transition that will go to the calling process' commit gate.
static Transition CHANGE_TO_LOG_GATE
          Transition that will go to the calling process' log gate.
static Transition CHANGE_TO_QUIT_GATE
          Transition that will go to the calling process' quit gate.
static Transition CHANGE_TO_ROLLBACK_GATE
          Transition that will go to the calling process' rollback gate.
static Transition CHANGE_TO_STOP_GATE
          Transition that will go to the calling process' stop gate.
protected  Gate m_gTarget
          The target gate.
 
Constructor Summary
GateChangeTransition(Gate gTarget)
          Create a new GateChangeTransition.
 
Method Summary
 Gate perform(SaleProcess p, User u)
          Perform the Transition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_gTarget

protected Gate m_gTarget
The target gate.


CHANGE_TO_ROLLBACK_GATE

public static final Transition CHANGE_TO_ROLLBACK_GATE
Transition that will go to the calling process' rollback gate.


CHANGE_TO_COMMIT_GATE

public static final Transition CHANGE_TO_COMMIT_GATE
Transition that will go to the calling process' commit gate.


CHANGE_TO_QUIT_GATE

public static final Transition CHANGE_TO_QUIT_GATE
Transition that will go to the calling process' quit gate.


CHANGE_TO_STOP_GATE

public static final Transition CHANGE_TO_STOP_GATE
Transition that will go to the calling process' stop gate.


CHANGE_TO_LOG_GATE

public static final Transition CHANGE_TO_LOG_GATE
Transition that will go to the calling process' log gate.

Constructor Detail

GateChangeTransition

public GateChangeTransition(Gate gTarget)
Create a new GateChangeTransition.

Parameters:
gTarget - the Gate to change to.
Method Detail

perform

public final Gate perform(SaleProcess p,
                          User u)
Perform the Transition. I.e. go to the gate indicated on creation.

Specified by:
perform in interface Transition
Parameters:
p - the process that triggered the Transition
u - the user currently active in the process' ProcessContext
Returns:
the gate to enter after this transition has completed. null is a valid value, causing the calling process to stop.
Override:
Never

SalesPoint v3.3 API