|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.tiles.definition.ReloadableDefinitionsFactory
public class ReloadableDefinitionsFactory
A reloadable factory. This factory is the main entrance to any factory implementation. It takes in charge real implementation instance, and allows reloading by creating a new instance.
Field Summary | |
---|---|
static String |
DEFINITIONS_FACTORY_CLASSNAME
Name of init property carrying factory class name. |
protected ComponentDefinitionsFactory |
factory
The real factory instance. |
protected Map |
properties
Initialization parameters. |
Constructor Summary | |
---|---|
ReloadableDefinitionsFactory(ServletContext servletContext,
Map properties)
Constructor. |
|
ReloadableDefinitionsFactory(ServletContext servletContext,
ServletConfig servletConfig)
Constructor. |
Method Summary | |
---|---|
ComponentDefinitionsFactory |
createDefaultFactory(ServletContext servletContext,
Map properties)
Create default Definition factory. |
ComponentDefinitionsFactory |
createFactory(ServletContext servletContext,
Map properties)
Create Definition factory. |
ComponentDefinitionsFactory |
createFactoryFromClassname(ServletContext servletContext,
Map properties,
String classname)
Create Definition factory from provided classname. |
ComponentDefinition |
getDefinition(String definitionName,
ServletRequest request,
ServletContext servletContext)
Get a definition by its name. |
ComponentDefinitionsFactory |
getFactory()
Get underlying factory instance. |
void |
initFactory(ServletContext servletContext,
Map properties)
Init factory. |
void |
reload(ServletContext servletContext)
Reload underlying factory. |
String |
toString()
Return String representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ComponentDefinitionsFactory factory
protected Map properties
public static final String DEFINITIONS_FACTORY_CLASSNAME
Constructor Detail |
---|
public ReloadableDefinitionsFactory(ServletContext servletContext, ServletConfig servletConfig) throws DefinitionsFactoryException
servletContext
- Our servlet context.servletConfig
- Our servlet config.
DefinitionsFactoryException
- If factory creation fail.public ReloadableDefinitionsFactory(ServletContext servletContext, Map properties) throws DefinitionsFactoryException
servletContext
- Our servlet context.properties
- Map containing all properties.
DefinitionsFactoryException
- If factory creation fail.Method Detail |
---|
public ComponentDefinitionsFactory createFactoryFromClassname(ServletContext servletContext, Map properties, String classname) throws DefinitionsFactoryException
classname
- Class name of the factory to create.servletContext
- Servlet Context passed to newly created factory.properties
- Map of name/property passed to newly created factory.
DefinitionsFactoryException
- If an error occur while initializing factorypublic ComponentDefinitionsFactory createDefaultFactory(ServletContext servletContext, Map properties) throws DefinitionsFactoryException
servletContext
- Servlet Context passed to newly created factory.properties
- Map of name/property passed to newly created factory.
DefinitionsFactoryException
- If an error occur while initializing factorypublic ComponentDefinitionsFactory createFactory(ServletContext servletContext, Map properties) throws DefinitionsFactoryException
servletContext
- Servlet Context passed to newly created factory.properties
- Map containing all properties.
DefinitionsFactoryException
public ComponentDefinition getDefinition(String definitionName, ServletRequest request, ServletContext servletContext) throws FactoryNotFoundException, DefinitionsFactoryException
getDefinition
in interface ComponentDefinitionsFactory
definitionName
- Name of requested definition.request
- Current servlet request.servletContext
- Current servlet context.
FactoryNotFoundException
- Can't find definition factory.
DefinitionsFactoryException
- General error in factory while getting definition.public void reload(ServletContext servletContext) throws DefinitionsFactoryException
servletContext
- Current servlet context.
DefinitionsFactoryException
- If factory creation fails.public ComponentDefinitionsFactory getFactory()
public void initFactory(ServletContext servletContext, Map properties) throws DefinitionsFactoryException
initFactory
in interface ComponentDefinitionsFactory
servletContext
- Servlet Context passed to newly created factory.properties
- Map of name/property passed to newly created factory.
Map can contain more properties than requested.
DefinitionsFactoryException
- An error occur during initialization.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |