public.javadoc.org.spincast.testing.core.utils.SpincastConfigTestingDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
SpincastConfigTestingDefault (org.spincast:spincast-framework 1.0.0 API)
org.spincast.testing.core.utils
Class SpincastConfigTestingDefault
- java.lang.Object
-
- org.spincast.plugins.config.ConfigFinder
-
- org.spincast.plugins.config.SpincastConfigDefault
-
- org.spincast.testing.core.utils.SpincastConfigTestingDefault
-
- All Implemented Interfaces:
- SpincastConfig
public class SpincastConfigTestingDefault
extends SpincastConfigDefault
Default configurations for Spincast integration
testing.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.spincast.plugins.config.ConfigFinder
ConfigFinder.ConfigFinderBuilder
-
Field Summary
-
Fields inherited from class org.spincast.plugins.config.SpincastConfigDefault
ENVIRONMENT_NAME_DEFAULT
-
Fields inherited from class org.spincast.plugins.config.ConfigFinder
configs, logger, rawConfigs
-
Constructor Summary
Constructors
Modifier
Constructor and Description
protected
SpincastConfigTestingDefault(SpincastConfigPluginConfig spincastConfigPluginConfig,
boolean testingMode)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
DictionaryEntryNotFoundBehavior
getDictionaryEntryNotFoundBehavior()
If a dictionary key is not found, how must Spincast react?
int
getHttpServerPort()
The HTTP (unsecure) port on which the server will listen on.
String
getHttpsKeyStoreKeyPass()
The "keypass" of the KeyStore
, for SSL.
String
getHttpsKeyStorePath()
The path to the KeyStore
, for SSL.
String
getHttpsKeyStoreStorePass()
The "storepass" of the KeyStore
, for SSL.
String
getHttpsKeyStoreType()
The type of the KeyStore
, for SSL.
int
getHttpsServerPort()
The HTTPS (secure) port on which the server will listen on.
String
getPublicUrlBase()
You should override this config!!!!
String
getServerHost()
The host/IP on which the server will listen to.
boolean
isDevelopmentMode()
We do not run in "debug" mode.
boolean
isEnableCookiesValidator()
If true
, Spincast will always try to set a cookie
to validate if cookies are enabled on the client.
boolean
isValidateLocalhostHost()
By default, if SpincastConfig.getPublicServerHost()
returns
"localhost"
, SpincastConfig.getEnvironmentName()
is
not "local"
and SpincastConfig.isDevelopmentMode()
is false,
an exception is thrown when the application starts.
-
Methods inherited from class org.spincast.plugins.config.SpincastConfigDefault
getContentTypesToSkipGziping, getCookieNameFlashMessage, getCookieNameLocale, getCookieNameTimeZoneId, getCookiesValidatorCookieName, getDefaultLocale, getDefaultRouteCacheFilterSecondsNbr, getDefaultRouteCacheFilterSecondsNbrCdns, getDefaultStaticResourceCacheConfig, getDefaultTemplateVariablesFilterPosition, getDefaultTimeZone, getEnvironmentName, getHostForDefaultPublicServerSchemeHostPort, getJsonPathArrayIndexMax, getKeyMaxLengthWhenConvertingMapToJsonObject, getMaxNumberOfKeysWhenConvertingMapToJsonObject, getPublicServerHost, getPublicServerPort, getPublicServerScheme, getPublicURI, getQueryParamFlashMessageId, getRouteForwardingMaxNumber, getServerMaxRequestBodyBytes, getSpincastModelRootVariableName, getSpincastWritableDirPath, getTempDir, getValidationElementDefaultName, getWritableRootDir, init, isAddDefaultTemplateVariablesFilter, isDefaultRouteCacheFilterPrivate, isRoutesCaseSensitive, isTestingMode, isWriteToDiskDynamicStaticResource
-
Methods inherited from class org.spincast.plugins.config.ConfigFinder
clearPrefixes, configure, expandMap, getAppJarDirectory, getAppRootDirectoryNoJar, getBigDecimal, getBigDecimal, getBigDecimalFromElement, getBigDecimalList, getBigDecimalList, getBoolean, getBoolean, getBooleanFromElement, getBooleanList, getBooleanList, getClasspathFilePath, getConfig, getConfig, getConfigFromMap, getConfigFromMap, getConfigList, getConfigList, getConfigs, getDate, getDate, getDateFromElement, getDateList, getDateList, getEnvironmentVariables, getEnvironmentVariablesConfigs, getEnvironmentVariablesPrefixes, getExternalFilePath, getInteger, getInteger, getIntegerFromElement, getIntegerList, getIntegerList, getLong, getLong, getLongFromElement, getLongList, getLongList, getMap, getMap, getMapList, getMapList, getRawConfig, getRawConfigs, getString, getString, getStringList, getStringList, getSystemPropertiesConfigs, getSystemPropertiesPrefixes, isEnvironmentVariablesStripPrefix, isExternalFileConfigsOverrideEnvironmentVariables, isSystemPropertiesStripPrefix, isThrowExceptionIfSpecifiedClasspathConfigFileIsNotFound, isThrowExceptionIfSpecifiedExternalConfigFileIsNotFound, loadYamlFileConfigs, mergeMaps
-
-
Constructor Detail
-
SpincastConfigTestingDefault
@Inject
protected SpincastConfigTestingDefault(SpincastConfigPluginConfig spincastConfigPluginConfig,
boolean testingMode)
Constructor
-
Method Detail
-
isDevelopmentMode
public boolean isDevelopmentMode()
We do not run in "debug" mode.
- Specified by:
isDevelopmentMode
in interface SpincastConfig
- Overrides:
isDevelopmentMode
in class SpincastConfigDefault
- Returns:
true
if debug mode is enabled.
-
getServerHost
public String getServerHost()
Description copied from interface: SpincastConfig
The host/IP on which the server will listen to.
The default value is 0.0.0.0
.
- Specified by:
getServerHost
in interface SpincastConfig
- Overrides:
getServerHost
in class SpincastConfigDefault
- Returns:
- the host/IP
-
getHttpServerPort
public int getHttpServerPort()
Description copied from interface: SpincastConfig
The HTTP (unsecure) port on which the server will listen on.
If <= 0, it won't be used.
The default value is 44419
so HTTP
is enabled by default.
- Specified by:
getHttpServerPort
in interface SpincastConfig
- Overrides:
getHttpServerPort
in class SpincastConfigDefault
- Returns:
- the HTTP port
-
getHttpsServerPort
public int getHttpsServerPort()
Description copied from interface: SpincastConfig
The HTTPS (secure) port on which the server will listen on.
If <= 0, it won't be used.
The default value is -1
so HTTPS
is not enabled by default.
- Specified by:
getHttpsServerPort
in interface SpincastConfig
- Overrides:
getHttpsServerPort
in class SpincastConfigDefault
- Returns:
- the HTTPS port
-
getPublicUrlBase
public String getPublicUrlBase()
Description copied from class: SpincastConfigDefault
You should override this config!!!!
- Specified by:
getPublicUrlBase
in interface SpincastConfig
- Overrides:
getPublicUrlBase
in class SpincastConfigDefault
-
getHttpsKeyStorePath
public String getHttpsKeyStorePath()
Description copied from interface: SpincastConfig
The path to the KeyStore
, for SSL. Can be a
classpath path or and absolute path.
The classpath will be checked first.
Only used if getHttpsServerPort()
returns a port > 0.
The default value is null
.
- Specified by:
getHttpsKeyStorePath
in interface SpincastConfig
- Overrides:
getHttpsKeyStorePath
in class SpincastConfigDefault
- Returns:
- the path to the
KeyStore
-
getHttpsKeyStoreType
public String getHttpsKeyStoreType()
Description copied from interface: SpincastConfig
The type of the KeyStore
, for SSL.
For example: "JKS".
Only used if getHttpsServerPort()
returns a port > 0.
The default value is null
.
- Specified by:
getHttpsKeyStoreType
in interface SpincastConfig
- Overrides:
getHttpsKeyStoreType
in class SpincastConfigDefault
- Returns:
- the type of the
KeyStore
-
getHttpsKeyStoreStorePass
public String getHttpsKeyStoreStorePass()
Description copied from interface: SpincastConfig
The "storepass" of the KeyStore
, for SSL.
Only used if getHttpsServerPort()
returns a port > 0.
The default value is null
.
- Specified by:
getHttpsKeyStoreStorePass
in interface SpincastConfig
- Overrides:
getHttpsKeyStoreStorePass
in class SpincastConfigDefault
- Returns:
- the "storepass" of the
KeyStore
-
getHttpsKeyStoreKeyPass
public String getHttpsKeyStoreKeyPass()
Description copied from interface: SpincastConfig
The "keypass" of the KeyStore
, for SSL.
Only used if getHttpsServerPort()
returns a port > 0.
The default value is null
.
- Specified by:
getHttpsKeyStoreKeyPass
in interface SpincastConfig
- Overrides:
getHttpsKeyStoreKeyPass
in class SpincastConfigDefault
- Returns:
- the "keypass" of the
KeyStore
-
isValidateLocalhostHost
public boolean isValidateLocalhostHost()
Description copied from interface: SpincastConfig
By default, if SpincastConfig.getPublicServerHost()
returns
"localhost"
, SpincastConfig.getEnvironmentName()
is
not "local"
and SpincastConfig.isDevelopmentMode()
is false,
an exception is thrown when the application starts.
This validation is to make sure the developers
didn't forget to override the SpincastConfig.getPublicUrlBase()
method when they release to a non local environment.
You can disable this validation if you want.
- Specified by:
isValidateLocalhostHost
in interface SpincastConfig
- Overrides:
isValidateLocalhostHost
in class SpincastConfigDefault
-
isEnableCookiesValidator
public boolean isEnableCookiesValidator()
Description copied from interface: SpincastConfig
If true
, Spincast will always try to set a cookie
to validate if cookies are enabled on the client.
This is enabled by default
- Specified by:
isEnableCookiesValidator
in interface SpincastConfig
- Overrides:
isEnableCookiesValidator
in class SpincastConfigDefault
-
getDictionaryEntryNotFoundBehavior
public DictionaryEntryNotFoundBehavior getDictionaryEntryNotFoundBehavior()
Description copied from interface: SpincastConfig
If a dictionary key is not found, how must Spincast react?
Note that if the key is not found for the current Locale,
Spincast will first check if it exists for the fallback
Locale (the empty Locale).
By default, in debug mode an exception is thrown. Otherwise,
an empty string is returned but an error is logged.
- Specified by:
getDictionaryEntryNotFoundBehavior
in interface SpincastConfig
- Overrides:
getDictionaryEntryNotFoundBehavior
in class SpincastConfigDefault
Copyright © 2019. All rights reserved.