| java.lang.Object org.apache.struts.tiles.xmlDefinition.FactorySet
All known Subclasses: org.apache.struts.tiles.xmlDefinition.I18nFactorySet,
FactorySet | abstract public class FactorySet implements ComponentDefinitionsFactory(Code) | | Component Definitions factory.
This factory contains several factories identified by a key. The
getDefinition() method first looks for the factory key, retrieves or creates this
factory and then calls its getDefinition().
|
Constructor Summary | |
public | FactorySet() Constructor. |
Method Summary | |
abstract protected DefinitionsFactory | createFactory(Object key, ServletRequest request, ServletContext servletContext) Create a factory for specified key. | abstract protected DefinitionsFactory | getDefaultFactory() Get default factory. | public ComponentDefinition | getDefinition(String name, ServletRequest request, ServletContext servletContext) Get a definition by its name. | abstract protected Object | getDefinitionsFactoryKey(String name, ServletRequest request, ServletContext servletContext) Extract key that will be used to get the sub factory.
Parameters: name - Name of requested definition. Parameters: request - Current servlet request. Parameters: servletContext - Current servlet context. | protected DefinitionsFactory | getFactory(Object key, ServletRequest request, ServletContext servletContext) Get a factory by its key.
If key is null , return defaultFactory.
Search in loaded factories. | abstract public void | initFactory(ServletContext servletContext, Map properties) Init factory set. | public String | toString() Return String representation. |
factories | protected Map factories(Code) | | Loaded factories
|
FactorySet | public FactorySet()(Code) | | Constructor.
|
createFactory | abstract protected DefinitionsFactory createFactory(Object key, ServletRequest request, ServletContext servletContext) throws DefinitionsFactoryException(Code) | | Create a factory for specified key.
This method is called by getFactory() when the requested factory doesn't already exist.
Must return a factory, or a default one.
Real implementation needs to provide this method.
Parameters: key - Key of requested definition. Parameters: request - Current servlet request. Parameters: servletContext - Current servlet context throws: DefinitionsFactoryException - If an error occur while creating factory. |
getDefinitionsFactoryKey | abstract protected Object getDefinitionsFactoryKey(String name, ServletRequest request, ServletContext servletContext)(Code) | | Extract key that will be used to get the sub factory.
Parameters: name - Name of requested definition. Parameters: request - Current servlet request. Parameters: servletContext - Current servlet context. Object. |
initFactory | abstract public void initFactory(ServletContext servletContext, Map properties) throws DefinitionsFactoryException(Code) | | Init factory set.
Parameters: servletContext - Current servlet context Parameters: properties - properties used to initialized factory set; |
toString | public String toString()(Code) | | Return String representation.
String representation. |
|
|