public final class Config extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
_APPID
"appid"
|
static String |
_CREATORID
"creatorid"
|
static String |
_EMAIL
"email"
|
static String |
_EMAIL_TOKEN
"etoken"
|
static String |
_GROUPS
"groups"
|
static String |
_ID
"id"
|
static String |
_IDENTIFIER
"identifier"
|
static String |
_KEY
"key"
|
static String |
_NAME
"name"
|
static String |
_PARENTID
"parentid"
|
static String |
_PASSWORD
"password"
|
static String |
_RESET_TOKEN
"token"
|
static String |
_TAGS
"tags"
|
static String |
_TIMESTAMP
"timestamp"
|
static String |
_TYPE
"type"
|
static String |
_UPDATED
"updated"
|
static String |
ADMIN_IDENT
The identifier of the first administrator (can be email, OpenID, or Facebook user id)
|
static boolean |
API_ENABLED
Enable the RESTful API.
|
static String |
APP_NAME
The name of the default application.
|
static String |
APP_NAME_NS
The name of the default application without any spaces.
|
static String |
APP_SECRET_KEY
The secret key for this deployment.
|
static String |
AUTH_COOKIE
The name of the authentication cookie.
|
static String |
AWS_ACCESSKEY
AWS Access Key
|
static String |
AWS_REGION
AWS Region
|
static String |
AWS_SECRETKEY
AWS ecret Key
|
static String |
CLUSTER_NAME
The name of the cluster (can be used to separate deployments)
|
static String |
CORE_PACKAGE_NAME
The package path (e.g.
|
static boolean |
CORS_ENABLED
Enable the CORS filter for API requests.
|
static String |
DEFAULT_ENCODING
Default character encoding - 'UTF-8'
|
static int |
DEFAULT_LIMIT
10000
|
static String |
ENVIRONMENT
For example: production, development, testing...
|
static int |
EXECUTOR_THREADS
The number of threads to use for the ExecutorService thread pool.
|
static String |
FB_APP_ID
Facebook app id (for authentication)
|
static String |
FB_PREFIX
Facebook prefix - defaults to 'fb:'.
|
static String |
FB_SECRET
Facebook app secret (for authentication)
|
static String |
GITHUB_APP_ID
GitHub app id (for authentication)
|
static String |
GITHUB_PREFIX
GitHub prefix - defaults to 'gh;'.
|
static String |
GITHUB_SECRET
GitHub app secret (for authentication)
|
static String |
GMAPS_API_KEY
Google Maps API key
|
static String |
GPLUS_APP_ID
Google+ app id (for authentication)
|
static String |
GPLUS_PREFIX
Google prefix - defaults to 'gp;'.
|
static String |
GPLUS_SECRET
Google+ app secret (for authentication)
|
static boolean |
GZIP_ENABLED
Enable the GZIP filter for API requests.
|
static boolean |
IN_DEVELOPMENT
Development environment flag.
|
static boolean |
IN_PRODUCTION
Production environment flag.
|
static Long |
JWT_EXPIRES_AFTER_SEC
JWT (access token) expiration in seconds.
|
static Long |
JWT_REFRESH_INTERVAL_SEC
JWT refresh interval - tokens will be auto-refreshed at this interval of time.
|
static String |
LINKEDIN_APP_ID
LinkedIn app id (for authentication)
|
static String |
LINKEDIN_PREFIX
LinkedIn prefix - defaults to 'in:'.
|
static String |
LINKEDIN_SECRET
LinkedIn app secret (for authentication)
|
static int |
MAX_DATATYPES_PER_APP
Maximum number of data types that can be defined per app - default is 256.
|
static int |
MAX_ENTITY_SIZE_BYTES
Maximum size of incoming JSON objects - default is 1048576 (bytes).
|
static int |
MAX_IMG_SIZE_PX
Maximum image size (longest edge) - default is 1024 (pixels).
|
static int |
MAX_ITEMS_PER_PAGE
Maximum results per page - limits the number of items to show in search results.
|
static int |
MAX_PAGES
Pagination limit - default is 10 000.
|
static int |
MIN_PASS_LENGTH
Minimum password length - default is 6 symbols.
|
static String |
OPENX_API_KEY
OpenExchangeRates.org API key
|
static String |
PARA
"para"
|
static Long |
PASSRESET_TIMEOUT_SEC
Password reset window in seconds.
|
static Long |
REQUEST_EXPIRES_AFTER_SEC
Expiration of signed API request, in seconds.
|
static String |
RETURNTO_COOKIE
The name of the "return to" cookie.
|
static String |
SEPARATOR
String separator - default is colon ':'.
|
static Long |
SESSION_TIMEOUT_SEC
Session timeout in seconds.
|
static String |
SUPPORT_EMAIL
The email address for support.
|
static String |
TWITTER_APP_ID
Twitter app id (for authentication)
|
static String |
TWITTER_PREFIX
Twitter prefix - defaults to 'tw:'.
|
static String |
TWITTER_SECRET
Twitter app secret (for authentication)
|
static Long |
VOTE_EXPIRES_AFTER_SEC
Votes expire after X seconds.
|
static Long |
VOTE_LOCKED_AFTER_SEC
A vote can be changed within X seconds of casting.
|
static String |
WORKER_ID
The id of this deployment.
|
| Constructor and Description |
|---|
Config() |
| Modifier and Type | Method and Description |
|---|---|
static com.typesafe.config.Config |
getConfig()
Returns the Config object.
|
static boolean |
getConfigBoolean(String key,
boolean defaultValue)
Returns the boolean value of a configuration parameter.
|
static double |
getConfigDouble(String key,
double defaultValue)
Returns the double value of a configuration parameter.
|
static int |
getConfigInt(String key,
int defaultValue)
Returns the integer value of a configuration parameter.
|
static Map<String,String> |
getConfigMap()
Returns a map of configuration parameters and their values.
|
static String |
getConfigParam(String key,
String defaultValue)
Returns the value of a configuration parameter or its default value.
|
static void |
init(com.typesafe.config.Config conf)
Initializes the configuration class by loading the configuration file.
|
static boolean |
isCacheEnabled()
Default: true only if
ENVIRONMENT = "production" |
static boolean |
isSearchEnabled()
Default: true
|
public static final String PARA
public static final String _TYPE
public static final String _APPID
public static final String _CREATORID
public static final String _ID
public static final String _IDENTIFIER
public static final String _KEY
public static final String _NAME
public static final String _PARENTID
public static final String _PASSWORD
public static final String _RESET_TOKEN
public static final String _EMAIL_TOKEN
public static final String _TIMESTAMP
public static final String _UPDATED
public static final String _TAGS
public static final String _EMAIL
public static final String _GROUPS
public static final int DEFAULT_LIMIT
public static final String SEPARATOR
public static final String FB_PREFIX
public static final String GPLUS_PREFIX
public static final String LINKEDIN_PREFIX
public static final String TWITTER_PREFIX
public static final String GITHUB_PREFIX
public static final int MAX_ITEMS_PER_PAGE
public static final int MAX_PAGES
public static final int MAX_IMG_SIZE_PX
public static final int MIN_PASS_LENGTH
public static final int MAX_DATATYPES_PER_APP
public static final int MAX_ENTITY_SIZE_BYTES
public static final String DEFAULT_ENCODING
public static final String ENVIRONMENT
public static final String AWS_ACCESSKEY
public static final String AWS_SECRETKEY
public static final String AWS_REGION
public static final String FB_APP_ID
public static final String FB_SECRET
public static final String GPLUS_APP_ID
public static final String GPLUS_SECRET
public static final String LINKEDIN_APP_ID
public static final String LINKEDIN_SECRET
public static final String TWITTER_APP_ID
public static final String TWITTER_SECRET
public static final String GITHUB_APP_ID
public static final String GITHUB_SECRET
public static final String OPENX_API_KEY
public static final String GMAPS_API_KEY
public static final String ADMIN_IDENT
public static final String WORKER_ID
public static final int EXECUTOR_THREADS
public static final String APP_NAME
public static final String APP_NAME_NS
public static final String AUTH_COOKIE
public static final String RETURNTO_COOKIE
public static final String SUPPORT_EMAIL
public static final String APP_SECRET_KEY
public static final String CORE_PACKAGE_NAME
public static final Long REQUEST_EXPIRES_AFTER_SEC
public static final Long JWT_EXPIRES_AFTER_SEC
public static final Long JWT_REFRESH_INTERVAL_SEC
public static final Long SESSION_TIMEOUT_SEC
public static final Long VOTE_EXPIRES_AFTER_SEC
public static final Long VOTE_LOCKED_AFTER_SEC
public static final Long PASSRESET_TIMEOUT_SEC
public static final boolean API_ENABLED
public static final boolean CORS_ENABLED
public static final boolean GZIP_ENABLED
public static final boolean IN_PRODUCTION
public static final boolean IN_DEVELOPMENT
public static final String CLUSTER_NAME
public static void init(com.typesafe.config.Config conf)
conf - overrides the default configurationpublic static boolean getConfigBoolean(String key, boolean defaultValue)
key - the param keydefaultValue - the default param valuepublic static int getConfigInt(String key, int defaultValue)
key - the param keydefaultValue - the default param valuepublic static double getConfigDouble(String key, double defaultValue)
key - the param keydefaultValue - the default param valuepublic static String getConfigParam(String key, String defaultValue)
System.getProperty(java.lang.String) has precedence.key - the param keydefaultValue - the default param valuepublic static Map<String,String> getConfigMap()
public static com.typesafe.config.Config getConfig()
public static boolean isCacheEnabled()
ENVIRONMENT = "production"public static boolean isSearchEnabled()
Copyright © 2016 Erudika. All rights reserved.