Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper
public class ComponentDefinitionsFactoryWrapper
extends java.lang.Object
implements DefinitionsFactory
Field Summary | |
private DefinitionsFactoryConfig |
|
private ComponentDefinitionsFactory |
|
Constructor Summary | |
| |
|
Method Summary | |
static Map |
|
protected ComponentDefinitionsFactory |
|
void |
|
DefinitionsFactoryConfig |
|
ComponentDefinition |
|
ComponentDefinitionsFactory |
|
void |
|
void |
|
String |
|
public ComponentDefinitionsFactoryWrapper()
Constructor. Create new wrapper. The config object passed to init method should reference a factory implementingComponentDefinitionsFactory
.
public ComponentDefinitionsFactoryWrapper(ComponentDefinitionsFactory factory)
Constructor. Create new wrapper for specified factory.
- Parameters:
factory
- The factory to create a wrapper for.
public static Map createConfigMap(DefinitionsFactoryConfig config)
Create map of configuration attributes from configuration object. Mapping is done between old names and new names.
- Parameters:
config
- The DefinitionsFactoryConfig to use.
- Returns:
- Map Map of name/value pairs.
protected ComponentDefinitionsFactory createFactoryInstance(String classname) throws DefinitionsFactoryException
Create Definition factory from provided classname which must implementComponentDefinitionsFactory
. Factory class must extendDefinitionsFactory
.
- Parameters:
classname
- Class name of the factory to create.
- Returns:
- newly created factory.
- Throws:
DefinitionsFactoryException
- If an error occur while initializing factory
public void destroy()
Do nothing because old life cycle has no equivalent.
- Specified by:
- destroy in interface DefinitionsFactory
public DefinitionsFactoryConfig getConfig()
Get underlying factory configuration.
- Specified by:
- getConfig in interface DefinitionsFactory
- Returns:
- DefinitionsFactoryConfig.
public ComponentDefinition getDefinition(String name, ServletRequest request, ServletContext servletContext) throws NoSuchDefinitionException, DefinitionsFactoryException
Get requested definition.
- Specified by:
- getDefinition in interface DefinitionsFactory
- Parameters:
name
- Name of the definition.request
- The request we are processing.servletContext
- Our servlet context.
- Returns:
- ComponentDefition
public ComponentDefinitionsFactory getInternalFactory()
Get internal factory.
- Returns:
- The internal ComponentDefitionsFactory.
public void init(DefinitionsFactoryConfig config, ServletContext servletContext) throws DefinitionsFactoryException
Call underlying factory init method.
- Specified by:
- init in interface DefinitionsFactory
- Parameters:
config
- DefinitionsFactoryConfig.servletContext
- Our servlet context.
public void setConfig(DefinitionsFactoryConfig config, ServletContext servletContext) throws DefinitionsFactoryException
Set underlying factory configuration.
- Specified by:
- setConfig in interface DefinitionsFactory
- Parameters:
config
- DefinitionsFactoryConfig to use.servletContext
- Our servlet context.
public String toString()
Return String representation. Calls toString() on underlying factory.
- Returns:
- String representation.