Package com.emc.documentum.rest.config
Enum Class AppEnvironment
- All Implemented Interfaces:
Serializable
,Comparable<AppEnvironment>
,Constable
The environment of current application. This implementation is a simplified customization
to
StandardEnvironment
, where it creates a singleton
instance of the standard environment.
See StandardEnvironment
Javadoc for details on
the variable overriding between property resources and the JVM system properties.
- Since:
- 7.2.0
-
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 TypeMethodDescriptionvoid
addFirstPropertySource
(String propertySourceClasspath) Add the given property source object with the highest precedence.void
addLastPropertySource
(String propertySourceClasspath) Add the given property source object with the lowest precedence.Return the property value associated with the given key, ornull
if the key cannot be resolved.<T> T
Return the property value associated with the given key, ornull
if the key cannot be resolved.<T> T
Return the property value associated with the given key, ordefaultValue
if the key cannot be resolved.org.springframework.core.env.PropertySources
Return thePropertySources
for thisAppEnvironment
.void
removePropertySource
(String propertySourceClasspath) Remove a property source from the application environment.void
static AppEnvironment
Returns the enum constant of this class with the specified name.static AppEnvironment[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance of the environment.
-
-
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
-
get
Return the property value associated with the given key, ornull
if the key cannot be resolved.- Parameters:
key
- the property name to resolve- Returns:
- the property value
- See Also:
-
get
Return the property value associated with the given key, ornull
if the key cannot be resolved.- Type Parameters:
T
- the data type of the property value- Parameters:
key
- the property name to resolvetargetType
- the expected class of the property value- Returns:
- the property value
- See Also:
-
get
Return the property value associated with the given key, ordefaultValue
if the key cannot be resolved.- Type Parameters:
T
- the data type of the property value- Parameters:
key
- the property name to resolvetargetType
- the expected type of the property valuedefaultValue
- the default value to return if no value is found- Returns:
- the property value
- See Also:
-
resetCache
public void resetCache() -
addFirstPropertySource
Add the given property source object with the highest precedence.- Parameters:
propertySourceClasspath
- property source classpath- See Also:
-
addLastPropertySource
Add the given property source object with the lowest precedence.- Parameters:
propertySourceClasspath
- property source classpath- See Also:
-
removePropertySource
Remove a property source from the application environment.- Parameters:
propertySourceClasspath
- property source classpath
-
getPropertySources
public org.springframework.core.env.PropertySources getPropertySources()Return thePropertySources
for thisAppEnvironment
.See
ConfigurableEnvironment.getPropertySources()
Javadoc for details.- Returns:
- property sources of this environment
-