org.apache.struts.tiles.xmlDefinition
Class DefinitionsFactory

java.lang.Object
  |
  +--org.apache.struts.tiles.xmlDefinition.DefinitionsFactory
All Implemented Interfaces:
java.io.Serializable

public class DefinitionsFactory
extends java.lang.Object
implements java.io.Serializable

A factory for definitions. This factory allows to retrieve definitions by their keys.

See Also:
Serialized Form

Field Summary
protected  java.util.Map definitions
           
 
Constructor Summary
DefinitionsFactory(XmlDefinitionsSet xmlDefinitions)
          Constructor.
 
Method Summary
 ComponentDefinition getDefinition(java.lang.String name, javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext)
          Get a definition by its name.
 void putDefinition(ComponentDefinition definition)
          Put definition in set
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

definitions

protected java.util.Map definitions
Constructor Detail

DefinitionsFactory

public DefinitionsFactory(XmlDefinitionsSet xmlDefinitions)
                   throws NoSuchDefinitionException
Constructor. Create a factory initialized with definitions from XmlDefinitionsSet.

Parameters:
xmlDefinitions - resolved definition from XmlDefinitionSet.
Throws:
DefinitionsFactoryException - If an error occurs while creating a definition.
NoSuchDefinitionException - If an error occurs while resolving inheritance
Method Detail

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.

Throws:
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

putDefinition

public void putDefinition(ComponentDefinition definition)
Put definition in set

Parameters:
definition -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright 2000-2002 - Cedric Dumoulin and Apache Software Foundation