public class ComponentDefinitionsFactoryWrapper extends java.lang.Object implements DefinitionsFactory
| Constructor and Description |
|---|
ComponentDefinitionsFactoryWrapper()
Constructor.
|
ComponentDefinitionsFactoryWrapper(ComponentDefinitionsFactory factory)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public ComponentDefinitionsFactoryWrapper(ComponentDefinitionsFactory factory)
factory - The factory to create a wrapper for.public ComponentDefinitionsFactoryWrapper()
ComponentDefinitionsFactory.public ComponentDefinition getDefinition(java.lang.String name, javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext) throws NoSuchDefinitionException, DefinitionsFactoryException
getDefinition in interface DefinitionsFactoryname - 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 exceptionDefinitionsFactoryException - An error occur while getting definition.public void init(DefinitionsFactoryConfig config, javax.servlet.ServletContext servletContext) throws DefinitionsFactoryException
init in interface DefinitionsFactoryconfig - DefinitionsFactoryConfig.servletContext - Our servlet context.DefinitionsFactoryException - An error occur during initialization.public void destroy()
destroy in interface DefinitionsFactorypublic void setConfig(DefinitionsFactoryConfig config, javax.servlet.ServletContext servletContext) throws DefinitionsFactoryException
setConfig in interface DefinitionsFactoryconfig - DefinitionsFactoryConfig to use.servletContext - Our servlet context.DefinitionsFactoryException - An error occur during initialization.public DefinitionsFactoryConfig getConfig()
getConfig in interface DefinitionsFactorypublic 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.Objectpublic static java.util.Map createConfigMap(DefinitionsFactoryConfig config)
config - The DefinitionsFactoryConfig to use.Copyright © 2000–2024 Apache Software Foundation. All rights reserved.