Package org.spincast.plugins.config
Class SpincastConfigDefault
java.lang.Object
org.spincast.plugins.config.ConfigFinder
org.spincast.plugins.config.SpincastConfigDefault
- All Implemented Interfaces:
org.spincast.core.config.SpincastConfig
public class SpincastConfigDefault
extends ConfigFinder
implements org.spincast.core.config.SpincastConfig
If you extend this class (which is recommended to implement your
configuration), beware that causing circular dependencies is very
easy if you inject more dependencies than SpincastConfigPluginConfig!
Indeed, most components depend on the config components.
Also, don't forget to annotated the testingMode
parameter with @TestingMode!
-
Nested Class Summary
Nested classes/interfaces inherited from class org.spincast.plugins.config.ConfigFinder
ConfigFinder.ConfigFinderBuilder -
Field Summary
FieldsFields inherited from class org.spincast.plugins.config.ConfigFinder
configs, logger, rawConfigs -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSpincastConfigDefault(SpincastConfigPluginConfig spincastConfigPluginConfig, boolean testingMode) Constructor -
Method Summary
Modifier and TypeMethodDescriptionintorg.spincast.core.routing.StaticResourceCacheConfiggetDefaultStaticResourceCacheConfig(boolean isDynamicResource) intorg.spincast.core.dictionary.DictionaryEntryNotFoundBehaviorprotected Stringintintintintintfinal Stringfinal intfinal StringThree of the rare "final" methods in Spincast!protected URIYou should override this config!!!!intlongprotected StringThe path to the writable directory.Will callgetSpincastWritableDirPath()to get the path to use for the writable directory.protected voidinit()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanMethods 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
-
Field Details
-
ENVIRONMENT_NAME_DEFAULT
- See Also:
-
-
Constructor Details
-
SpincastConfigDefault
@Inject protected SpincastConfigDefault(SpincastConfigPluginConfig spincastConfigPluginConfig, boolean testingMode) Constructor
-
-
Method Details
-
init
@Inject protected void init() -
getEnvironmentName
- Specified by:
getEnvironmentNamein interfaceorg.spincast.core.config.SpincastConfig
-
getHttpServerPort
public int getHttpServerPort()- Specified by:
getHttpServerPortin interfaceorg.spincast.core.config.SpincastConfig
-
getHttpsServerPort
public int getHttpsServerPort()- Specified by:
getHttpsServerPortin interfaceorg.spincast.core.config.SpincastConfig
-
getHttpsKeyStorePath
- Specified by:
getHttpsKeyStorePathin interfaceorg.spincast.core.config.SpincastConfig
-
getHttpsKeyStoreType
- Specified by:
getHttpsKeyStoreTypein interfaceorg.spincast.core.config.SpincastConfig
-
getHttpsKeyStoreStorePass
- Specified by:
getHttpsKeyStoreStorePassin interfaceorg.spincast.core.config.SpincastConfig
-
getHttpsKeyStoreKeyPass
- Specified by:
getHttpsKeyStoreKeyPassin interfaceorg.spincast.core.config.SpincastConfig
-
getPublicURI
-
getPublicServerScheme
Three of the rare "final" methods in Spincast!- Specified by:
getPublicServerSchemein interfaceorg.spincast.core.config.SpincastConfig
-
getPublicServerHost
- Specified by:
getPublicServerHostin interfaceorg.spincast.core.config.SpincastConfig
-
getPublicServerPort
public final int getPublicServerPort()- Specified by:
getPublicServerPortin interfaceorg.spincast.core.config.SpincastConfig
-
getPublicUrlBase
You should override this config!!!!- Specified by:
getPublicUrlBasein interfaceorg.spincast.core.config.SpincastConfig
-
getHostForDefaultPublicServerSchemeHostPort
-
getServerHost
- Specified by:
getServerHostin interfaceorg.spincast.core.config.SpincastConfig
-
isDevelopmentMode
public boolean isDevelopmentMode()- Specified by:
isDevelopmentModein interfaceorg.spincast.core.config.SpincastConfig
-
isTestingMode
public boolean isTestingMode()- Specified by:
isTestingModein interfaceorg.spincast.core.config.SpincastConfig
-
isRoutesCaseSensitive
public boolean isRoutesCaseSensitive()- Specified by:
isRoutesCaseSensitivein interfaceorg.spincast.core.config.SpincastConfig
-
getServerMaxRequestBodyBytes
public long getServerMaxRequestBodyBytes()- Specified by:
getServerMaxRequestBodyBytesin interfaceorg.spincast.core.config.SpincastConfig
-
isEnableHttp2
public boolean isEnableHttp2()- Specified by:
isEnableHttp2in interfaceorg.spincast.core.config.SpincastConfig
-
getContentTypesToSkipGziping
- Specified by:
getContentTypesToSkipGzipingin interfaceorg.spincast.core.config.SpincastConfig
-
getWritableRootDir
Will callgetSpincastWritableDirPath()to get the path to use for the writable directory. If this method returnsnull, a directory will be created under thejava.io.tmpdirdirectory.- Specified by:
getWritableRootDirin interfaceorg.spincast.core.config.SpincastConfig
-
getTempDir
- Specified by:
getTempDirin interfaceorg.spincast.core.config.SpincastConfig
-
getSpincastWritableDirPath
The path to the writable directory.The path can be relative or absolute.
- Returns:
- the path or
nullto use the default location (using the "java.io.tmpdir" folder).
-
getDefaultLocale
- Specified by:
getDefaultLocalein interfaceorg.spincast.core.config.SpincastConfig
-
getDefaultTimeZone
- Specified by:
getDefaultTimeZonein interfaceorg.spincast.core.config.SpincastConfig
-
getRouteForwardingMaxNumber
public int getRouteForwardingMaxNumber()- Specified by:
getRouteForwardingMaxNumberin interfaceorg.spincast.core.config.SpincastConfig
-
getDefaultRouteCacheFilterSecondsNbr
public int getDefaultRouteCacheFilterSecondsNbr()- Specified by:
getDefaultRouteCacheFilterSecondsNbrin interfaceorg.spincast.core.config.SpincastConfig
-
isDefaultRouteCacheFilterPrivate
public boolean isDefaultRouteCacheFilterPrivate()- Specified by:
isDefaultRouteCacheFilterPrivatein interfaceorg.spincast.core.config.SpincastConfig
-
getDefaultRouteCacheFilterSecondsNbrCdns
- Specified by:
getDefaultRouteCacheFilterSecondsNbrCdnsin interfaceorg.spincast.core.config.SpincastConfig
-
isWriteToDiskDynamicStaticResource
public boolean isWriteToDiskDynamicStaticResource()- Specified by:
isWriteToDiskDynamicStaticResourcein interfaceorg.spincast.core.config.SpincastConfig
-
isAddDefaultTemplateVariablesFilter
public boolean isAddDefaultTemplateVariablesFilter()- Specified by:
isAddDefaultTemplateVariablesFilterin interfaceorg.spincast.core.config.SpincastConfig
-
getDefaultTemplateVariablesFilterPosition
public int getDefaultTemplateVariablesFilterPosition()- Specified by:
getDefaultTemplateVariablesFilterPositionin interfaceorg.spincast.core.config.SpincastConfig
-
getDefaultStaticResourceCacheConfig
public org.spincast.core.routing.StaticResourceCacheConfig getDefaultStaticResourceCacheConfig(boolean isDynamicResource) - Specified by:
getDefaultStaticResourceCacheConfigin interfaceorg.spincast.core.config.SpincastConfig
-
getMaxNumberOfKeysWhenConvertingMapToJsonObject
public int getMaxNumberOfKeysWhenConvertingMapToJsonObject()- Specified by:
getMaxNumberOfKeysWhenConvertingMapToJsonObjectin interfaceorg.spincast.core.config.SpincastConfig
-
getKeyMaxLengthWhenConvertingMapToJsonObject
public int getKeyMaxLengthWhenConvertingMapToJsonObject()- Specified by:
getKeyMaxLengthWhenConvertingMapToJsonObjectin interfaceorg.spincast.core.config.SpincastConfig
-
getJsonPathArrayIndexMax
public int getJsonPathArrayIndexMax()- Specified by:
getJsonPathArrayIndexMaxin interfaceorg.spincast.core.config.SpincastConfig
-
isValidateLocalhostHost
public boolean isValidateLocalhostHost()- Specified by:
isValidateLocalhostHostin interfaceorg.spincast.core.config.SpincastConfig
-
isEnableCookiesValidator
public boolean isEnableCookiesValidator()- Specified by:
isEnableCookiesValidatorin interfaceorg.spincast.core.config.SpincastConfig
-
getQueryParamFlashMessageId
- Specified by:
getQueryParamFlashMessageIdin interfaceorg.spincast.core.config.SpincastConfig
-
getCookieNameFlashMessage
- Specified by:
getCookieNameFlashMessagein interfaceorg.spincast.core.config.SpincastConfig
-
getCookieNameLocale
- Specified by:
getCookieNameLocalein interfaceorg.spincast.core.config.SpincastConfig
-
getCookieNameTimeZoneId
- Specified by:
getCookieNameTimeZoneIdin interfaceorg.spincast.core.config.SpincastConfig
-
getCookiesValidatorCookieName
- Specified by:
getCookiesValidatorCookieNamein interfaceorg.spincast.core.config.SpincastConfig
-
getSpincastModelRootVariableName
- Specified by:
getSpincastModelRootVariableNamein interfaceorg.spincast.core.config.SpincastConfig
-
getValidationElementDefaultName
- Specified by:
getValidationElementDefaultNamein interfaceorg.spincast.core.config.SpincastConfig
-
getDictionaryEntryNotFoundBehavior
public org.spincast.core.dictionary.DictionaryEntryNotFoundBehavior getDictionaryEntryNotFoundBehavior()- Specified by:
getDictionaryEntryNotFoundBehaviorin interfaceorg.spincast.core.config.SpincastConfig
-