|
||||||||||
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 java.lang.String |
DEFINITIONS_FACTORY_CLASSNAME
Name of init property carrying factory class name. |
protected ComponentDefinitionsFactory |
factory
The real factory instance. |
protected java.util.Map |
properties
Initialization parameters. |
Constructor Summary | |
---|---|
ReloadableDefinitionsFactory(javax.servlet.ServletContext servletContext,
java.util.Map properties)
Constructor. |
|
ReloadableDefinitionsFactory(javax.servlet.ServletContext servletContext,
javax.servlet.ServletConfig servletConfig)
Constructor. |
Method Summary | |
---|---|
ComponentDefinitionsFactory |
createDefaultFactory(javax.servlet.ServletContext servletContext,
java.util.Map properties)
Create default Definition factory. |
ComponentDefinitionsFactory |
createFactory(javax.servlet.ServletContext servletContext,
java.util.Map properties)
Create Definition factory. |
ComponentDefinitionsFactory |
createFactoryFromClassname(javax.servlet.ServletContext servletContext,
java.util.Map properties,
java.lang.String classname)
Create Definition factory from provided classname. |
ComponentDefinition |
getDefinition(java.lang.String definitionName,
javax.servlet.ServletRequest request,
javax.servlet.ServletContext servletContext)
Get a definition by its name. |
ComponentDefinitionsFactory |
getFactory()
Get underlying factory instance. |
void |
initFactory(javax.servlet.ServletContext servletContext,
java.util.Map properties)
Init factory. |
void |
reload(javax.servlet.ServletContext servletContext)
Reload underlying factory. |
java.lang.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 java.util.Map properties
public static final java.lang.String DEFINITIONS_FACTORY_CLASSNAME
Constructor Detail |
---|
public ReloadableDefinitionsFactory(javax.servlet.ServletContext servletContext, javax.servlet.ServletConfig servletConfig) throws DefinitionsFactoryException
servletContext
- Our servlet context.servletConfig
- Our servlet config.
DefinitionsFactoryException
- If factory creation fail.public ReloadableDefinitionsFactory(javax.servlet.ServletContext servletContext, java.util.Map properties) throws DefinitionsFactoryException
servletContext
- Our servlet context.properties
- Map containing all properties.
DefinitionsFactoryException
- If factory creation fail.Method Detail |
---|
public ComponentDefinitionsFactory createFactoryFromClassname(javax.servlet.ServletContext servletContext, java.util.Map properties, java.lang.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(javax.servlet.ServletContext servletContext, java.util.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(javax.servlet.ServletContext servletContext, java.util.Map properties) throws DefinitionsFactoryException
servletContext
- Servlet Context passed to newly created factory.properties
- Map containing all properties.
DefinitionsFactoryException
public ComponentDefinition getDefinition(java.lang.String definitionName, javax.servlet.ServletRequest request, javax.servlet.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(javax.servlet.ServletContext servletContext) throws DefinitionsFactoryException
servletContext
- Current servlet context.
DefinitionsFactoryException
- If factory creation fails.public ComponentDefinitionsFactory getFactory()
public void initFactory(javax.servlet.ServletContext servletContext, java.util.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 java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |