TilesUtilImpl (Struts Tiles 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 TilesUtilImpl

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

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  TilesUtilStrutsImpl

    public class TilesUtilImpl

extends Object
implements Serializable

Default implementation of TilesUtil. This class contains default implementation of utilities. This implementation is intended to be used without Struts.

See Also:
  Serialized Form

Field Summary
`static String` | `DEFINITIONS_FACTORY` Constant name used to store factory in servlet context
`protected static Log` | `log` Commons Logging instance.

Constructor Summary
`TilesUtilImpl()`

Method Summary
`protected DefinitionsFactory` | `createDefinitionFactoryInstance(String classname)` Create Definition factory of specified classname.
`DefinitionsFactory` | `createDefinitionsFactory(ServletContext servletContext, DefinitionsFactoryConfig factoryConfig)` Create Definition factory from specified configuration object.
`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.
`void` | `doInclude(String uri, PageContext pageContext, boolean flush)` Do an include using PageContext.include().
`DefinitionsFactory` | `getDefinitionsFactory(ServletRequest request, ServletContext servletContext)` Get definition factory from appropriate servlet context.
`protected void` | `makeDefinitionsFactoryAccessible(DefinitionsFactory factory, ServletContext servletContext)` Make definition factory accessible to Tags.

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

Field Detail

### log

    protected static final Log log

  Commons Logging instance.

### DEFINITIONS_FACTORY

    public static final String DEFINITIONS_FACTORY

  Constant name used to store factory in servlet context

  See Also:
    Constant Field Values

Constructor Detail

### TilesUtilImpl

    public TilesUtilImpl()

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.

  Parameters:
    `uri` - Uri or Definition name to forward.
    `request` - Current page request.
    `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 when an include is required. The Tiles package can use indifferently any form of this method.

  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,
                          PageContext pageContext,
                          boolean flush)
                   throws IOException,
                          ServletException

  Do an include using PageContext.include(). This method is used by the Tiles package when an include is required. The Tiles package can use indifferently any form of this method.

  Parameters:
    `uri` - Uri or Definition name to forward.
    `pageContext` - Current page context.
    `flush` - If the writer should be flushed before the include
  Throws:
    `IOException`
    `ServletException`

### getDefinitionsFactory

    public DefinitionsFactory getDefinitionsFactory(ServletRequest request,
                                                    ServletContext servletContext)

  Get definition factory from appropriate servlet context.

  Returns:
    Definitions factory or `null` if not found.

### createDefinitionsFactory

    public DefinitionsFactory createDefinitionsFactory(ServletContext servletContext,
                                                       DefinitionsFactoryConfig factoryConfig)
                                                throws DefinitionsFactoryException

  Create Definition factory from specified configuration object. Create an instance of the factory with the class specified in the config object. Then, initialize this factory and finally store the factory in appropriate context by calling `makeDefinitionsFactoryAccessible(DefinitionsFactory, ServletContext)`. Factory creation is done by `createDefinitionFactoryInstance(String)`.

  Parameters:
    `servletContext` - Servlet Context passed to newly created factory.
    `factoryConfig` - Configuration object passed to factory.
  Returns:
    newly created factory of type specified in the config object.
  Throws:
    `DefinitionsFactoryException` - If an error occur while initializing factory

### createDefinitionFactoryInstance

    protected DefinitionsFactory createDefinitionFactoryInstance(String classname)
                                                          throws DefinitionsFactoryException

  Create Definition factory of specified classname. Factory class must extend the `DefinitionsFactory` class. The factory is wrapped appropriately with `ComponentDefinitionsFactoryWrapper` if it is an instance of the deprecated ComponentDefinitionsFactory class.

  Parameters:
    `classname` - Class name of the factory to create.
  Returns:
    newly created factory.
  Throws:
    `DefinitionsFactoryException` - If an error occur while initializing factory

### makeDefinitionsFactoryAccessible

    protected void makeDefinitionsFactoryAccessible(DefinitionsFactory factory,
                                                    ServletContext servletContext)

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

  Parameters:
    `factory` - Factory to be made accessible.
    `servletContext` - Current servlet context.

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.