Save This Page
Home » struts-2.0.11.2-src » org.apache » struts2 » config » [javadoc | source]
org.apache.struts2.config
public class: BeanSelectionProvider [javadoc | source]
java.lang.Object
   org.apache.struts2.config.BeanSelectionProvider

All Implemented Interfaces:
    com.opensymphony.xwork2.config.ConfigurationProvider

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 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

Implementations are selected using the value of its associated property. That property is used to determine the implementation by:

  1. Trying to find an existing bean by that name in the container
  2. Trying to find a class by that name, then creating a new bean factory for it
  3. Creating a new delegation bean factory that delegates to the configured ObjectFactory at runtime

Finally, this class overrides certain properties if dev mode is enabled:

Nested Class Summary:
class  BeanSelectionProvider.ObjectFactoryDelegateFactory   
Field Summary
public static final  String DEFAULT_BEAN_NAME     
Method from org.apache.struts2.config.BeanSelectionProvider Summary:
alias,   alias,   destroy,   init,   loadPackages,   needsReload,   register
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.config.BeanSelectionProvider Detail:
  void alias(Class type,
    String key,
    ContainerBuilder builder,
    Properties props) 
  void alias(Class type,
    String key,
    ContainerBuilder builder,
    Properties props,
    Scope scope) 
 public  void destroy() 
 public  void init(Configuration configuration) throws ConfigurationException 
 public  void loadPackages() throws ConfigurationException 
 public boolean needsReload() 
 public  void register(ContainerBuilder builder,
    LocatableProperties props)