public abstract class ConfigPropertiesCascadeBase extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ConfigPropertiesCascadeBase.ConfigFile |
protected static class |
ConfigPropertiesCascadeBase.ConfigFileType
config file type
|
| Constructor and Description |
|---|
ConfigPropertiesCascadeBase() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
filesNeedReloadingBasedOnContents() |
protected Class<?> |
getClassInSiblingJar()
if it's ok to put the config file in the same directory as a jar,
then return a class in the jar here
|
protected abstract String |
getHierarchyConfigKey()
config key of the hierarchy value
|
protected abstract String |
getMainConfigClasspath()
get the main config classpath, e.g. csrf guard properties
|
protected abstract String |
getMainExampleConfigClasspath()
get the example config classpath, e.g. csrf guard base properties
|
protected abstract String |
getSecondsToCheckConfigKey()
config key of the time in seconds to check config
|
protected Integer |
getTimeToCheckConfigSeconds()
when we build the config object, get the time to check config in seconds
|
protected boolean |
needToCheckIfFilesNeedReloading() |
Properties |
properties()
get the properties object for this config file
|
protected static Properties |
propertiesFromResourceName(String resourceName,
boolean exceptionIfNotExist)
read properties from a resource, don't modify the properties returned since they are cached
|
protected Properties |
propertiesHelper(boolean setValues)
get the properties object for this config file
|
Map<String,String> |
propertiesOverrideMap()
override map for properties for testing
|
Map<String,String> |
propertiesThreadLocalOverrideMap()
override map for properties in thread local to be used in a web server or the like, based on property class
this is static since the properties class can get reloaded, but these shouldn't
|
protected static <T extends ConfigPropertiesCascadeBase> |
retrieveConfig(Class<T> configClass)
retrieve a config from the config file or from cache
|
protected ConfigPropertiesCascadeBase |
retrieveFromConfigFileOrCache()
see if there is one in cache, if so, use it, if not, get from config files
|
protected ConfigPropertiesCascadeBase |
retrieveFromConfigFiles()
get the config object from config files
|
protected static <T extends ConfigPropertiesCascadeBase> T retrieveConfig(Class<T> configClass)
T - class which is the return type of config classconfigClass - The configuration objectprotected Class<?> getClassInSiblingJar()
protected abstract String getSecondsToCheckConfigKey()
public Map<String,String> propertiesThreadLocalOverrideMap()
public Map<String,String> propertiesOverrideMap()
public Properties properties()
protected Properties propertiesHelper(boolean setValues)
setValues - if we should set the values for the properties.
if not, the values might not be correct, but this will be more performant
depending on how many EL properties there areprotected Integer getTimeToCheckConfigSeconds()
protected ConfigPropertiesCascadeBase retrieveFromConfigFiles()
protected ConfigPropertiesCascadeBase retrieveFromConfigFileOrCache()
protected boolean needToCheckIfFilesNeedReloading()
protected boolean filesNeedReloadingBasedOnContents()
protected abstract String getMainConfigClasspath()
protected abstract String getHierarchyConfigKey()
protected abstract String getMainExampleConfigClasspath()
protected static Properties propertiesFromResourceName(String resourceName, boolean exceptionIfNotExist)
resourceName - Name of properties resourceexceptionIfNotExist - When true, throw an exception if an URL for the resource name cannot be constructuedCopyright © 2025 OWASP. All rights reserved.