|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Environment>
grails.util.Environment
public enum Environment
An enum that represents the current environment
Enum Constant Summary | |
---|---|
APPLICATION
|
|
CUSTOM
|
|
DEVELOPMENT
|
|
PRODUCTION
|
|
TEST
|
Field Summary | |
---|---|
static String |
DEFAULT
Constants that indicates whether this GrailsApplication is running in the default environment |
static String |
KEY
Constant used to resolve the environment via System.getProperty(Environment.KEY) |
Method Summary | |
---|---|
static Environment |
getCurrent()
Returns the current environment which is typcally either DEVELOPMENT, PRODUCTION or TEST. |
static Environment |
getCurrentEnvironment()
|
static Environment |
getEnvironment(String shortName)
Returns the environment for the given short name |
String |
getName()
|
static boolean |
isSystemSet()
|
void |
setName(String name)
|
static Environment |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Environment[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Environment DEVELOPMENT
public static final Environment PRODUCTION
public static final Environment TEST
public static final Environment APPLICATION
public static final Environment CUSTOM
Field Detail |
---|
public static String KEY
public static final String DEFAULT
Method Detail |
---|
public static final Environment[] values()
for(Environment c : Environment.values()) System.out.println(c);
public static Environment valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified namepublic static Environment getCurrent()
public static Environment getCurrentEnvironment()
getCurrent()
public static boolean isSystemSet()
public static Environment getEnvironment(String shortName)
shortName
- The short name
public String getName()
public void setName(String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |