Package 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
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_DEFAULTFields inherited from class org.spincast.plugins.config.ConfigFinder
configs, logger, rawConfigs -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSpincastConfigTestingDefault(SpincastConfigPluginConfig spincastConfigPluginConfig, boolean testingMode) Constructor -
Method Summary
Modifier and TypeMethodDescriptionIf a dictionary key is not found, how must Spincast react?intThe HTTP (unsecure) port on which the server will listen on.The "keypass" of theKeyStore, for SSL.The path to theKeyStore, for SSL.The "storepass" of theKeyStore, for SSL.The type of theKeyStore, for SSL.intThe HTTPS (secure) port on which the server will listen on.You should override this config!!!!The host/IP on which the server will listen to.booleanWe do not run in "debug" mode.booleanIftrue, Spincast will always try to set a cookie to validate if cookies are enabled on the client.booleanBy default, ifSpincastConfig.getPublicServerHost()returns"localhost",SpincastConfig.getEnvironmentName()is not"local"andSpincastConfig.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, isEnableHttp2, isRoutesCaseSensitive, isTestingMode, isWriteToDiskDynamicStaticResourceMethods 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 Details
-
SpincastConfigTestingDefault
@Inject protected SpincastConfigTestingDefault(SpincastConfigPluginConfig spincastConfigPluginConfig, boolean testingMode) Constructor
-
-
Method Details
-
isDevelopmentMode
public boolean isDevelopmentMode()We do not run in "debug" mode.- Specified by:
isDevelopmentModein interfaceSpincastConfig- Overrides:
isDevelopmentModein classSpincastConfigDefault- Returns:
trueif debug mode is enabled.
-
getServerHost
Description copied from interface:SpincastConfigThe host/IP on which the server will listen to. The default value is0.0.0.0.- Specified by:
getServerHostin interfaceSpincastConfig- Overrides:
getServerHostin classSpincastConfigDefault- Returns:
- the host/IP
-
getHttpServerPort
public int getHttpServerPort()Description copied from interface:SpincastConfigThe HTTP (unsecure) port on which the server will listen on. If <= 0, it won't be used. The default value is44419so HTTP is enabled by default.- Specified by:
getHttpServerPortin interfaceSpincastConfig- Overrides:
getHttpServerPortin classSpincastConfigDefault- Returns:
- the HTTP port
-
getHttpsServerPort
public int getHttpsServerPort()Description copied from interface:SpincastConfigThe HTTPS (secure) port on which the server will listen on. If <= 0, it won't be used. The default value is-1so HTTPS is not enabled by default.- Specified by:
getHttpsServerPortin interfaceSpincastConfig- Overrides:
getHttpsServerPortin classSpincastConfigDefault- Returns:
- the HTTPS port
-
getPublicUrlBase
Description copied from class:SpincastConfigDefaultYou should override this config!!!!- Specified by:
getPublicUrlBasein interfaceSpincastConfig- Overrides:
getPublicUrlBasein classSpincastConfigDefault
-
getHttpsKeyStorePath
Description copied from interface:SpincastConfigThe path to theKeyStore, for SSL. Can be a classpath path or and absolute path. The classpath will be checked first. Only used ifgetHttpsServerPort()returns a port > 0. The default value isnull.- Specified by:
getHttpsKeyStorePathin interfaceSpincastConfig- Overrides:
getHttpsKeyStorePathin classSpincastConfigDefault- Returns:
- the path to the
KeyStore
-
getHttpsKeyStoreType
Description copied from interface:SpincastConfigThe type of theKeyStore, for SSL. For example: "JKS". Only used ifgetHttpsServerPort()returns a port > 0. The default value isnull.- Specified by:
getHttpsKeyStoreTypein interfaceSpincastConfig- Overrides:
getHttpsKeyStoreTypein classSpincastConfigDefault- Returns:
- the type of the
KeyStore
-
getHttpsKeyStoreStorePass
Description copied from interface:SpincastConfigThe "storepass" of theKeyStore, for SSL. Only used ifgetHttpsServerPort()returns a port > 0. The default value isnull.- Specified by:
getHttpsKeyStoreStorePassin interfaceSpincastConfig- Overrides:
getHttpsKeyStoreStorePassin classSpincastConfigDefault- Returns:
- the "storepass" of the
KeyStore
-
getHttpsKeyStoreKeyPass
Description copied from interface:SpincastConfigThe "keypass" of theKeyStore, for SSL. Only used ifgetHttpsServerPort()returns a port > 0. The default value isnull.- Specified by:
getHttpsKeyStoreKeyPassin interfaceSpincastConfig- Overrides:
getHttpsKeyStoreKeyPassin classSpincastConfigDefault- Returns:
- the "keypass" of the
KeyStore
-
isValidateLocalhostHost
public boolean isValidateLocalhostHost()Description copied from interface:SpincastConfigBy default, ifSpincastConfig.getPublicServerHost()returns"localhost",SpincastConfig.getEnvironmentName()is not"local"andSpincastConfig.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:
isValidateLocalhostHostin interfaceSpincastConfig- Overrides:
isValidateLocalhostHostin classSpincastConfigDefault
-
isEnableCookiesValidator
public boolean isEnableCookiesValidator()Description copied from interface:SpincastConfigIftrue, Spincast will always try to set a cookie to validate if cookies are enabled on the client.This is enabled by default
- Specified by:
isEnableCookiesValidatorin interfaceSpincastConfig- Overrides:
isEnableCookiesValidatorin classSpincastConfigDefault
-
getDictionaryEntryNotFoundBehavior
Description copied from interface:SpincastConfigIf 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:
getDictionaryEntryNotFoundBehaviorin interfaceSpincastConfig- Overrides:
getDictionaryEntryNotFoundBehaviorin classSpincastConfigDefault
-