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

## com.pietschy.command.configuration
Interface ConfigurationLoader

All Known Implementing Classes:
  DefaultConfigurationLoader

    public interface ConfigurationLoader

Defines the methods for loading configuration files and applying that configuration to newly created commands. The default implementation is defined by `Defaults.getConfigurationLoader()`.

During construction each command retrieves the current loader and invokes `configure(Command)` on itself. The loader must then read the appropriate configuration items and configure the command faces and properties.

Method Summary
`void` | `configure(Command command)` Configures the faces and properties of the specified command based on the information loaded via `load(ResourceBundle)`.
`java.lang.String` | `getGroupClassName(java.lang.String id)` Checks if the group has got an explicit class name specified.
`boolean` | `isAutoCreate(java.lang.String id)` Checks if a `CommandGroup` has been specified as autoCreate.
`boolean` | `isGroup(java.lang.String id)` Checks if the configuration of the specified id is for a `CommandGroup`.
`boolean` | `isToggleGroup(java.lang.String id)` Checks if the configuration of the specified id is for a `ToggleGroup`.
`void` | `load(java.util.ResourceBundle bundle)` Loads the configuration defined in the specified resource bundle.

Method Detail

### configure

    void configure(Command command)
                   throws ConfigurationException

  Configures the faces and properties of the specified command based on the information loaded via `load(ResourceBundle)`.

  Parameters:
    `command` - the command to configure
  Throws:
    `ConfigurationException` - if there was an error configuring the command. An example error would be if the command was a `CommandGroup`, but the configuration was for an `ActionCommand`.

### isGroup

    boolean isGroup(java.lang.String id)

  Checks if the configuration of the specified id is for a `CommandGroup`.

  Parameters:
    `id` - the command id to check.
  Returns:
    `true` if the coniguration is for a CommandGroup, `false` otherwise.

### isToggleGroup

    boolean isToggleGroup(java.lang.String id)

  Checks if the configuration of the specified id is for a `ToggleGroup`.

  Parameters:
    `id` - the command id to check.
  Returns:
    `true` if the coniguration is for a ToggleGroup, `false` otherwise.

### isAutoCreate

    boolean isAutoCreate(java.lang.String id)

  Checks if a `CommandGroup` has been specified as autoCreate.

  Parameters:
    `id` - the command id to check.
  Returns:
    `true` if the CommandGroup has been specified to be auto created.

### getGroupClassName

    java.lang.String getGroupClassName(java.lang.String id)

  Checks if the group has got an explicit class name specified. This is only relevant if `isAutoCreate(String)` is `true`.

  Parameters:
    `id` - the command id to check.
  Returns:
    the class name specified for the `CommandGroup` or `null` if none was specified.

### load

    void load(java.util.ResourceBundle bundle)
              throws ParseException

  Loads the configuration defined in the specified resource bundle.

  Parameters:
    `bundle` - the bundle to load.
  Throws:
    `ParseException` - if there was an error loading the configuration.

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

Copyright © 2006 - 2007 Andrew Pietsch