public class BootstrapPropertyResolver
extends java.lang.Object
Resolves configuration properties that are used to bootstrap the system. Essentially this boils down to a handful of properties that are needed to figure out which configuration class should be instantiated, and any values needed by that configuration class to locate configuration information.
Properties are looked for in the following order:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PACKAGES
The Configuration Key for looking up the comma separated list of extension packages.
|
Constructor and Description |
---|
BootstrapPropertyResolver(javax.servlet.FilterConfig filterConfig)
Constructs a new BootstrapPropertyResolver with the given ServletConfig.
|
Modifier and Type | Method and Description |
---|---|
<T> java.lang.Class<? extends T> |
getClassProperty(java.lang.String paramName,
java.lang.Class<T> targetType)
Attempts to find a class the user has specified in web.xml or by auto-discovery in packages
listed in web.xml under Extension.Packages.
|
<T> java.util.List<java.lang.Class<? extends T>> |
getClassPropertyList(java.lang.Class<T> targetType)
Attempts to find classes by auto-discovery in packages listed in web.xml under
Extension.Packages.
|
java.util.List<java.lang.Class<?>> |
getClassPropertyList(java.lang.String paramName)
Attempts to find all classes the user has specified in web.xml.
|
<T> java.util.List<java.lang.Class<? extends T>> |
getClassPropertyList(java.lang.String paramName,
java.lang.Class<T> targetType)
Attempts to find all matching classes the user has specified in web.xml or by auto-discovery
in packages listed in web.xml under Extension.Packages.
|
javax.servlet.FilterConfig |
getFilterConfig()
Returns a reference to the StripesFilter's FilterConfig object.
|
java.lang.String |
getProperty(java.lang.String key)
Fetches a configuration property in the manner described in the class level javadoc for
this class.
|
protected <T> void |
removeAbstractClasses(java.util.Collection<java.lang.Class<? extends T>> classes)
Removes any classes from the collection that are abstract or interfaces.
|
protected <T> void |
removeDontAutoloadClasses(java.util.Collection<java.lang.Class<? extends T>> classes)
Removes any classes from the collection that are marked with
DontAutoLoad . |
void |
setFilterConfig(javax.servlet.FilterConfig filterConfig)
Stores a reference to the filter's FilterConfig object.
|
public static final java.lang.String PACKAGES
public BootstrapPropertyResolver(javax.servlet.FilterConfig filterConfig)
public void setFilterConfig(javax.servlet.FilterConfig filterConfig)
public javax.servlet.FilterConfig getFilterConfig()
public java.lang.String getProperty(java.lang.String key)
key
- the String name of the configuration value to be looked uppublic <T> java.lang.Class<? extends T> getClassProperty(java.lang.String paramName, java.lang.Class<T> targetType)
paramName
- the parameter to look for in web.xmltargetType
- the type that we're looking forpublic java.util.List<java.lang.Class<?>> getClassPropertyList(java.lang.String paramName)
paramName
- the parameter to look for in web.xmlpublic <T> java.util.List<java.lang.Class<? extends T>> getClassPropertyList(java.lang.Class<T> targetType)
targetType
- the type that we're looking forpublic <T> java.util.List<java.lang.Class<? extends T>> getClassPropertyList(java.lang.String paramName, java.lang.Class<T> targetType)
paramName
- the parameter to look for in web.xmltargetType
- the type that we're looking forprotected <T> void removeDontAutoloadClasses(java.util.Collection<java.lang.Class<? extends T>> classes)
DontAutoLoad
.protected <T> void removeAbstractClasses(java.util.Collection<java.lang.Class<? extends T>> classes)
? Copyright 2005-2006, Stripes Development Team.