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.xmlDefinition
Class DefinitionsFactory

    java.lang.Object
      org.apache.struts.tiles.xmlDefinition.DefinitionsFactory

All Implemented Interfaces:
  Serializable

    public class DefinitionsFactory

extends Object
implements Serializable

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

See Also:
  Serialized Form

Field Summary
`protected Map` | `definitions` Underlying map containing all definitions.

Constructor Summary
`DefinitionsFactory(XmlDefinitionsSet xmlDefinitions)` Constructor.

Method Summary
`ComponentDefinition` | `getDefinition(String name, ServletRequest request, ServletContext servletContext)` Get a definition by its name.
`void` | `putDefinition(ComponentDefinition definition)` Put definition in set.
`String` | `toString()` Return String representation.

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

Field Detail

### definitions

    protected Map definitions

  Underlying map containing all 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:
    `NoSuchDefinitionException` - If an error occurs while resolving inheritance

Method Detail

### getDefinition

    public ComponentDefinition getDefinition(String name,
                                             ServletRequest request,
                                             ServletContext servletContext)
                                      throws NoSuchDefinitionException,
                                             DefinitionsFactoryException

  Get a definition by its name.

  Parameters:
    `name` - Name of the definition.
    `request` - Servlet request.
    `servletContext` - Servlet context.
  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` - Definition to put.

### toString

    public String toString()

  Return String representation.

  Overrides:
    `toString` in class `Object`
  Returns:
    String representation.

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.