|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tiles.impl.mgmt.DefinitionManager
public class DefinitionManager
Manages custom and configured definitions, so they can be used by the
container, instead of using a simple DefinitionsFactory
.
Constructor Summary | |
---|---|
DefinitionManager()
Constructor. |
|
DefinitionManager(String definitionsAttributeName)
Constructor. |
Method Summary | |
---|---|
void |
addDefinition(Definition definition,
TilesRequestContext request)
Adds a definition to the set of custom ones. |
Definition |
getDefinition(String definition,
TilesRequestContext request)
Returns a definition by name. |
protected Map<String,Definition> |
getDefinitions(TilesRequestContext request)
Returns the map with custom definitions for the current request. |
DefinitionsFactory |
getFactory()
Returns the used definitions factory. |
protected String |
getNextUniqueDefinitionName(Map<String,Definition> definitions)
Create a unique definition name usable to store anonymous definitions. |
protected Map<String,Definition> |
getOrCreateDefinitions(TilesRequestContext request)
Returns a map of type "definition name -> definition" and, if it has not been defined before, creates one. |
protected void |
overload(Definition parent,
Definition child)
Deprecated. Use BasicAttributeContext.inherit(org.apache.tiles.BasicAttributeContext) . |
protected void |
resolveInheritance(Definition definition,
TilesRequestContext request)
Resolve inheritance. |
void |
setFactory(DefinitionsFactory factory)
Sets the definitions factory to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefinitionManager()
public DefinitionManager(String definitionsAttributeName)
definitionsAttributeName
- The name of the attribute in which
storing custom definitions.Method Detail |
---|
public DefinitionsFactory getFactory()
public void setFactory(DefinitionsFactory factory)
factory
- The definitions factory.public Definition getDefinition(String definition, TilesRequestContext request)
definition
- The name of the definition.request
- The current request.
DefinitionsFactoryException
- If
something goes wrong when obtaining a main definition.public void addDefinition(Definition definition, TilesRequestContext request)
definition
- The definition to add.request
- The current request.
DefinitionsFactoryException
- If
something goes wrong during the addition.protected void resolveInheritance(Definition definition, TilesRequestContext request)
definition
- The definition that needs to have its inheritances
resolved.request
- The current request.
DefinitionsFactoryException
- If an
inheritance can not be solved.protected void overload(Definition parent, Definition child)
BasicAttributeContext.inherit(org.apache.tiles.BasicAttributeContext)
.
parent
- The parent definition.child
- The child that will be overloaded.protected Map<String,Definition> getDefinitions(TilesRequestContext request)
request
- The current request.
protected Map<String,Definition> getOrCreateDefinitions(TilesRequestContext request)
request
- The current request.
protected String getNextUniqueDefinitionName(Map<String,Definition> definitions)
definitions
- The already created definitions.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |