net.sourceforge.stripes.controller
Enum LifecycleStage

java.lang.Object
  extended by java.lang.Enum<LifecycleStage>
      extended by net.sourceforge.stripes.controller.LifecycleStage
All Implemented Interfaces:
Serializable, Comparable<LifecycleStage>

public enum LifecycleStage
extends Enum<LifecycleStage>

Describes the major stages that form the Stripes request processing lifecycle. These stages are enumerated here primarily because they are the points around which execution can be intercepted using the Stripes Interceptor system.

Since:
Stripes 1.3
Author:
Tim Fennell

Enum Constant Summary
ActionBeanResolution
          First major lifecycle stage.
BindingAndValidation
          Third major lifecycle stage.
CustomValidation
          Fourth major lifecycle stage.
EventHandling
          Fifth major lifecycle stage.
HandlerResolution
          Second major lifecycle stage.
RequestComplete
          Final lifecycle stage.
RequestInit
          Executed before any processing occurs on the request.
ResolutionExecution
          Sixth major lifecycle stage.
 
Method Summary
static LifecycleStage valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LifecycleStage[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ActionBeanResolution

public static final LifecycleStage ActionBeanResolution
First major lifecycle stage. Involves the location of the ActionBean class that is bound to the URL being requested, and usually also the creation of a new instance of that class.


HandlerResolution

public static final LifecycleStage HandlerResolution
Second major lifecycle stage. Involves the determination of the event name in the request (if there is one), and the location of the Method which handles the even.


BindingAndValidation

public static final LifecycleStage BindingAndValidation
Third major lifecycle stage. Involves the processing of all validations specified through @Validate annotations as well as the type conversion of request parameters and their binding to the ActionBean.


CustomValidation

public static final LifecycleStage CustomValidation
Fourth major lifecycle stage. Involves the execution of any custom validation logic exposed by the ActionBean.


EventHandling

public static final LifecycleStage EventHandling
Fifth major lifecycle stage. The actual execution of the event handler method. Only occurs when the prior stages have produced no persistent validation errors.


ResolutionExecution

public static final LifecycleStage ResolutionExecution
Sixth major lifecycle stage. Is executed any time a Resolution is executed, either as the outcome of an event handler, or because some other mechanism short circuits processing by returning a Resolution.


RequestInit

public static final LifecycleStage RequestInit
Executed before any processing occurs on the request. No Stripes processing is associated with this stage. It is simply provided as a hook for interceptors.


RequestComplete

public static final LifecycleStage RequestComplete
Final lifecycle stage. Executes in the finally block of the request so it will always be called when a request terminates regardless of any other conditions. This is only useful for cleaning up because Resolution execution has already occurred.

Method Detail

values

public static LifecycleStage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (LifecycleStage c : LifecycleStage.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LifecycleStage valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


© Copyright 2005-2006, Stripes Development Team.