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.impl
Class DefaultConfigurationParser

    java.lang.Object
      com.pietschy.command.configuration.impl.DefaultConfigurationParser

All Implemented Interfaces:
  ConfigurationParser

     class DefaultConfigurationParser

extends java.lang.Object
implements ConfigurationParser

Default parser implementation. This class is responsible for parsing `ResourceBundle`s and storing their configuration in the `ConfigurationCache`.

Constructor Summary
`DefaultConfigurationParser(ConfigurationCache cache)` Creates a new parser that stores it's configuration in the specified cache.

Method Summary
`(package private) AttributeParser` | `getActionCommandParser(java.lang.String propertyName)` Gets the `AttributeParser` for the specified property name.
`(package private) AttributeParser` | `getCommandGroupParser(java.lang.String propertyName)` Gets the `AttributeParser` for the specified property name.
`(package private) FaceAttributeParser` | `getFaceParser(java.lang.String propertyName)` Gets the `FaceAttributeParser` for the specified property name.
`void` | `parse(java.util.ResourceBundle bundle)` Parses the specified resource bundle placing the configuration in the cache.
`(package private) void` | `parseActionCommandProperty(Configuration config, PropertyKey key, java.lang.String value, ExceptionFactory exceptionFactory)` Invoked to parse an ActionCommand property.
`(package private) void` | `parseFaceProperty(Configuration config, PropertyKey key, java.lang.String value, ExceptionFactory exceptionFactory)` Invoked to parse a Face property.
`(package private) void` | `parseGroupProperty(Configuration config, PropertyKey key, java.lang.String value, ExceptionFactory exceptionFactory)` Invoked to parse an CommandGroup property.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultConfigurationParser

    public DefaultConfigurationParser(ConfigurationCache cache)

  Creates a new parser that stores it's configuration in the specified cache.

  Parameters:
    `cache` - the configuration cache in which to store the configuration.

Method Detail

### parse

    public void parse(java.util.ResourceBundle bundle)
               throws ParseException

  Parses the specified resource bundle placing the configuration in the cache.

  Specified by:
    `parse` in interface `ConfigurationParser`
  Parameters:
    `bundle` - the bundle to parse.
  Throws:
    `ParseException` - if there was a problem parsing the configuration.

### parseActionCommandProperty

    void parseActionCommandProperty(Configuration config,
                                    PropertyKey key,
                                    java.lang.String value,
                                    ExceptionFactory exceptionFactory)
                              throws ParseException

  Invoked to parse an ActionCommand property.

  Parameters:
    `config` - the command configuration
    `key` - the property key
    `value` - the property value.
    `exceptionFactory` - the exception factory to use.
  Throws:
    `ParseException` - if there was an error parsing the property.

### getActionCommandParser

    AttributeParser getActionCommandParser(java.lang.String propertyName)

  Gets the `AttributeParser` for the specified property name.

  Parameters:
    `propertyName` - the property name.
  Returns:
    the parser for the specified property.

### parseGroupProperty

    void parseGroupProperty(Configuration config,
                            PropertyKey key,
                            java.lang.String value,
                            ExceptionFactory exceptionFactory)
                      throws ParseException

  Invoked to parse an CommandGroup property.

  Parameters:
    `config` - the group configuration
    `key` - the property key
    `value` - the property value.
    `exceptionFactory` - the exception factory to use.
  Throws:
    `ParseException` - if there was an error parsing the property.

### getCommandGroupParser

    AttributeParser getCommandGroupParser(java.lang.String propertyName)

  Gets the `AttributeParser` for the specified property name.

  Parameters:
    `propertyName` - the property name.
  Returns:
    the parser for the specified property.

### parseFaceProperty

    void parseFaceProperty(Configuration config,
                           PropertyKey key,
                           java.lang.String value,
                           ExceptionFactory exceptionFactory)
                     throws ParseException

  Invoked to parse a Face property.

  Parameters:
    `config` - the command configuration
    `key` - the property key
    `value` - the property value.
    `exceptionFactory` - the exception factory to use.
  Throws:
    `ParseException` - if there was an error parsing the property.

### getFaceParser

    FaceAttributeParser getFaceParser(java.lang.String propertyName)

  Gets the `FaceAttributeParser` for the specified property name.

  Parameters:
    `propertyName` - the property name.
  Returns:
    the parser for the specified property.

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