org.apache.struts.tiles
クラス TilesUtil

java.lang.Object
  拡張org.apache.struts.tiles.TilesUtil
直系の既知のサブクラス:
DefinitionsUtil

public class TilesUtil
extends java.lang.Object

Class containing utility methods for Tiles. Methods of this class are static and thereby accessible from anywhere. The underlying implementation can be changed with setTilesUtil(TilesUtilImpl).
Real implementation classes should derive from the TilesUtilImpl class.
Some methods are specified to throw the UnsupportedOperationException if the underlying implementation doesn't support the operation.


フィールドの概要
private static boolean implAlreadySet
          Flag to know if internal implementation has been set by the setter method
protected static org.apache.commons.logging.Log log
          Commons Logging instance.
protected static TilesUtilImpl tilesUtilImpl
          The implementation of tilesUtilImpl
 
コンストラクタの概要
TilesUtil()
           
 
メソッドの概要
static DefinitionsFactory createDefinitionsFactory(javax.servlet.ServletContext servletContext, DefinitionsFactoryConfig factoryConfig)
          Create Definition factory from specified configuration object.
static 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.
static 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.
static void doInclude(java.lang.String uri, javax.servlet.jsp.PageContext pageContext)
          Do an include using PageContext.include().
static ComponentDefinition getDefinition(java.lang.String definitionName, javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext)
          Get a definition by its name.
static DefinitionsFactory getDefinitionsFactory(javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext)
          Get definition factory from appropriate servlet context.
static TilesUtilImpl getTilesUtil()
          Get the real implementation.
(パッケージプライベート) static boolean isTilesUtilImplSet()
          Getter to know if the underlying implementation is already set to another value than the default value.
static void setTilesUtil(TilesUtilImpl tilesUtil)
          Set the real implementation.
protected static void testReset()
          Reset internal state.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

log

protected static org.apache.commons.logging.Log log
Commons Logging instance.


tilesUtilImpl

protected static TilesUtilImpl tilesUtilImpl
The implementation of tilesUtilImpl


implAlreadySet

private static boolean implAlreadySet
Flag to know if internal implementation has been set by the setter method

コンストラクタの詳細

TilesUtil

public TilesUtil()
メソッドの詳細

getTilesUtil

public static TilesUtilImpl getTilesUtil()
Get the real implementation.

戻り値:
The underlying implementation object.

setTilesUtil

public static void setTilesUtil(TilesUtilImpl tilesUtil)
Set the real implementation. This method should be called only once. Successive calls have no effect.

パラメータ:
tilesUtil - The implementaion.

isTilesUtilImplSet

static boolean isTilesUtilImplSet()
Getter to know if the underlying implementation is already set to another value than the default value.

戻り値:
true if setTilesUtil(org.apache.struts.tiles.TilesUtilImpl) has already been called.

doForward

public static 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.

パラメータ:
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 static 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 when an include is required. The Tiles package can use indifferently any form of this method.

パラメータ:
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 static void doInclude(java.lang.String uri,
                             javax.servlet.jsp.PageContext pageContext)
                      throws java.io.IOException,
                             javax.servlet.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.

パラメータ:
uri - Uri or Definition name to forward.
pageContext - Current page context.
例外:
java.io.IOException
javax.servlet.ServletException

getDefinitionsFactory

public static DefinitionsFactory getDefinitionsFactory(javax.servlet.ServletRequest request,
                                                       javax.servlet.ServletContext servletContext)
Get definition factory from appropriate servlet context.

戻り値:
Definitions factory or null if not found.

createDefinitionsFactory

public static 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 contain the factory classname to use. Factory is made accessible from tags.

Fallback of several factory creation methods.

パラメータ:
servletContext - Servlet Context passed to newly created factory.
factoryConfig - Configuration object passed to factory.
戻り値:
newly created factory of type ConfigurableDefinitionsFactory.
例外:
DefinitionsFactoryException - If an error occur while initializing factory

getDefinition

public static ComponentDefinition getDefinition(java.lang.String definitionName,
                                                javax.servlet.ServletRequest request,
                                                javax.servlet.ServletContext servletContext)
                                         throws FactoryNotFoundException,
                                                DefinitionsFactoryException
Get a definition by its name. First, retrieve definition factory and then get requested definition. Throw appropriate exception if definition or definition factory is not found.

パラメータ:
definitionName - Name of requested definition.
request - Current servelet request.
servletContext - current servlet context.
例外:
FactoryNotFoundException - Can't find definition factory.
DefinitionsFactoryException - General error in factory while getting definition.
NoSuchDefinitionException - No definition found for specified name

testReset

protected static void testReset()
Reset internal state. This method is used by test suites to reset the class to its original state.



このドキュメントは、Ja-Jakartaにより訳されました。コメントがある場合は、report@jajakarta.orgまでお願いします。
Copyright (C) 2000-2004 - Apache Software Foundation