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 Configuration

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

     class Configuration

extends java.lang.Object

Holds configuration information for a particular command or group. Configuration objects are created and managed by the `ConfigurationCache`.

Constructor Summary
`Configuration(boolean group)` Creates a new configuration object.

Method Summary
`(package private) Face` | `createFace(java.lang.String context)` Creates a face for the specified context.
`Face` | `getFace(java.lang.String context)` Gets the face for the specified context.
`java.util.Collection<Face>` | `getFaces()` Gets all the faces defined in this configuration.
`java.lang.String` | `getProperty(java.lang.String key)` Gets the value of a system property.
`java.util.Map<java.lang.String,java.lang.String>` | `getUserProperties()` Returns a copy of the configurations user properties, or `null` if the configuration has no user properties.
`java.lang.String` | `getUserProperty(java.lang.String key)` Gets the value of the specified user property.
`boolean` | `hasProperties()`
`boolean` | `hasUserProperties()`
`boolean` | `isGroup()` Checks if this configuration is for a group.
`void` | `putProperty(java.lang.String key, java.lang.String value)` Sets the value for a system property.
`void` | `putUserProperty(java.lang.String key, java.lang.String value)` Set the value for a user property

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

Constructor Detail

### Configuration

    public Configuration(boolean group)

  Creates a new configuration object.

  Parameters:
    `group` - `true` if the configuration is for a `CommandGroup`, `false` otherwise.

Method Detail

### putUserProperty

    public void putUserProperty(java.lang.String key,
                                java.lang.String value)

  Set the value for a user property

  Parameters:
    `key` - the propery key.
    `value` - the property value.

### putProperty

    public void putProperty(java.lang.String key,
                            java.lang.String value)

  Sets the value for a system property.

  Parameters:
    `key` - the property key.
    `value` - the property value.

### getProperty

    public java.lang.String getProperty(java.lang.String key)

  Gets the value of a system property.

  Parameters:
    `key` - the property key.
  Returns:
    the property value or `null` if it wasn't specified.

### getUserProperty

    public java.lang.String getUserProperty(java.lang.String key)

  Gets the value of the specified user property.

  Parameters:
    `key` - the property key.
  Returns:
    the property value or `null` if it wasn't specified.

### isGroup

    public boolean isGroup()

  Checks if this configuration is for a group.

  Returns:
    `true` if the configuration is for a group, `false` otherwise.

### getFace

    public Face getFace(java.lang.String context)

  Gets the face for the specified context. The face is created if it doens't already exist.

  Parameters:
    `context` - the face context.
  Returns:
    the face for the specified context.

### createFace

    Face createFace(java.lang.String context)

  Creates a face for the specified context. This method exists for unit testing.

  Parameters:
    `context` - the face context.
  Returns:
    a new face for the specified context.

### getFaces

    public java.util.Collection<Face> getFaces()

  Gets all the faces defined in this configuration.

  Returns:
    all the faces defined in this configuration.

### hasProperties

    public boolean hasProperties()

### hasUserProperties

    public boolean hasUserProperties()

### getUserProperties

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

  Returns a copy of the configurations user properties, or `null` if the configuration has no user properties.

  Returns:
    a copy of the configurations user properties, or `null` if the configuration has no user properties.

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