This project has retired. For details please refer to its Attic page.
Definitions (Tiles 2 2.0.7 API)

org.apache.tiles.definition
Interface Definitions

Package class diagram package Definitions
All Known Implementing Classes:
DefinitionsImpl

public interface Definitions

Interface for managing collections of Definition objects.

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

Version:
$Rev: 537196 $ $Date: 2007-05-11 16:07:35 +0200 (Fri, 11 May 2007) $

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.
 void reset()
          Clears definitions.
 void resolveInheritances()
          Resolves configuration inheritance properties.
 void resolveInheritances(Locale locale)
          Resolves locale-specific configuration inheritance properties.
 

Method Detail

getDefinition

Definition getDefinition(String name)
Returns a Definition object that matches the given name.

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

addDefinitions

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

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

addDefinitions

void addDefinitions(Map<String,Definition> defsMap,
                    Locale locale)
                    throws NoSuchDefinitionException
Adds new locale-specific Definition 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 Definition extends from one that doesn't exist.

getDefinition

Definition getDefinition(String name,
                         Locale locale)
Returns a Definition object that matches the given name and locale.

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

resolveInheritances

void resolveInheritances()
                         throws NoSuchDefinitionException
Resolves configuration inheritance properties.

Throws:
NoSuchDefinitionException - If parent definitions are not found.

resolveInheritances

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

Parameters:
locale - The locale object to use.
Throws:
NoSuchDefinitionException - If parent definitions are not found.

reset

void reset()
Clears definitions.


getBaseDefinitions

Map<String,Definition> getBaseDefinitions()
Returns base definitions collection.

Returns:
A map of the type "definition name -> definition".


Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.