Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tiles.definition
Class DefinitionsImpl

    java.lang.Object
      org.apache.tiles.definition.DefinitionsImpl

All Implemented Interfaces:
  Definitions

Deprecated. This class is, in fact, part of the implementation of `UrlDefinitionsFactory` and `ResolvingLocaleUrlDefinitionDAO`.

    @Deprecated
    public class DefinitionsImpl

extends java.lang.Object
implements Definitions

Version:
  $Rev: 791161 $ $Date: 2009-07-04 20:53:36 +0200 (sab, 04 lug 2009) $

Constructor Summary
`DefinitionsImpl()` Deprecated. Creates a new instance of DefinitionsImpl.
`DefinitionsImpl(java.util.Map<java.lang.String,Definition> baseDefinitions, java.util.Map<java.util.Locale,java.util.Map<java.lang.String,Definition>> localeSpecificDefinitions)` Deprecated. Creates a new instance of DefinitionsImpl to be used as a wrapper.

Method Summary
`void` | `addDefinitions(java.util.Map<java.lang.String,Definition> defsMap)` Deprecated. Adds new Definition objects to the internal collection and resolves inheritance attraibutes.
`void` | `addDefinitions(java.util.Map<java.lang.String,Definition> defsMap, java.util.Locale locale)` Deprecated. Adds new locale-specific Definition objects to the internal collection and resolves inheritance attraibutes.
`java.util.Map<java.lang.String,Definition>` | `getBaseDefinitions()` Deprecated. Returns base definitions collection.
`Definition` | `getDefinition(java.lang.String name)` Deprecated. Returns a Definition object that matches the given name.
`Definition` | `getDefinition(java.lang.String name, java.util.Locale locale)` Deprecated. Returns a Definition object that matches the given name and locale.
`protected Definition` | `getDefinitionByAttribute(Attribute attr, java.util.Locale locale)` Deprecated. Searches for a definition specified as an attribute.
`protected void` | `overload(Definition parent, Definition child)` Deprecated. Use `BasicAttributeContext.inherit(org.apache.tiles.AttributeContext)`.
`void` | `reset()` Deprecated. Clears definitions.
`protected void` | `resolveInheritance(Definition definition, java.util.Locale locale, java.util.Set<java.lang.String> alreadyResolvedDefinitions)` Deprecated. Resolve locale-specific inheritance.
`void` | `resolveInheritances()` Deprecated. Resolve extended instances.
`void` | `resolveInheritances(java.util.Locale locale)` Deprecated. 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

### DefinitionsImpl

    public DefinitionsImpl()

  Deprecated.
  Creates a new instance of DefinitionsImpl.

### DefinitionsImpl

    public DefinitionsImpl(java.util.Map<java.lang.String,Definition> baseDefinitions,
                           java.util.Map<java.util.Locale,java.util.Map<java.lang.String,Definition>> localeSpecificDefinitions)

  Deprecated.
  Creates a new instance of DefinitionsImpl to be used as a wrapper.

  Parameters:
    `baseDefinitions` - The base definitions to use.
    `localeSpecificDefinitions` - Maps a locale to a map of definitions.

Method Detail

### getDefinition

    public Definition getDefinition(java.lang.String name)

  Deprecated.
  Returns a Definition object that matches the given name.

  Specified by:
    `getDefinition` in interface `Definitions`
  Parameters:
    `name` - The name of the Definition to return.
  Returns:
    the Definition matching the given name or null if none is found.

### addDefinitions

    public void addDefinitions(java.util.Map<java.lang.String,Definition> defsMap)

  Deprecated.
  Adds new Definition objects to the internal collection and resolves inheritance attraibutes.

  Specified by:
    `addDefinitions` in interface `Definitions`
  Parameters:
    `defsMap` - The new definitions to add.
  Throws:
    `NoSuchDefinitionException` - If something goes wrong during addition.

### addDefinitions

    public void addDefinitions(java.util.Map<java.lang.String,Definition> defsMap,
                               java.util.Locale locale)

  Deprecated.
  Adds new locale-specific Definition objects to the internal collection and resolves inheritance attraibutes.

  Specified by:
    `addDefinitions` in interface `Definitions`
  Parameters:
    `defsMap` - The new definitions to add.
    `locale` - The locale to add the definitions to.
  Throws:
    `NoSuchDefinitionException` - If something goes wrong during inheritance resolution.

### getDefinition

    public Definition getDefinition(java.lang.String name,
                                    java.util.Locale locale)

  Deprecated.
  Returns a Definition object that matches the given name and locale.

  Specified by:
    `getDefinition` in interface `Definitions`
  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

    public void resolveInheritances()

  Deprecated.
  Resolve extended instances.

  Specified by:
    `resolveInheritances` in interface `Definitions`
  Throws:
    `NoSuchDefinitionException` - If a parent definition is not found.

### resolveInheritances

    public void resolveInheritances(java.util.Locale locale)

  Deprecated.
  Resolve locale-specific extended instances.

  Specified by:
    `resolveInheritances` in interface `Definitions`
  Parameters:
    `locale` - The locale to use.
  Throws:
    `NoSuchDefinitionException` - If a parent definition is not found.

### reset

    public void reset()

  Deprecated.
  Clears definitions.

  Specified by:
    `reset` in interface `Definitions`

### getBaseDefinitions

    public java.util.Map<java.lang.String,Definition> getBaseDefinitions()

  Deprecated.
  Returns base definitions collection.

  Specified by:
    `getBaseDefinitions` in interface `Definitions`
  Returns:
    The base (i.e. not depending on any locale) definitions map.

### getDefinitionByAttribute

    protected Definition getDefinitionByAttribute(Attribute attr,
                                                  java.util.Locale locale)

  Deprecated.
  Searches for a definition specified as an attribute.

  Parameters:
    `attr` - The attribute to use.
    `locale` - The locale to search into.
  Returns:
    The required definition if found, otherwise it returns `null`.

### resolveInheritance

    protected void resolveInheritance(Definition definition,
                                      java.util.Locale locale,
                                      java.util.Set<java.lang.String> alreadyResolvedDefinitions)

  Deprecated.
  Resolve locale-specific inheritance. First, resolve parent's inheritance, then set template to the parent's template. Also copy attributes setted in parent, and not set in child If instance doesn't extend anything, do nothing.

  Parameters:
    `definition` - The definition to resolve
    `locale` - The locale to use.
    `alreadyResolvedDefinitions` - The set of the definitions that have been already resolved.
  Throws:
    `NoSuchDefinitionException` - If an inheritance can not be solved.

### overload

    @Deprecated
    protected void overload(Definition parent,
                                       Definition child)

  Deprecated. Use `BasicAttributeContext.inherit(org.apache.tiles.AttributeContext)`.

  Overloads a child definition with a given parent. All attributes present in child are kept. All missing attributes are copied from the parent. Special attribute 'template','role' and 'extends' are overloaded in child if not defined

  Parameters:
    `parent` - The parent definition.
    `child` - The child that will be overloaded.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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