|
||||||||||
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 Map |
createConfigMap(DefinitionsFactoryConfig config)
Create map of configuration attributes from configuration object. |
protected ComponentDefinitionsFactory |
createFactoryInstance(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(String name,
ServletRequest request,
ServletContext servletContext)
Get requested definition. |
ComponentDefinitionsFactory |
getInternalFactory()
Get internal factory. |
void |
init(DefinitionsFactoryConfig config,
ServletContext servletContext)
Call underlying factory init method. |
void |
setConfig(DefinitionsFactoryConfig config,
ServletContext servletContext)
Set underlying factory configuration. |
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(String name, ServletRequest request, 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, 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, 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(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 String toString()
toString
in class Object
public static 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 |