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
Interface DefinitionsFactory

All Known Implementing Classes:
  LocaleDefinitionsFactory, UnresolvingLocaleDefinitionsFactory, UrlDefinitionsFactory

    public interface DefinitionsFactory

Interface for creating a `Definition`s and managing their contents.

DefinitionsFactory implementations are responsible for maintaining the data sources of Tiles configuration data and using the data to create Definitions sets. Implementations also know how to append locale-specific configuration data to an existing Definitions set.

Version:
  $Rev: 822631 $ $Date: 2009-10-07 11:21:12 +0200 (mer, 07 ott 2009) $

Field Summary
`static java.lang.String` | `DEFINITION_DAO_INIT_PARAM` Constant representing the configuration parameter used to define the definition DAO to use.
`static java.lang.String` | `DEFINITIONS_CONFIG` Constant representing the configuration parameter used to define the tiles definition resources.
`static java.lang.String` | `LOCALE_RESOLVER_IMPL_PROPERTY` Property name that specifies the implementation of `LocaleResolver`.
`static java.lang.String` | `READER_IMPL_PROPERTY` Property name that specifies the implementation of the DefinitionsReader.

Method Summary
`void` | `addSource(java.lang.Object source)` Deprecated. Let the Definitions Factory load its sources by itself.
`Definition` | `getDefinition(java.lang.String name, TilesRequestContext tilesContext)` Returns a Definition object that matches the given name and Tiles context.
`void` | `init(java.util.Map<java.lang.String,java.lang.String> params)` Deprecated. Parameter based initialization is deprecated, please compose your definitions factory using methods.
`Definitions` | `readDefinitions()` Deprecated. Let the Definitions Factory use it.

Field Detail

### READER_IMPL_PROPERTY

    static final java.lang.String READER_IMPL_PROPERTY

  Property name that specifies the implementation of the DefinitionsReader.

  See Also:
    Constant Field Values

### LOCALE_RESOLVER_IMPL_PROPERTY

    static final java.lang.String LOCALE_RESOLVER_IMPL_PROPERTY

  Property name that specifies the implementation of `LocaleResolver`.

  See Also:
    Constant Field Values

### DEFINITIONS_CONFIG

    static final java.lang.String DEFINITIONS_CONFIG

  Constant representing the configuration parameter used to define the tiles definition resources.

  Since:
    2.1.0
  See Also:
    Constant Field Values

### DEFINITION_DAO_INIT_PARAM

    static final java.lang.String DEFINITION_DAO_INIT_PARAM

  Constant representing the configuration parameter used to define the definition DAO to use.

  See Also:
    Constant Field Values

Method Detail

### init

    void init(java.util.Map<java.lang.String,java.lang.String> params)

  Deprecated. Parameter based initialization is deprecated, please compose your definitions factory using methods.

  Initializes the DefinitionsFactory and its subcomponents.

  Implementations may support configuration properties to be passed in via the params Map.

  Parameters:
    `params` - The Map of configuration properties.
  Throws:
    `DefinitionsFactoryException` - If a Tiles exception, such as an initialization error, occurs.

### getDefinition

    Definition getDefinition(java.lang.String name,
                             TilesRequestContext tilesContext)

  Returns a Definition object that matches the given name and Tiles context.

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

### addSource

    @Deprecated
    void addSource(java.lang.Object source)

  Deprecated. Let the Definitions Factory load its sources by itself.

  Adds a source where Definition objects are stored.

  Implementations should publish what type of source object they expect. The source should contain enough information to resolve a configuration source containing definitions. The source should be a "base" source for configurations. Internationalization and Localization properties will be applied by implementations to discriminate the correct data sources based on locale.

  Parameters:
    `source` - The configuration source for definitions.

### readDefinitions

    @Deprecated
    Definitions readDefinitions()

  Deprecated. Let the Definitions Factory use it.

  Creates and returns a `Definitions` set by reading configuration data from the applied sources.

  Returns:
    The read definitions.

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.