MutableConfiguration (Avalon Framework API)
Keywords: org.apache.avalon.framework.configuration.MutableConfiguration interface

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.avalon.framework.configuration
Interface MutableConfiguration

All Superinterfaces:
  Configuration

All Known Implementing Classes:
  DefaultConfiguration

public interface MutableConfiguration
extends Configuration

A read/write extension of the Configuration interface.

Since:
  4.1.6
Version:
  CVS $Revision: 1.2 $ $Date: 2004/03/28 02:55:36 $
Author:
  Avalon Development Team

Method Summary
`void` | `addAll(Configuration other)` Add all the attributes, children and value from specified configuration element to current configuration element.
`void` | `addAllAttributes(Configuration other)` Add all attributes from specified configuration element to current configuration element.
`void` | `addAllChildren(Configuration other)` Add all child `Configuration` objects from specified configuration element to current configuration element.
`void` | `addChild(Configuration configuration)` Add a child `Configuration` to this configuration element.
`MutableConfiguration` | `getMutableChild(java.lang.String name)` Equivalent to `getMutableChild( name, true )`
`MutableConfiguration` | `getMutableChild(java.lang.String name, boolean autoCreate)` Gets a child node of this configuration.
`MutableConfiguration[]` | `getMutableChildren()` Returns an array of mutable children.
`MutableConfiguration[]` | `getMutableChildren(java.lang.String name)` Returns an array of mutable children with the given name.
`void` | `removeChild(Configuration configuration)` Remove a child `Configuration` to this configuration element.
`void` | `setAttribute(java.lang.String name, boolean value)` Set the value of the specified attribute to the specified boolean.
`void` | `setAttribute(java.lang.String name, float value)` Set the value of the specified attribute to the specified float.
`void` | `setAttribute(java.lang.String name, int value)` Set the value of the specified attribute to the specified int.
`void` | `setAttribute(java.lang.String name, long value)` Set the value of the specified attribute to the specified long.
`void` | `setAttribute(java.lang.String name, java.lang.String value)` Set the value of the specified attribute to the specified string.
`void` | `setValue(boolean value)` Set the value of this `Configuration` object to the specified boolean.
`void` | `setValue(float value)` Set the value of this `Configuration` object to the specified float.
`void` | `setValue(int value)` Set the value of this `Configuration` object to the specified int.
`void` | `setValue(long value)` Set the value of this `Configuration` object to the specified long.
`void` | `setValue(java.lang.String value)` Set the value of this `Configuration` object to the specified string.

Methods inherited from interface org.apache.avalon.framework.configuration.Configuration
`getAttribute, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsFloat, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsInteger, getAttributeAsLong, getAttributeAsLong, getAttributeNames, getChild, getChild, getChildren, getChildren, getLocation, getName, getNamespace, getValue, getValue, getValueAsBoolean, getValueAsBoolean, getValueAsFloat, getValueAsFloat, getValueAsInteger, getValueAsInteger, getValueAsLong, getValueAsLong`

Method Detail

### setValue

    public void setValue(java.lang.String value)

  Set the value of this `Configuration` object to the specified string.

  Parameters:
    `value` - a `String` value

### setValue

    public void setValue(int value)

  Set the value of this `Configuration` object to the specified int.

  Parameters:
    `value` - a `int` value

### setValue

    public void setValue(long value)

  Set the value of this `Configuration` object to the specified long.

  Parameters:
    `value` - a `long` value

### setValue

    public void setValue(boolean value)

  Set the value of this `Configuration` object to the specified boolean.

  Parameters:
    `value` - a `boolean` value

### setValue

    public void setValue(float value)

  Set the value of this `Configuration` object to the specified float.

  Parameters:
    `value` - a `float` value

### setAttribute

    public void setAttribute(java.lang.String name,
                             java.lang.String value)

  Set the value of the specified attribute to the specified string.

  Parameters:
    `name` - name of the attribute to set
    `value` - a `String` value. If null, the attribute is removed.

### setAttribute

    public void setAttribute(java.lang.String name,
                             int value)

  Set the value of the specified attribute to the specified int.

  Parameters:
    `name` - name of the attribute to set
    `value` - an `int` value

### setAttribute

    public void setAttribute(java.lang.String name,
                             long value)

  Set the value of the specified attribute to the specified long.

  Parameters:
    `name` - name of the attribute to set
    `value` - an `long` value

### setAttribute

    public void setAttribute(java.lang.String name,
                             boolean value)

  Set the value of the specified attribute to the specified boolean.

  Parameters:
    `name` - name of the attribute to set
    `value` - an `boolean` value

### setAttribute

    public void setAttribute(java.lang.String name,
                             float value)

  Set the value of the specified attribute to the specified float.

  Parameters:
    `name` - name of the attribute to set
    `value` - an `float` value

### addChild

    public void addChild(Configuration configuration)

  Add a child `Configuration` to this configuration element.

  Parameters:
    `configuration` - a `Configuration` value

### addAll

    public void addAll(Configuration other)

  Add all the attributes, children and value from specified configuration element to current configuration element.

  Parameters:
    `other` - the `Configuration` element

### addAllAttributes

    public void addAllAttributes(Configuration other)

  Add all attributes from specified configuration element to current configuration element.

  Parameters:
    `other` - the `Configuration` element

### addAllChildren

    public void addAllChildren(Configuration other)

  Add all child `Configuration` objects from specified configuration element to current configuration element.

  Parameters:
    `other` - the other `Configuration` value

### removeChild

    public void removeChild(Configuration configuration)

  Remove a child `Configuration` to this configuration element.

  Parameters:
    `configuration` - a `Configuration` value

### getMutableChild

    public MutableConfiguration getMutableChild(java.lang.String name)
                                         throws ConfigurationException

  Equivalent to `getMutableChild( name, true )`

  Throws:
    `ConfigurationException`

### getMutableChild

    public MutableConfiguration getMutableChild(java.lang.String name,
                                                boolean autoCreate)
                                         throws ConfigurationException

  Gets a child node of this configuration. If a mutable child with the given name exists, it is returned. If an immutable child with the given name exists, it is converted into a mutable child and returned. In this case, the immutable child will be replaced with the mutable child in this configuration (that is, it will be as if the child node always had been mutable). If no child with the given name exists, and `autoCreate` is `true`, a new mutable child is created and added to this configuration before being returned.

  Parameters:
    `name` - the name of the child.
    `autoCreate` - set to true to create the child node if it doesn't exist.
  Returns:
    the child MutableConfiguration, or `null` if `autoCreate` was false and no child by the given name existed.
  Throws:
    `ConfigurationException` - if an error occurrs.

### getMutableChildren

    public MutableConfiguration[] getMutableChildren()
                                              throws ConfigurationException

  Returns an array of mutable children. Immutable children are converted just as for `getMutableChild`.

  Throws:
    `ConfigurationException` - if an error occurrs.

### getMutableChildren

    public MutableConfiguration[] getMutableChildren(java.lang.String name)
                                              throws ConfigurationException

  Returns an array of mutable children with the given name. Immutable children are converted just as for `getMutableChild`.

  Throws:
    `ConfigurationException` - if an error occurrs.

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 © The Apache Software Foundation. All Rights Reserved.