org.apache.tiles.definition
Interface ComponentDefinitions

Package class diagram package ComponentDefinitions
All Known Implementing Classes:
ComponentDefinitionsImpl

public interface ComponentDefinitions

Interface for managing collections of ComponentDefinition objects.

The ComponentDefinitions interface provides a pattern for managing ComponentDefinition objects. Implementations will provide a means to append new ComponentDefinitions to the collection, add and retrieve lcale-specific ComponentDefinitions objects, and reset the collections.


Method Summary
 void addDefinitions(java.util.Map<java.lang.String,ComponentDefinition> defsMap)
          Adds new ComponentDefinition objects to the internal collection and resolves inheritance attraibutes.
 void addDefinitions(java.util.Map<java.lang.String,ComponentDefinition> defsMap, java.util.Locale locale)
          Adds new locale-specific ComponentDefinition objects to the internal collection and resolves inheritance attraibutes.
 java.util.Map getBaseDefinitions()
          Returns base definitions collection;
 ComponentDefinition getDefinition(java.lang.String name)
          Returns a ComponentDefinition object that matches the given name.
 ComponentDefinition getDefinition(java.lang.String name, java.util.Locale locale)
          Returns a ComponentDefinition object that matches the given name and locale.
 void reset()
          Clears definitions.
 void resolveInheritances()
          Resolves configuration inheritance properties.
 void resolveInheritances(java.util.Locale locale)
          Resolves locale-specific configuration inheritance properties.
 

Method Detail

getDefinition

ComponentDefinition getDefinition(java.lang.String name)
Returns a ComponentDefinition object that matches the given name.

Parameters:
name - The name of the ComponentDefinition to return.
Returns:
the ComponentDefinition matching the given name or null if none is found.

addDefinitions

void addDefinitions(java.util.Map<java.lang.String,ComponentDefinition> defsMap)
                    throws NoSuchDefinitionException
Adds new ComponentDefinition objects to the internal collection and resolves inheritance attraibutes.

Parameters:
defsMap - The new definitions to add.
Throws:
NoSuchDefinitionException - if a ComponentDefinition extends from one that doesn't exist.

addDefinitions

void addDefinitions(java.util.Map<java.lang.String,ComponentDefinition> defsMap,
                    java.util.Locale locale)
                    throws NoSuchDefinitionException
Adds new locale-specific ComponentDefinition objects to the internal collection and resolves inheritance attraibutes.

Parameters:
defsMap - The new definitions to add.
locale - The locale to add the definitions to.
Throws:
NoSuchDefinitionException - if a ComponentDefinition extends from one that doesn't exist.

getDefinition

ComponentDefinition getDefinition(java.lang.String name,
                                  java.util.Locale locale)
Returns a ComponentDefinition object that matches the given name and locale.

Parameters:
name - The name of the ComponentDefinition to return.
locale - The locale to use to resolve the definition.
Returns:
the ComponentDefinition matching the given name or null if none is found.

resolveInheritances

void resolveInheritances()
                         throws NoSuchDefinitionException
Resolves configuration inheritance properties.

Throws:
NoSuchDefinitionException

resolveInheritances

void resolveInheritances(java.util.Locale locale)
                         throws NoSuchDefinitionException
Resolves locale-specific configuration inheritance properties.

Throws:
NoSuchDefinitionException

reset

void reset()
Clears definitions.


getBaseDefinitions

java.util.Map getBaseDefinitions()
Returns base definitions collection;