org.salespointframework.core
Class SaleProcess.PrintErrorGate

java.lang.Object
  extended by org.salespointframework.core.SaleProcess.PrintErrorGate
All Implemented Interfaces:
Gate
Enclosing class:
SaleProcess

private class SaleProcess.PrintErrorGate
extends java.lang.Object
implements Gate

The gate that is responsible for printing error messages.


Field Summary
private  int m_nCode
           
private  int m_nErrNesting
           
private  java.lang.Object m_oInfo
           
 
Constructor Summary
SaleProcess.PrintErrorGate(int nErrorNesting)
           
 
Method Summary
 Transition getNextTransition(SaleProcess p, User u, boolean stay)
          Determine the next Transition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_nCode

private int m_nCode

m_oInfo

private java.lang.Object m_oInfo

m_nErrNesting

private int m_nErrNesting
Constructor Detail

SaleProcess.PrintErrorGate

public SaleProcess.PrintErrorGate(int nErrorNesting)
Method Detail

getNextTransition

public Transition getNextTransition(SaleProcess p,
                                    User u,
                                    boolean stay)
Description copied from interface: Gate
Determine the next Transition.

This is the key (and sole) method of the gate. By entering this method, the calling process enters the gate. This method must do anything that is necessary to determine the next transition and must then return this transition. It is invalid, to return a null transition, except in the special cases noted below.

The method must be interruptible by calls to Thread.interrupt() on the executing thread and it must propagate these interrupts as a InterruptedException. In this case it is obviously no problem, if the method returns a null transition.

Also, if any other exception causes the method to be left, or in the case of an explicit call to the process' SaleProcess.error(int) method, the result may be null.

Specified by:
getNextTransition in interface Gate
Parameters:
p - the process that entered the gate and triggered the method.
u - the user currently active in the process' ProcessContext
Returns:
the Transition to be performed after leaving the gate.