|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper
public class ComponentDefinitionsFactoryWrapper
Wrapper from new definition factory interface to old interface. This class provides mapping from the old interface's life cycle to the new life cycle.
Constructor Summary | |
---|---|
ComponentDefinitionsFactoryWrapper()
Constructor. |
|
ComponentDefinitionsFactoryWrapper(ComponentDefinitionsFactory factory)
Constructor. |
Method Summary | |
---|---|
static java.util.Map |
createConfigMap(DefinitionsFactoryConfig config)
Create map of configuration attributes from configuration object. |
protected ComponentDefinitionsFactory |
createFactoryInstance(java.lang.String classname)
Create Definition factory from provided classname which must implement ComponentDefinitionsFactory . |
void |
destroy()
Do nothing because old life cycle has no equivalent. |
DefinitionsFactoryConfig |
getConfig()
Get underlying factory configuration. |
ComponentDefinition |
getDefinition(java.lang.String name,
javax.servlet.ServletRequest request,
javax.servlet.ServletContext servletContext)
Get requested definition. |
ComponentDefinitionsFactory |
getInternalFactory()
Get internal factory. |
void |
init(DefinitionsFactoryConfig config,
javax.servlet.ServletContext servletContext)
Call underlying factory init method. |
void |
setConfig(DefinitionsFactoryConfig config,
javax.servlet.ServletContext servletContext)
Set underlying factory configuration. |
java.lang.String |
toString()
Return String representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ComponentDefinitionsFactoryWrapper(ComponentDefinitionsFactory factory)
factory
- The factory to create a wrapper for.public ComponentDefinitionsFactoryWrapper()
ComponentDefinitionsFactory
.
Method Detail |
---|
public ComponentDefinition getDefinition(java.lang.String name, javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext) throws NoSuchDefinitionException, DefinitionsFactoryException
getDefinition
in interface DefinitionsFactory
name
- Name of the definition.request
- The request we are processing.servletContext
- Our servlet context.
NoSuchDefinitionException
- No definition found for specified name
Implementation can throw more accurate exception as a subclass of this exception
DefinitionsFactoryException
- An error occur while getting definition.public void init(DefinitionsFactoryConfig config, javax.servlet.ServletContext servletContext) throws DefinitionsFactoryException
init
in interface DefinitionsFactory
config
- DefinitionsFactoryConfig.servletContext
- Our servlet context.
DefinitionsFactoryException
- An error occur during initialization.public void destroy()
destroy
in interface DefinitionsFactory
public void setConfig(DefinitionsFactoryConfig config, javax.servlet.ServletContext servletContext) throws DefinitionsFactoryException
setConfig
in interface DefinitionsFactory
config
- DefinitionsFactoryConfig to use.servletContext
- Our servlet context.
DefinitionsFactoryException
- An error occur during initialization.public DefinitionsFactoryConfig getConfig()
getConfig
in interface DefinitionsFactory
public ComponentDefinitionsFactory getInternalFactory()
protected ComponentDefinitionsFactory createFactoryInstance(java.lang.String classname) throws DefinitionsFactoryException
ComponentDefinitionsFactory
.
Factory class must extend DefinitionsFactory
.
classname
- Class name of the factory to create.
DefinitionsFactoryException
- If an error occur while initializing factorypublic java.lang.String toString()
toString
in class java.lang.Object
public static java.util.Map createConfigMap(DefinitionsFactoryConfig config)
config
- The DefinitionsFactoryConfig to use.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |