Package google.registry.util
Enum Class RegistryEnvironment
- All Implemented Interfaces:
Serializable
,Comparable<RegistryEnvironment>
,Constable
Registry environments.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RegistryEnvironment
get()
Returns environment configured by system property "google.registry.environment".static boolean
static boolean
static void
setIsInTestDriver
(boolean value) setup()
Sets this enum as the name of the registry environment.setup
(SystemPropertySetter systemPropertySetter) Sets this enum as the name of the registry environment using specifiedSystemPropertySetter
.static RegistryEnvironment
Returns the enum constant of this class with the specified name.static RegistryEnvironment[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRODUCTION
Production environment. -
ALPHA
Development environment. -
CRASH
Load/Backup/Restore Testing environment. -
LOCAL
Local machine environment. -
QA
Quality Assurance environment. -
SANDBOX
Sandbox environment. -
UNITTEST
Unit testing environment.This is the default enum value. This is because it's non-trivial to configure the system property that specifies the environment in our unit tests.
Do not use this environment outside of unit tests.
-
-
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
-
setup
Sets this enum as the name of the registry environment. -
setup
Sets this enum as the name of the registry environment using specifiedSystemPropertySetter
. -
get
Returns environment configured by system property "google.registry.environment". -
isOnJetty
public static boolean isOnJetty() -
setIsInTestDriver
public static void setIsInTestDriver(boolean value) -
isInTestServer
public static boolean isInTestServer()
-