org.apache.tiles.impl.mgmt
Class DefinitionManager
java.lang.Object
org.apache.tiles.impl.mgmt.DefinitionManager
public class DefinitionManager
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefinitionManager
public DefinitionManager()
getFactory
public DefinitionsFactory getFactory()
setFactory
public void setFactory(DefinitionsFactory factory)
getDefinition
public ComponentDefinition getDefinition(java.lang.String definition,
TilesRequestContext request)
throws DefinitionsFactoryException
- Throws:
DefinitionsFactoryException
addDefinition
public void addDefinition(ComponentDefinition definition)
throws DefinitionsFactoryException
- Throws:
DefinitionsFactoryException
resolveInheritance
protected void resolveInheritance(ComponentDefinition definition)
throws DefinitionsFactoryException
- Resolve inheritance.
First, resolve parent's inheritance, then set template to the parent's
template.
Also copy attributes setted in parent, and not set in child
If instance doesn't extend anything, do nothing.
- Parameters:
definition
- def
- Throws:
NoSuchDefinitionException
- If an inheritance can not be solved.
DefinitionsFactoryException
overload
protected void overload(ComponentDefinition parent,
ComponentDefinition child)
- Overloads a child definition with a given parent.
All attributes present in child are kept. All missing attributes are
copied from the parent.
Special attribute 'template','role' and 'extends' are overloaded in child
if not defined
- Parameters:
parent
- The parent definition.child
- The child that will be overloaded.