public interface NinjaProperties
| Modifier and Type | Field and Description | 
|---|---|
static String | 
CONF_FILE_LOCATION_BY_CONVENTION
The default configuration. 
 | 
static String | 
NINJA_EXTERNAL_CONF
Often you may want to use a separate configuration file. 
 | 
static String | 
NINJA_EXTERNAL_RELOAD
The System property used to enable hot-reloading of the external
 configuration file at runtime. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
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. 
 | 
String | 
getContextPath()
Returns context under which the application is currently running. 
 | 
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 
 | 
void | 
setContextPath(String contextPath)  | 
static final String NINJA_EXTERNAL_CONF
static final String NINJA_EXTERNAL_RELOAD
static final String CONF_FILE_LOCATION_BY_CONVENTION
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()
String getContextPath()
void setContextPath(String contextPath)
Properties getAllCurrentNinjaProperties()
Copyright © 2019 ninjaframework. All rights reserved.