org.apache.struts.tiles
public class TilesPlugin extends Object implements PlugIn
moduleAware=false
in each
plugin properties. In this case, the definition factory
configuration file is read by the first Tiles plugin to be initialized. The order is
determined by the order of modules declaration in web.xml. The first module
is always the default one if it exists.
The plugin should be declared in each struts-config.xml file in order to
properly initialize the request processor.Since: Struts 1.1
Field Summary | |
---|---|
protected PlugInConfig | currentPlugInConfigObject
The plugin config object provided by the ActionServlet initializing
this plugin. |
protected DefinitionsFactory | definitionFactory
Associated definition factory. |
protected static Log | log
Commons Logging instance. |
protected boolean | moduleAware
Is the factory module aware? |
protected String | tilesUtilImplClassname
Tiles util implementation classname. |
Method Summary | |
---|---|
void | destroy()
End plugin. |
protected Map | findStrutsPlugInConfigProperties(ActionServlet servlet, ModuleConfig config)
Find original properties set in the Struts PlugInConfig object.
|
String | getTilesUtilImplClassname()
Get Tiles util implemention classname. |
void | init(ActionServlet servlet, ModuleConfig moduleConfig) Receive notification that the specified module is being started up. |
void | initDefinitionsFactory(ServletContext servletContext, ModuleConfig moduleConfig, DefinitionsFactoryConfig factoryConfig)
Initialize the DefinitionsFactory this module will use. |
protected void | initRequestProcessorClass(ModuleConfig config)
Set RequestProcessor to appropriate Tiles RequestProcessor.
|
void | initTilesUtil()
Set TilesUtil implementation according to properties 'tilesUtilImplClassname'
and 'moduleAware'. |
boolean | isModuleAware()
Get the module aware flag. |
protected DefinitionsFactoryConfig | readFactoryConfig(ActionServlet servlet, ModuleConfig config)
Create FactoryConfig and initialize it from web.xml and struts-config.xml.
|
void | setCurrentPlugInConfigObject(PlugInConfig plugInConfigObject)
Method used by the ActionServlet initializing this plugin.
|
void | setModuleAware(boolean moduleAware)
Set the module aware flag.
|
void | setTilesUtilImplClassname(String tilesUtilImplClassname)
Set Tiles util implemention classname.
|
Parameters: servlet ActionServlet that is managing all the modules in this web application. config ModuleConfig for the module with which this plug in is associated.
Throws: ServletException if this PlugIn
cannot
be successfully initialized.
Returns: The classname or null
if none is set.
Receive notification that the specified module is being started up.
Parameters: servlet ActionServlet that is managing all the modules in this web application. moduleConfig ModuleConfig for the module with which this plugin is associated.
Throws: ServletException if this PlugIn
cannot
be successfully initialized.
Parameters: servletContext moduleConfig factoryConfig
Throws: ServletException
Parameters: config ModuleConfig for the module with which this plugin is associated.
Throws: ServletException On errors.
Throws: ServletException
Returns: true
: user wants a single factory instance,
false:
user wants multiple factory instances (one per module with Struts)
Parameters: servlet ActionServlet that is managing all the modules in this web application. config ModuleConfig for the module with which this plugin is associated.
Throws: ServletException if this PlugIn
cannot
be successfully initialized.
Parameters: plugInConfigObject PlugInConfig.
tilesUtilImplClassname
is not
set.Parameters: moduleAware true
: user wants a single factory instance,
false:
user wants multiple factory instances (one per module with Struts)
moduleAware
will not be used anymore.Parameters: tilesUtilImplClassname Classname.