@Deprecated public class DefaultEnvironmentService extends Object implements EnvironmentService
By default, an exception is thrown if a value cannot be located (unless a default value has been supplied).
By default, an exception is thrown if any placeholders cannot be resolved in any string values.
By default, environment variables are automatically checked if a normal property value cannot be found.
For example, given the key db.vendor the service will also automatically check env.DB_VENDOR
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_CHECK_ENVIRONMENT_VARIABLES
Deprecated.
|
static Mode |
DEFAULT_MISSING_PROPERTY_MODE
Deprecated.
|
static boolean |
DEFAULT_RESOLVE_STRINGS
Deprecated.
|
static String |
ENV_PREFIX
Deprecated.
|
| Constructor and Description |
|---|
DefaultEnvironmentService(org.springframework.core.env.Environment env)
Deprecated.
|
DefaultEnvironmentService(org.springframework.core.env.Environment env,
boolean checkEnvironmentVariables)
Deprecated.
|
DefaultEnvironmentService(org.springframework.core.env.Environment env,
boolean checkEnvironmentVariables,
boolean resolveStrings,
Mode missingPropertyMode)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsProperty(String key)
Deprecated.
|
Boolean |
getBoolean(String key)
Deprecated.
|
Boolean |
getBoolean(String key,
Boolean defaultValue)
Deprecated.
|
<T> Class<T> |
getClass(String key,
Class<T> type)
Deprecated.
|
<T> Class<T> |
getClass(String key,
Class<T> type,
Class<T> defaultValue)
Deprecated.
|
org.springframework.core.env.Environment |
getEnv()
Deprecated.
|
File |
getFile(String key)
Deprecated.
|
File |
getFile(String key,
File defaultValue)
Deprecated.
|
Integer |
getInteger(String key)
Deprecated.
|
Integer |
getInteger(String key,
Integer defaultValue)
Deprecated.
|
protected String |
getMissingPropertyMessage(String key)
Deprecated.
|
Mode |
getMissingPropertyMode()
Deprecated.
|
<T> T |
getProperty(EnvContext<T> context)
Deprecated.
|
<T> T |
getProperty(String key,
Class<T> type)
Deprecated.
|
<T> T |
getProperty(String key,
Class<T> type,
T provided)
Deprecated.
|
protected <T> T |
getSpringValue(String key,
Class<T> type)
Deprecated.
|
protected <T> Class<T> |
getSpringValueAsClass(String key,
Class<T> type)
Deprecated.
|
String |
getString(String key)
Deprecated.
|
String |
getString(String key,
String defaultValue)
Deprecated.
|
boolean |
isCheckEnvironmentVariables()
Deprecated.
|
boolean |
isResolveStrings()
Deprecated.
|
public static final boolean DEFAULT_CHECK_ENVIRONMENT_VARIABLES
public static final boolean DEFAULT_RESOLVE_STRINGS
public static final Mode DEFAULT_MISSING_PROPERTY_MODE
public static final String ENV_PREFIX
public DefaultEnvironmentService(org.springframework.core.env.Environment env)
public DefaultEnvironmentService(org.springframework.core.env.Environment env, boolean checkEnvironmentVariables)
public DefaultEnvironmentService(org.springframework.core.env.Environment env, boolean checkEnvironmentVariables, boolean resolveStrings, Mode missingPropertyMode)
public boolean containsProperty(String key)
containsProperty in interface EnvironmentServicepublic <T> T getProperty(EnvContext<T> context)
getProperty in interface EnvironmentServiceprotected String getMissingPropertyMessage(String key)
protected <T> T getSpringValue(String key, Class<T> type)
protected <T> Class<T> getSpringValueAsClass(String key, Class<T> type)
public <T> Class<T> getClass(String key, Class<T> type)
getClass in interface EnvironmentServicepublic <T> Class<T> getClass(String key, Class<T> type, Class<T> defaultValue)
getClass in interface EnvironmentServicepublic String getString(String key)
getString in interface EnvironmentServicepublic String getString(String key, String defaultValue)
getString in interface EnvironmentServicepublic Boolean getBoolean(String key)
getBoolean in interface EnvironmentServicepublic Boolean getBoolean(String key, Boolean defaultValue)
getBoolean in interface EnvironmentServicepublic File getFile(String key)
getFile in interface EnvironmentServicepublic File getFile(String key, File defaultValue)
getFile in interface EnvironmentServicepublic Integer getInteger(String key, Integer defaultValue)
getInteger in interface EnvironmentServicepublic Integer getInteger(String key)
getInteger in interface EnvironmentServicepublic boolean isCheckEnvironmentVariables()
public boolean isResolveStrings()
public org.springframework.core.env.Environment getEnv()
public Mode getMissingPropertyMode()
public <T> T getProperty(String key, Class<T> type, T provided)
getProperty in interface EnvironmentServicepublic <T> T getProperty(String key, Class<T> type)
getProperty in interface EnvironmentServiceCopyright © 2010–2014 The Kuali Foundation. All rights reserved.