Class DefinitionsFactory
java.lang.Object
org.apache.struts.tiles.xmlDefinition.DefinitionsFactory
- All Implemented Interfaces:
 Serializable
A factory for definitions.
 This factory allows to retrieve definitions by their keys.
- See Also:
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HashMap<String, ComponentDefinition> Underlying map containing all definitions. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiongetDefinition(String name, ServletRequest request, ServletContext servletContext) Get a definition by its name.voidputDefinition(ComponentDefinition definition) Put definition in set.toString()Return String representation. 
- 
Field Details
- 
definitions
Underlying map containing all definitions. 
 - 
 - 
Constructor Details
- 
DefinitionsFactory
Constructor. Create a factory initialized with definitions fromXmlDefinitionsSet.- Parameters:
 xmlDefinitions- Resolved definition from XmlDefinitionSet.- Throws:
 NoSuchDefinitionException- If an error occurs while resolving inheritance
 
 - 
 - 
Method Details
- 
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
Put definition in set.- Parameters:
 definition- Definition to put.
 - 
toString
Return String representation. 
 -