|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NinjaProperties
Field Summary | |
---|---|
static String |
CONF_FILE_LOCATION_BY_CONVENTION
The default configuration. |
static String |
NINJA_EXTERNAL_CONF
Often you may want to use a seperate configuration file. |
Method Summary | |
---|---|
String |
get(String key)
Get a String property or null if it is not there... |
Properties |
getAllCurrentNinjaProperties()
|
Boolean |
getBoolean(String key)
|
Boolean |
getBooleanOrDie(String key)
The "die" method forces this key to be set. |
Boolean |
getBooleanWithDefault(String key,
Boolean defaultValue)
Get a Boolean property or a default value when property cannot be found in any configuration file. |
Integer |
getInteger(String key)
Get a property as Integer of null if not there / or property no integer |
Integer |
getIntegerOrDie(String key)
The "die" method forces this key to be set. |
Integer |
getIntegerWithDefault(String key,
Integer defaultValue)
Get a Integer property or a default value when property cannot be found in any configuration file. |
String |
getOrDie(String key)
The "die" method forces this key to be set. |
String[] |
getStringArray(String key)
eg. |
String |
getWithDefault(String key,
String defaultValue)
Get a String property or a default value when property cannot be found in any configuration file. |
boolean |
isDev()
Whether we are in dev mode |
boolean |
isProd()
Whether we are in prod mode |
boolean |
isTest()
Whether we are in test mode |
Field Detail |
---|
static final String NINJA_EXTERNAL_CONF
static final String CONF_FILE_LOCATION_BY_CONVENTION
Method Detail |
---|
String get(String key)
key
-
String getWithDefault(String key, String defaultValue)
key
- the key used in the configuration file.defaultValue
- Default value returned, when value cannot be found in configuration.
Integer getInteger(String key)
key
-
Integer getIntegerWithDefault(String key, Integer defaultValue)
key
- the key used in the configuration file.defaultValue
- Default value returned, when value cannot be found in configuration.
Boolean getBoolean(String key)
key
-
Boolean getBooleanWithDefault(String key, Boolean defaultValue)
key
- the key used in the configuration file.defaultValue
- Default value returned, when value cannot be found in configuration.
Boolean getBooleanOrDie(String key)
key
-
Integer getIntegerOrDie(String key)
key
-
String getOrDie(String key)
key
-
String[] getStringArray(String key)
boolean isDev()
boolean isTest()
boolean isProd()
Properties getAllCurrentNinjaProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |