Package ch.tocco.nice2.boot.api
Enum Class RunEnv
- All Implemented Interfaces:
Serializable
,Comparable<RunEnv>
,Constable
The run environment like DEVELOPMENT or PRODUCTION for the system.
Code and configuration may perform differently based on this, for example log an error or not.
Maybe more env's will be added in the future. Examples are:
- STAGING (like a live installation, the stage before going live)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe system runs in development mode on the developer's machine.The system runs in production mode.The system runs in test mode.A mode with reduced services to allow multiple instances on the same database. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isLive()
Tells if the environment should behave as if it was "live".static RunEnv
Returns the enum constant of this class with the specified name.static RunEnv[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEVELOPMENT
The system runs in development mode on the developer's machine. -
TEST
The system runs in test mode. -
UPDATE
A mode with reduced services to allow multiple instances on the same database. The idea is, that only one application with mode "development"/"production" is running and others then use this mode. -
PRODUCTION
The system runs in production mode.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
isLive
public boolean isLive()Tells if the environment should behave as if it was "live". This is true for PRODUCTION, but not for DEVELOPMENT (and test, staging, etc).
-