public final class GlobalProperties extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GlobalProperties.DelegatedGlobalPropertySource |
static interface |
GlobalProperties.PropertySource |
| Constructor and Description |
|---|
GlobalProperties() |
| Modifier and Type | Method and Description |
|---|---|
static void |
evaluateExpressions()
Parse and evaluate any expressions that have not already been evaluated.
|
static String |
evaluateExpressions(String val)
Parse the string replacing any expressions like ${catalina.base}.
|
static String |
get(String key,
String defaultValue)
Return a String property with a default value.
|
static boolean |
getBoolean(String key,
boolean defaultValue)
Return a boolean property with a default value.
|
static int |
getInt(String key,
int defaultValue)
Return a int property with a default value.
|
static GlobalProperties.PropertySource |
getPropertySource(String name) |
static javax.servlet.ServletContext |
getServletContext()
Return the ServletContext (if setup in a servlet container environment).
|
static boolean |
isSkipPrimaryServer()
Return true to skip automatically creating the primary server.
|
static String |
put(String key,
String value)
Set a property return the previous value.
|
static void |
putAll(Map<String,String> keyValueMap)
Set a Map of key value properties.
|
static void |
setServletContext(javax.servlet.ServletContext servletContext)
In a servlet container environment this will additionally look in WEB-INF
for the ebean.properties file.
|
static void |
setSkipPrimaryServer(boolean skip)
Set whether to skip automatically creating the primary server.
|
public static void setSkipPrimaryServer(boolean skip)
public static boolean isSkipPrimaryServer()
public static String evaluateExpressions(String val)
This will evaluate expressions using first environment variables, than java system variables and lastly properties in ebean.properties - in that order.
Expressions start with "${" and end with "}".
public static void evaluateExpressions()
public static void setServletContext(javax.servlet.ServletContext servletContext)
public static javax.servlet.ServletContext getServletContext()
public static String get(String key, String defaultValue)
public static int getInt(String key, int defaultValue)
public static boolean getBoolean(String key, boolean defaultValue)
public static String put(String key, String value)
public static GlobalProperties.PropertySource getPropertySource(String name)
Copyright © 2014. All Rights Reserved.