|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.avaje.ebean.config.GlobalProperties
public final class GlobalProperties
Provides access to properties loaded from the ebean.properties file.
Constructor Summary | |
---|---|
GlobalProperties()
|
Method Summary | |
---|---|
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 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 defaultValue)
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 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 defaultValue)
public static void putAll(Map<String,String> keyValueMap)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |