Spring Web Flow

org.springframework.webflow.mvc.builder
Enum MvcEnvironment

java.lang.Object
  extended by java.lang.Enum<MvcEnvironment>
      extended by org.springframework.webflow.mvc.builder.MvcEnvironment
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MvcEnvironment>

public enum MvcEnvironment
extends java.lang.Enum<MvcEnvironment>

Supported Spring Web MVC environments.

Author:
Keith Donald

Enum Constant Summary
PORTLET
          Spring Web Portlet MVC.
SERVLET
          Spring Web Servlet MVC.
 
Method Summary
static MvcEnvironment environmentFor(org.springframework.context.ApplicationContext applicationContext)
          Calculates the web environment from the state of the provided application context.
static MvcEnvironment valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MvcEnvironment[] 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

SERVLET

public static final MvcEnvironment SERVLET
Spring Web Servlet MVC.


PORTLET

public static final MvcEnvironment PORTLET
Spring Web Portlet MVC.

Method Detail

values

public static MvcEnvironment[] 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 (MvcEnvironment c : MvcEnvironment.values())
    System.out.println(c);

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

valueOf

public static MvcEnvironment valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

environmentFor

public static MvcEnvironment environmentFor(org.springframework.context.ApplicationContext applicationContext)
Calculates the web environment from the state of the provided application context.

Parameters:
applicationContext - the application context
Returns:
the web environment the context is running in, or null if not running in a web environment

Spring Web Flow