|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tiles.definition.DefinitionsImpl
public class DefinitionsImpl
Constructor Summary | |
---|---|
DefinitionsImpl()
Creates a new instance of DefinitionsImpl. |
Method Summary | |
---|---|
void |
addDefinitions(java.util.Map<java.lang.String,org.apache.tiles.Definition> defsMap)
Adds new Definition objects to the internal collection and resolves inheritance attraibutes. |
void |
addDefinitions(java.util.Map<java.lang.String,org.apache.tiles.Definition> defsMap,
java.util.Locale locale)
Adds new locale-specific Definition objects to the internal collection and resolves inheritance attraibutes. |
java.util.Map<java.lang.String,org.apache.tiles.Definition> |
getBaseDefinitions()
Returns base definitions collection. |
org.apache.tiles.Definition |
getDefinition(java.lang.String name)
Returns a Definition object that matches the given name. |
org.apache.tiles.Definition |
getDefinition(java.lang.String name,
java.util.Locale locale)
Returns a Definition object that matches the given name and locale. |
protected org.apache.tiles.Definition |
getDefinitionByAttribute(org.apache.tiles.Attribute attr,
java.util.Locale locale)
Searches for a definition specified as an attribute. |
protected void |
overload(org.apache.tiles.Definition parent,
org.apache.tiles.Definition child)
Overloads a child definition with a given parent. |
void |
reset()
Clears definitions. |
protected void |
resolveInheritance(org.apache.tiles.Definition definition,
java.util.Locale locale,
java.util.Set<java.lang.String> alreadyResolvedDefinitions)
Resolve locale-specific inheritance. |
void |
resolveInheritances()
Resolve extended instances. |
void |
resolveInheritances(java.util.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 org.apache.tiles.Definition getDefinition(java.lang.String name)
getDefinition
in interface Definitions
name
- The name of the Definition to return.
public void addDefinitions(java.util.Map<java.lang.String,org.apache.tiles.Definition> defsMap) throws NoSuchDefinitionException
addDefinitions
in interface Definitions
defsMap
- The new definitions to add.
NoSuchDefinitionException
- If something goes wrong during
addition.public void addDefinitions(java.util.Map<java.lang.String,org.apache.tiles.Definition> defsMap, java.util.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 org.apache.tiles.Definition getDefinition(java.lang.String name, java.util.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(java.util.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 java.util.Map<java.lang.String,org.apache.tiles.Definition> getBaseDefinitions()
getBaseDefinitions
in interface Definitions
protected org.apache.tiles.Definition getDefinitionByAttribute(org.apache.tiles.Attribute attr, java.util.Locale locale)
attr
- The attribute to use.locale
- The locale to search into.
null
.protected void resolveInheritance(org.apache.tiles.Definition definition, java.util.Locale locale, java.util.Set<java.lang.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(org.apache.tiles.Definition parent, org.apache.tiles.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 |