|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.config.BeanSelectionProvider
public class BeanSelectionProvider
Selects the implementations of key framework extension points, using the loaded property constants. The implementations are selected from the container builder using the name defined in its associated property. The default implementation name will always be "struts".
The following is a list of the allowed extension points:
Type | Property | Scope | Description |
---|---|---|---|
com.opensymphony.xwork2.ObjectFactory | struts.objectFactory | singleton | Creates actions, results, and interceptors |
com.opensymphony.xwork2.ActionProxyFactory | struts.actionProxyFactory | singleton | Creates the ActionProxy |
com.opensymphony.xwork2.util.ObjectTypeDeterminer | struts.objectTypeDeterminer | singleton | Determines what the key and element class of a Map or Collection should be |
org.apache.struts2.dispatcher.mapper.ActionMapper | struts.mapper.class | singleton | Determines the ActionMapping from a request and a URI from an ActionMapping |
org.apache.struts2.dispatcher.multipart.MultiPartRequest | struts.multipart.parser | per request | Parses a multipart request (file upload) |
org.apache.struts2.views.freemarker.FreemarkerManager | struts.freemarker.manager.classname | singleton | Loads and processes Freemarker templates |
org.apache.struts2.views.velocity.VelocityManager | struts.velocity.manager.classname | singleton | Loads and processes Velocity templates |
com.opensymphony.xwork2.validator.ActionValidatorManager | struts.actionValidatorManager | singleton | Main interface for validation managers (regular and annotation based). Handles both the loading of configuration and the actual validation (since 2.1) |
com.opensymphony.xwork2.util.ValueStackFactory | struts.valueStackFactory | singleton | Creates value stacks (since 2.1) |
com.opensymphony.xwork2.reflection.ReflectionProvider | struts.reflectionProvider | singleton | Provides reflection services, key place to plug in a custom expression language (since 2.1) |
com.opensymphony.xwork2.reflection.ReflectionContextFactory | struts.reflectionContextFactory | singleton | Creates reflection context maps used for reflection and expression language operations (since 2.1) |
com.opensymphony.xwork2.config.PackageProvider | N/A | singleton | All beans registered as PackageProvider implementations will be automatically included in configuration building (since 2.1) |
com.opensymphony.xwork2.util.PatternMatcher | struts.patternMatcher | singleton | Matches patterns, such as action names, generally used in configuration (since 2.1) |
Implementations are selected using the value of its associated property. That property is used to determine the implementation by:
Finally, this class overrides certain properties if dev mode is enabled:
struts.i18n.reload = true
struts.configuration.xml.reload = true
Nested Class Summary | |
---|---|
(package private) static class |
BeanSelectionProvider.ObjectFactoryDelegateFactory
|
Field Summary | |
---|---|
static String |
DEFAULT_BEAN_NAME
|
private static Logger |
LOG
|
Constructor Summary | |
---|---|
BeanSelectionProvider()
|
Method Summary | |
---|---|
(package private) void |
alias(Class type,
String key,
ContainerBuilder builder,
Properties props)
|
(package private) void |
alias(Class type,
String key,
ContainerBuilder builder,
Properties props,
Scope scope)
|
void |
destroy()
Called before removed from the configuration manager |
void |
init(Configuration configuration)
Initializes with the configuration |
void |
loadPackages()
Loads the packages for the configuration. |
boolean |
needsReload()
Tells whether the ContainerProvider should reload its configuration |
void |
register(ContainerBuilder builder,
LocatableProperties props)
Registers beans and properties for the Container |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_BEAN_NAME
private static final Logger LOG
Constructor Detail |
---|
public BeanSelectionProvider()
Method Detail |
---|
public void destroy()
ContainerProvider
destroy
in interface ContainerProvider
public void loadPackages() throws ConfigurationException
PackageProvider
loadPackages
in interface PackageProvider
ConfigurationException
public void init(Configuration configuration) throws ConfigurationException
ContainerProvider
init
in interface ContainerProvider
init
in interface PackageProvider
configuration
- The configuration
ConfigurationException
- If anything goes wrongpublic boolean needsReload()
ContainerProvider
needsReload
in interface ContainerProvider
needsReload
in interface PackageProvider
public void register(ContainerBuilder builder, LocatableProperties props)
ContainerProvider
register
in interface ContainerProvider
builder
- The builder to register beans withprops
- The properties to register constants withvoid alias(Class type, String key, ContainerBuilder builder, Properties props)
void alias(Class type, String key, ContainerBuilder builder, Properties props, Scope scope)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |