|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.almende.eve.config.Config
public class Config
Constructor Summary | |
---|---|
Config()
|
|
Config(InputStream inputStream)
Load the configuration file from input stream |
|
Config(Map<String,Object> config)
Load the configuration from a map |
|
Config(String filename)
Load the configuration file by filename (absolute path) Default filename is /WEB-INF/eve.yaml |
Method Summary | ||
---|---|---|
Map<String,Object> |
get()
Get the full configuration returns null if no configuration file is loaded |
|
|
get(String... params)
retrieve a (nested) parameter from the config the parameter name can be a simple name like config.get("url"), or nested parameter like config.get("servlet", "config", "url") null is returned when the parameter is not found, or when no configuration file is loaded. |
|
void |
load(InputStream inputStream)
Load the configuration file from input stream |
|
void |
load(String filename)
Load the configuration file by filename (absolute path) Default filename is /WEB-INF/eve.yaml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Config()
public Config(String filename) throws FileNotFoundException
filename
-
FileNotFoundException
public Config(InputStream inputStream)
filename
-
FileNotFoundException
public Config(Map<String,Object> config)
map
- Method Detail |
---|
public void load(String filename) throws FileNotFoundException
filename
-
FileNotFoundException
public void load(InputStream inputStream)
filename
-
FileNotFoundException
public Map<String,Object> get()
public <T> T get(String... params)
params
- One or multiple (nested) parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |