Package com.appslandia.plum.base
Class AppConfig
- java.lang.Object
-
- com.appslandia.common.base.InitializeObject
-
- com.appslandia.plum.base.AppConfig
-
- All Implemented Interfaces:
com.appslandia.common.base.Config,com.appslandia.common.base.InitializeSupport
public class AppConfig extends com.appslandia.common.base.InitializeObject implements com.appslandia.common.base.Config- Author:
- Loc Ha
-
-
Field Summary
Fields Modifier and Type Field Description protected com.appslandia.common.base.ConfigMapconfigstatic StringCONFIG_CONTENT_LANGstatic StringCONFIG_ENABLE_ASYNCstatic StringCONFIG_ENABLE_AUTHORIZEstatic StringCONFIG_ENABLE_CORSstatic StringCONFIG_ENABLE_DEBUGstatic StringCONFIG_ENABLE_GZIPstatic StringCONFIG_ENABLE_HTTPSstatic StringCONFIG_ENABLE_JSON_ERRORstatic StringCONFIG_ENABLE_SESSIONstatic StringCONFIG_HEADER_POLICIESstatic StringCONFIG_HTTP_PORTstatic StringCONFIG_HTTPS_PORTstatic StringCONFIG_HTTPS_REDIRECT_PERMANENTLYstatic StringCONFIG_MODULE_NAMEstatic StringCONFIG_PATH_LANGstatic StringCONFIG_PREF_LANGstatic StringCONFIG_REAUTH_TIMEOUT_MSstatic StringCONFIG_REMME_COOKIE_AGEstatic StringCONFIG_REMME_COOKIE_HTTPONLYstatic StringCONFIG_REMME_COOKIE_NAMEstatic StringCONFIG_REMME_COOKIE_SECUREstatic StringCONFIG_REMME_COOKIE_SLIDINGstatic StringCONFIG_RESOURCE_NAMESstatic StringCONFIG_VIEW_PATH
-
Method Summary
-
-
-
Field Detail
-
CONFIG_MODULE_NAME
public static final String CONFIG_MODULE_NAME
- See Also:
- Constant Field Values
-
CONFIG_HTTP_PORT
public static final String CONFIG_HTTP_PORT
- See Also:
- Constant Field Values
-
CONFIG_HTTPS_PORT
public static final String CONFIG_HTTPS_PORT
- See Also:
- Constant Field Values
-
CONFIG_HTTPS_REDIRECT_PERMANENTLY
public static final String CONFIG_HTTPS_REDIRECT_PERMANENTLY
- See Also:
- Constant Field Values
-
CONFIG_ENABLE_SESSION
public static final String CONFIG_ENABLE_SESSION
- See Also:
- Constant Field Values
-
CONFIG_ENABLE_DEBUG
public static final String CONFIG_ENABLE_DEBUG
- See Also:
- Constant Field Values
-
CONFIG_RESOURCE_NAMES
public static final String CONFIG_RESOURCE_NAMES
- See Also:
- Constant Field Values
-
CONFIG_HEADER_POLICIES
public static final String CONFIG_HEADER_POLICIES
- See Also:
- Constant Field Values
-
CONFIG_ENABLE_GZIP
public static final String CONFIG_ENABLE_GZIP
- See Also:
- Constant Field Values
-
CONFIG_ENABLE_CORS
public static final String CONFIG_ENABLE_CORS
- See Also:
- Constant Field Values
-
CONFIG_CONTENT_LANG
public static final String CONFIG_CONTENT_LANG
- See Also:
- Constant Field Values
-
CONFIG_ENABLE_HTTPS
public static final String CONFIG_ENABLE_HTTPS
- See Also:
- Constant Field Values
-
CONFIG_ENABLE_ASYNC
public static final String CONFIG_ENABLE_ASYNC
- See Also:
- Constant Field Values
-
CONFIG_ENABLE_AUTHORIZE
public static final String CONFIG_ENABLE_AUTHORIZE
- See Also:
- Constant Field Values
-
CONFIG_ENABLE_JSON_ERROR
public static final String CONFIG_ENABLE_JSON_ERROR
- See Also:
- Constant Field Values
-
CONFIG_REMME_COOKIE_NAME
public static final String CONFIG_REMME_COOKIE_NAME
- See Also:
- Constant Field Values
-
CONFIG_REMME_COOKIE_AGE
public static final String CONFIG_REMME_COOKIE_AGE
- See Also:
- Constant Field Values
-
CONFIG_REMME_COOKIE_SECURE
public static final String CONFIG_REMME_COOKIE_SECURE
- See Also:
- Constant Field Values
-
CONFIG_REMME_COOKIE_HTTPONLY
public static final String CONFIG_REMME_COOKIE_HTTPONLY
- See Also:
- Constant Field Values
-
CONFIG_REMME_COOKIE_SLIDING
public static final String CONFIG_REMME_COOKIE_SLIDING
- See Also:
- Constant Field Values
-
CONFIG_PATH_LANG
public static final String CONFIG_PATH_LANG
- See Also:
- Constant Field Values
-
CONFIG_PREF_LANG
public static final String CONFIG_PREF_LANG
- See Also:
- Constant Field Values
-
CONFIG_VIEW_PATH
public static final String CONFIG_VIEW_PATH
- See Also:
- Constant Field Values
-
CONFIG_REAUTH_TIMEOUT_MS
public static final String CONFIG_REAUTH_TIMEOUT_MS
- See Also:
- Constant Field Values
-
config
protected com.appslandia.common.base.ConfigMap config
-
-
Method Detail
-
init
protected void init() throws Exception- Specified by:
initin classcom.appslandia.common.base.InitializeObject- Throws:
Exception
-
getModule
public String getModule()
-
getHttpPort
public int getHttpPort()
-
getHttpsPort
public int getHttpsPort()
-
isEnableHttps
public boolean isEnableHttps()
-
isEnableSession
public boolean isEnableSession()
-
isEnableDebug
public boolean isEnableDebug()
-
isEnableJsonError
public boolean isEnableJsonError()
-
isPathLang
public boolean isPathLang()
-
isPrefLang
public boolean isPrefLang()
-
getViewPath
public String getViewPath()
-
getReauthTimeoutMs
public long getReauthTimeoutMs()
-
getViewPathBase
public StringBuilder getViewPathBase()
-
getString
public String getString(String key)
- Specified by:
getStringin interfacecom.appslandia.common.base.Config
-
getString
public String getString(String key, String defaultValue)
- Specified by:
getStringin interfacecom.appslandia.common.base.Config
-
getRequiredString
public String getRequiredString(String key) throws IllegalStateException
- Specified by:
getRequiredStringin interfacecom.appslandia.common.base.Config- Throws:
IllegalStateException
-
getStringArray
public String[] getStringArray(String key)
- Specified by:
getStringArrayin interfacecom.appslandia.common.base.Config
-
getFormatted
public String getFormatted(String key)
- Specified by:
getFormattedin interfacecom.appslandia.common.base.Config
-
getRequiredFormatted
public String getRequiredFormatted(String key) throws IllegalStateException
- Specified by:
getRequiredFormattedin interfacecom.appslandia.common.base.Config- Throws:
IllegalStateException
-
getFormatted
public String getFormatted(String key, Map<String,Object> parameters)
- Specified by:
getFormattedin interfacecom.appslandia.common.base.Config
-
getRequiredFormatted
public String getRequiredFormatted(String key, Map<String,Object> parameters) throws IllegalStateException
- Specified by:
getRequiredFormattedin interfacecom.appslandia.common.base.Config- Throws:
IllegalStateException
-
getFormatted
public String getFormatted(String key, Object... parameters)
- Specified by:
getFormattedin interfacecom.appslandia.common.base.Config
-
getRequiredFormatted
public String getRequiredFormatted(String key, Object... parameters) throws IllegalStateException
- Specified by:
getRequiredFormattedin interfacecom.appslandia.common.base.Config- Throws:
IllegalStateException
-
getBool
public boolean getBool(String key, boolean defaultValue)
- Specified by:
getBoolin interfacecom.appslandia.common.base.Config
-
getRequiredBool
public boolean getRequiredBool(String key) throws IllegalStateException, com.appslandia.common.base.BoolFormatException
- Specified by:
getRequiredBoolin interfacecom.appslandia.common.base.Config- Throws:
IllegalStateExceptioncom.appslandia.common.base.BoolFormatException
-
getInt
public int getInt(String key, int defaultValue)
- Specified by:
getIntin interfacecom.appslandia.common.base.Config
-
getRequiredInt
public int getRequiredInt(String key) throws IllegalStateException, NumberFormatException
- Specified by:
getRequiredIntin interfacecom.appslandia.common.base.Config- Throws:
IllegalStateExceptionNumberFormatException
-
getLong
public long getLong(String key, long defaultValue)
- Specified by:
getLongin interfacecom.appslandia.common.base.Config
-
getRequiredLong
public long getRequiredLong(String key) throws IllegalStateException, NumberFormatException
- Specified by:
getRequiredLongin interfacecom.appslandia.common.base.Config- Throws:
IllegalStateExceptionNumberFormatException
-
getDouble
public double getDouble(String key, double defaultValue)
- Specified by:
getDoublein interfacecom.appslandia.common.base.Config
-
getRequiredDouble
public double getRequiredDouble(String key) throws IllegalStateException, NumberFormatException
- Specified by:
getRequiredDoublein interfacecom.appslandia.common.base.Config- Throws:
IllegalStateExceptionNumberFormatException
-
-