org.apache.struts.tiles
インタフェース DefinitionsFactory

すべてのスーパーインタフェース:
java.io.Serializable
既知の実装クラスの一覧:
ComponentDefinitionsFactoryWrapper

public interface DefinitionsFactory
extends java.io.Serializable

Tiles Definition factory. This interface replace old ComponentDefinitionsFactory. Main method getDefinition() is exactly the same. Initialization method change. This interface allows to retrieve a definition by its name, independently of the factory implementation. Object life cycle is as follow:

Implementation must be Serializable, in order to be compliant with web Container having this constraint (Weblogic 6.x).


メソッドの概要
 void destroy()
          Receive notification that the factory is being shut down.
 DefinitionsFactoryConfig getConfig()
          Get factory configuration.
 ComponentDefinition getDefinition(java.lang.String name, javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext)
          Get a definition by its name.
 void init(DefinitionsFactoryConfig config, javax.servlet.ServletContext servletContext)
          Init definition factory.
 void setConfig(DefinitionsFactoryConfig config, javax.servlet.ServletContext servletContext)
          Set factory configuration.
 

メソッドの詳細

getDefinition

public ComponentDefinition getDefinition(java.lang.String name,
                                         javax.servlet.ServletRequest request,
                                         javax.servlet.ServletContext servletContext)
                                  throws NoSuchDefinitionException,
                                         DefinitionsFactoryException
Get a definition by its name.

パラメータ:
name - Name of requested definition.
request - Current servelet request
servletContext - current servlet context
例外:
DefinitionsFactoryException - An error occur while getting definition.
NoSuchDefinitionException - No definition found for specified name Implementation can throw more accurate exception as a subclass of this exception

init

public void init(DefinitionsFactoryConfig config,
                 javax.servlet.ServletContext servletContext)
          throws DefinitionsFactoryException
Init definition factory. This method is called immediately after factory creation, and prior any call to setConfig().

パラメータ:
config - Configuration object used to set factory configuration.
servletContext - Servlet Context passed to factory.
例外:
DefinitionsFactoryException - An error occur during initialization.

destroy

public void destroy()

Receive notification that the factory is being shut down.


setConfig

public void setConfig(DefinitionsFactoryConfig config,
                      javax.servlet.ServletContext servletContext)
               throws DefinitionsFactoryException
Set factory configuration. This method is used to change factory configuration. This method is optional, and can send an exception if implementation doesn't allow change in configuration.

パラメータ:
config - Configuration object used to set factory configuration.
servletContext - Servlet Context passed to factory.
例外:
DefinitionsFactoryException - An error occur during initialization.

getConfig

public DefinitionsFactoryConfig getConfig()
Get factory configuration.

戻り値:
TilesConfig


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