Class ServletConfigurationPropertyProvider
- java.lang.Object
-
- de.aristaflow.adept2.base.configuration.PropertyProvider
-
- de.aristaflow.adept2.base.configuration.ConfigurationPropertyProvider
-
- de.aristaflow.adept2.base.configuration.ServletConfigurationPropertyProvider
-
public class ServletConfigurationPropertyProvider extends ConfigurationPropertyProvider
AServletConfigurationPropertyProvider
provides the means to retrieve global properties and the variables to be substituted from system properties as well as the init parameter of a servlet configuration or of a servlet context.This class parses the following (static) properties from the system environment:
- os.name
- arflow.logdir
- arflow.datadir
- arflow.libdir
- arflow.useSunSecProvider
- arflow.confurl
- arflow.confdir
- arflow.configuration.runtime.defaultdatasource
- arflow.confdir.runtime
- arflow.configuration.bundle
- arflow.debug.configuration
- arflow.logging.keephandler
-
-
Field Summary
-
Fields inherited from class de.aristaflow.adept2.base.configuration.PropertyProvider
logger
-
-
Constructor Summary
Constructors Constructor Description ServletConfigurationPropertyProvider(javax.servlet.ServletConfig config)
Creates a newServletConfigurationPropertyProvider
and parses all corresponding properties from the init parameter of the designated servlet configuration and the system properties.ServletConfigurationPropertyProvider(javax.servlet.ServletContext context)
Creates a newServletConfigurationPropertyProvider
and parses all corresponding properties from the init parameter of the designated servlet context and the system properties.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static Map<String,String>
getProperties(Function<String,String> propValue)
Parses and sets the global properties required for the AristaFlow-platform using the designated function..protected static Map<String,String>
getProperties(javax.servlet.ServletConfig config)
Parses and sets the global properties required for the AristaFlow-platform from the designated servlet configuration.protected static Map<String,String>
getProperties(javax.servlet.ServletContext context)
Parses and sets the global properties required for the AristaFlow-platform from the designated servlet context.-
Methods inherited from class de.aristaflow.adept2.base.configuration.ConfigurationPropertyProvider
getAfterConfDirs, getBeforeConfDirs, getBundleConfigSubdir, getConfDirs, getDebugConfig, getKeepLogHandler, getRuntimeConfDir, getUseDefDsForRtConf, initialiseProperties, injectDefaultConfDir, parseConfDirs
-
Methods inherited from class de.aristaflow.adept2.base.configuration.PropertyProvider
getSkipClosing, getSubstitutedVariables, getTotalMemPerthousandStreamThreshold, getUsePre300Security, getUseSunSecurityProviders
-
-
-
-
Constructor Detail
-
ServletConfigurationPropertyProvider
public ServletConfigurationPropertyProvider(javax.servlet.ServletConfig config) throws ConfigurationException
Creates a newServletConfigurationPropertyProvider
and parses all corresponding properties from the init parameter of the designated servlet configuration and the system properties.- Parameters:
config
- The servlet configuration providing the AristaFlow-properties- Throws:
ConfigurationException
- If there are problems retrieving a required global property or a substituted variables or the root configuration, aConfigurationException
will be thrown.
-
ServletConfigurationPropertyProvider
public ServletConfigurationPropertyProvider(javax.servlet.ServletContext context) throws ConfigurationException
Creates a newServletConfigurationPropertyProvider
and parses all corresponding properties from the init parameter of the designated servlet context and the system properties.- Parameters:
context
- The servlet context providing the AristaFlow-properties- Throws:
ConfigurationException
- If there are problems retrieving a required global property or a substituted variables or the root configuration, aConfigurationException
will be thrown.
-
-
Method Detail
-
getProperties
protected static Map<String,String> getProperties(javax.servlet.ServletConfig config)
Parses and sets the global properties required for the AristaFlow-platform from the designated servlet configuration. Static properties and non-existing values will be retrieved from the system properties. The following properties are parsed from the system properties:- os.name
- arflow.logdir
- arflow.datadir
- arflow.libdir
- arflow.useSunSecProvider
- arflow.confurl
- arflow.confdir
- arflow.configuration.runtime.defaultdatasource
- arflow.confdir.runtime
- arflow.configuration.bundle
- arflow.debug.configuration
- arflow.logging.keephandler
- Parameters:
config
- The servlet configuration which to parse.- Returns:
- A map containing the global properties parsed from the designated servlet configuration as well as the system properties.
-
getProperties
protected static Map<String,String> getProperties(javax.servlet.ServletContext context)
Parses and sets the global properties required for the AristaFlow-platform from the designated servlet context. Static properties and non-existing values will be retrieved from the system properties. The following properties are parsed from the system properties:- os.name
- arflow.logdir
- arflow.datadir
- arflow.libdir
- arflow.useSunSecProvider
- arflow.confurl
- arflow.confdir
- arflow.configuration.runtime.defaultdatasource
- arflow.confdir.runtime
- arflow.configuration.bundle
- arflow.debug.configuration
- arflow.logging.keephandler
- Parameters:
context
- The servlet context which to parse.- Returns:
- A map containing the global properties parsed from the designated servlet context as well as the system properties.9
-
getProperties
protected static Map<String,String> getProperties(Function<String,String> propValue)
Parses and sets the global properties required for the AristaFlow-platform using the designated function.. Static properties and non-existing values will be retrieved from the system properties. The following properties are parsed from the system properties:- os.name
- arflow.logdir
- arflow.datadir
- arflow.libdir
- arflow.useSunSecProvider
- arflow.confurl
- arflow.confdir
- arflow.configuration.runtime.defaultdatasource
- arflow.confdir.runtime
- arflow.configuration.bundle
- arflow.debug.configuration
- arflow.logging.keephandler
- Parameters:
propValue
- The provider returning the property value for a specific property key.- Returns:
- A map containing the global properties parsed from the designated servlet context as well as the system properties.
-
-