|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.avaje.ebean.config.GlobalProperties
public final class GlobalProperties
Provides access to properties loaded from the ebean.properties file.
| Nested Class Summary | |
|---|---|
static interface |
GlobalProperties.PropertySource
|
| Constructor Summary | |
|---|---|
GlobalProperties()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GlobalProperties()
| Method Detail |
|---|
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 void putAll(Map<String,String> keyValueMap)
public static GlobalProperties.PropertySource getPropertySource(String name)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||