|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tiles.definition.DefinitionsImpl
public class DefinitionsImpl
Constructor Summary | |
---|---|
DefinitionsImpl()
Creates a new instance of DefinitionsImpl. |
Method Summary | |
---|---|
void |
addDefinitions(Map<String,Definition> defsMap)
Adds new Definition objects to the internal collection and resolves inheritance attraibutes. |
void |
addDefinitions(Map<String,Definition> defsMap,
Locale locale)
Adds new locale-specific Definition objects to the internal collection and resolves inheritance attraibutes. |
Map<String,Definition> |
getBaseDefinitions()
Returns base definitions collection. |
Definition |
getDefinition(String name)
Returns a Definition object that matches the given name. |
Definition |
getDefinition(String name,
Locale locale)
Returns a Definition object that matches the given name and locale. |
protected Definition |
getDefinitionByAttribute(Attribute attr,
Locale locale)
Searches for a definition specified as an attribute. |
protected void |
overload(Definition parent,
Definition child)
Overloads a child definition with a given parent. |
void |
reset()
Clears definitions. |
protected void |
resolveInheritance(Definition definition,
Locale locale,
Set<String> alreadyResolvedDefinitions)
Resolve locale-specific inheritance. |
void |
resolveInheritances()
Resolve extended instances. |
void |
resolveInheritances(Locale locale)
Resolve locale-specific extended instances. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefinitionsImpl()
Method Detail |
---|
public Definition getDefinition(String name)
getDefinition
in interface Definitions
name
- The name of the Definition to return.
public void addDefinitions(Map<String,Definition> defsMap) throws NoSuchDefinitionException
addDefinitions
in interface Definitions
defsMap
- The new definitions to add.
NoSuchDefinitionException
- If something goes wrong during
addition.public void addDefinitions(Map<String,Definition> defsMap, Locale locale) throws NoSuchDefinitionException
addDefinitions
in interface Definitions
defsMap
- The new definitions to add.locale
- The locale to add the definitions to.
NoSuchDefinitionException
- If something goes wrong during
inheritance resolution.public Definition getDefinition(String name, Locale locale)
getDefinition
in interface Definitions
name
- The name of the Definition to return.locale
- The locale to use to resolve the definition.
public void resolveInheritances() throws NoSuchDefinitionException
resolveInheritances
in interface Definitions
NoSuchDefinitionException
- If a parent definition is not found.public void resolveInheritances(Locale locale) throws NoSuchDefinitionException
resolveInheritances
in interface Definitions
locale
- The locale to use.
NoSuchDefinitionException
- If a parent definition is not found.public void reset()
reset
in interface Definitions
public Map<String,Definition> getBaseDefinitions()
getBaseDefinitions
in interface Definitions
protected Definition getDefinitionByAttribute(Attribute attr, Locale locale)
attr
- The attribute to use.locale
- The locale to search into.
null
.protected void resolveInheritance(Definition definition, Locale locale, Set<String> alreadyResolvedDefinitions) throws NoSuchDefinitionException
definition
- The definition to resolvelocale
- The locale to use.alreadyResolvedDefinitions
- The set of the definitions that have
been already resolved.
NoSuchDefinitionException
- If an inheritance can not be solved.protected void overload(Definition parent, Definition child)
parent
- The parent definition.child
- The child that will be overloaded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |