org.apache.struts.tiles
Interface TilesUtilInterface

All Known Implementing Classes:
DefaultTilesUtilImpl, StrutsModulesTilesUtilImpl

public interface TilesUtilInterface

Class containing utilities for Tiles.


Method Summary
 DefinitionsFactory createDefinitionsFactory(javax.servlet.ServletContext servletContext, DefinitionsFactoryConfig factoryConfig)
          Create Definition factory from specified configuration object.
 void doForward(java.lang.String uri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext)
          Do a forward using request dispatcher.
 void doInclude(java.lang.String uri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext)
          Do an include using request dispatcher.
 DefinitionsFactory getDefaultDefinitionsFactory(javax.servlet.ServletContext servletContext)
          Get the default definition factory from appropriate servlet context.
 DefinitionsFactory getDefinitionsFactory(javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext)
          Get definition factory from appropriate servlet context.
 

Method Detail

doForward

public void doForward(java.lang.String uri,
                      javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response,
                      javax.servlet.ServletContext servletContext)
               throws java.io.IOException,
                      javax.servlet.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
response - Current page response
servletContext - Current servlet context
java.io.IOException
javax.servlet.ServletException

doInclude

public void doInclude(java.lang.String uri,
                      javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response,
                      javax.servlet.ServletContext servletContext)
               throws java.io.IOException,
                      javax.servlet.ServletException
Do an include using request dispatcher. This method is used by the Tiles package anytime an include is required.

Parameters:
uri - Uri or Definition name to forward
request - Current page request
response - Current page response
servletContext - Current servlet context
java.io.IOException
javax.servlet.ServletException

getDefaultDefinitionsFactory

public DefinitionsFactory getDefaultDefinitionsFactory(javax.servlet.ServletContext servletContext)
Get the default definition factory from appropriate servlet context.

Parameters:
servletContext - Current servlet context
Returns:
Definitions factory or null if not found.

getDefinitionsFactory

public DefinitionsFactory getDefinitionsFactory(javax.servlet.ServletRequest request,
                                                javax.servlet.ServletContext servletContext)
Get definition factory from appropriate servlet context. Implementation can use the request to select the factory.

Parameters:
servletContext - Current servlet context
Returns:
Definitions factory or null if not found.

createDefinitionsFactory

public DefinitionsFactory createDefinitionsFactory(javax.servlet.ServletContext servletContext,
                                                   DefinitionsFactoryConfig factoryConfig)
                                            throws DefinitionsFactoryException
Create Definition factory from specified configuration object. Create a ConfigurableDefinitionsFactory and initialize it with the configuration object. This later can contains the factory classname to use. Factory is made accessible from tags.

Fallback of several factory creation methods.

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


Copyright 2000-2002 - Cedric Dumoulin and Apache Software Foundation