TilesUtilStrutsModulesImpl (Struts 1.3.10 API)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.tiles
Class TilesUtilStrutsModulesImpl

    java.lang.Object
      org.apache.struts.tiles.TilesUtilImpl
          org.apache.struts.tiles.TilesUtilStrutsImpl
              org.apache.struts.tiles.TilesUtilStrutsModulesImpl

All Implemented Interfaces:
  Serializable

    public class TilesUtilStrutsModulesImpl

extends TilesUtilStrutsImpl

Implementation of TilesUtil for Struts multi modules. Methods in this implementation are aware of the Struts module context.

- The method getFactory(...) returns the factory for the current Struts module.
- Methods doForward() and doInclude() use their counterparts in the current RequestProcessor (todo).
- The method createFactory(...) creates a factory for the current module and stores it under the appropriate property name.

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.apache.struts.tiles.TilesUtilImpl
`DEFINITIONS_FACTORY, log`

Constructor Summary
`TilesUtilStrutsModulesImpl()`

Method Summary
`void` | `doForward(String uri, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)` Do a forward using request dispatcher.
`void` | `doInclude(String uri, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)` Do an include using request dispatcher.
`DefinitionsFactory` | `getDefinitionsFactory(ServletContext servletContext, ModuleConfig moduleConfig)` Get definition factory for the module attached to specified moduleConfig.
`DefinitionsFactory` | `getDefinitionsFactory(ServletRequest request, ServletContext servletContext)` Get the definition factory from appropriate servlet context.
`protected ModuleConfig` | `getModuleConfig(HttpServletRequest request, ServletContext servletContext)` Get the current ModuleConfig.
`protected TilesRequestProcessor` | `getRequestProcessor(HttpServletRequest request, ServletContext servletContext)` Get Tiles RequestProcessor associated to the current module.
`protected void` | `makeDefinitionsFactoryAccessible(DefinitionsFactory factory, ServletContext servletContext)` Make definition factory accessible to tags.

Methods inherited from class org.apache.struts.tiles.TilesUtilImpl
`createDefinitionFactoryInstance, createDefinitionsFactory, doInclude`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TilesUtilStrutsModulesImpl

    public TilesUtilStrutsModulesImpl()

Method Detail

### doForward

    public void doForward(String uri,
                          HttpServletRequest request,
                          HttpServletResponse response,
                          ServletContext servletContext)
                   throws IOException,
                          ServletException

  Do a forward using request dispatcher. This method is used by the Tiles package anytime a forward is required.

  Overrides:
    `doForward` in class `TilesUtilImpl`
  Parameters:
    `uri` - Uri or Definition name to forward.
    `request` - Current page request.
    `response` - Current page response.
    `servletContext` - Current servlet context.
  Throws:
    `IOException`
    `ServletException`

### doInclude

    public void doInclude(String uri,
                          HttpServletRequest request,
                          HttpServletResponse response,
                          ServletContext servletContext)
                   throws IOException,
                          ServletException

  Do an include using request dispatcher. This method is used by the Tiles package anytime an include is required.

  Overrides:
    `doInclude` in class `TilesUtilImpl`
  Parameters:
    `uri` - Uri or Definition name to forward.
    `request` - Current page request.
    `response` - Current page response.
    `servletContext` - Current servlet context.
  Throws:
    `IOException`
    `ServletException`

### getDefinitionsFactory

    public DefinitionsFactory getDefinitionsFactory(ServletRequest request,
                                                    ServletContext servletContext)

  Get the definition factory from appropriate servlet context.

  Overrides:
    `getDefinitionsFactory` in class `TilesUtilImpl`
  Parameters:
    `request` - Current request.
    `servletContext` - Current servlet context.
  Returns:
    Definitions factory or null if not found.

### getDefinitionsFactory

    public DefinitionsFactory getDefinitionsFactory(ServletContext servletContext,
                                                    ModuleConfig moduleConfig)

  Get definition factory for the module attached to specified moduleConfig.

  Overrides:
    `getDefinitionsFactory` in class `TilesUtilStrutsImpl`
  Parameters:
    `servletContext` - Current servlet context.
    `moduleConfig` - Module config of the module for which the factory is requested.
  Returns:
    Definitions factory or null if not found.

### makeDefinitionsFactoryAccessible

    protected void makeDefinitionsFactoryAccessible(DefinitionsFactory factory,
                                                    ServletContext servletContext)

  Make definition factory accessible to tags. Factory is stored in servlet context.

  Overrides:
    `makeDefinitionsFactoryAccessible` in class `TilesUtilImpl`
  Parameters:
    `factory` - Factory to be made accessible.
    `servletContext` - Current servlet context.

### getRequestProcessor

    protected TilesRequestProcessor getRequestProcessor(HttpServletRequest request,
                                                        ServletContext servletContext)

  Get Tiles RequestProcessor associated to the current module.

  Parameters:
    `request` - Current request.
    `servletContext` - Current servlet context.
  Returns:
    The `TilesRequestProcessor` for the current request.

### getModuleConfig

    protected ModuleConfig getModuleConfig(HttpServletRequest request,
                                           ServletContext servletContext)

  Get the current ModuleConfig.
  Lookup in the request and do selectModule if not found. The side effect is, that the ModuleConfig object is set in the request if it was not present.

  Parameters:
    `request` - Current request.
    `servletContext` - Current servlet context*.
  Returns:
    The ModuleConfig for current request.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.