org.apache.cocoon.components
Class PropertyAwareConfiguration

java.lang.Object
  extended by org.apache.avalon.framework.configuration.AbstractConfiguration
      extended by org.apache.avalon.framework.configuration.DefaultConfiguration
          extended by org.apache.cocoon.components.PropertyAwareConfiguration
All Implemented Interfaces:
Serializable, Configuration, MutableConfiguration

public class PropertyAwareConfiguration
extends DefaultConfiguration

Property Aware Configuration. This component extends the DefaultConfiguration by suppporting configurations that can contain placeholders for System Properties.

Version:
SVN $Id: PropertyAwareConfiguration.html 1304258 2012-03-23 10:09:27Z ilgrosso $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.avalon.framework.configuration.DefaultConfiguration
EMPTY_ARRAY
 
Constructor Summary
PropertyAwareConfiguration(Configuration config, boolean deepCopy, Settings settings, Logger logger)
          Copy constructor, to create a clone of another configuration.
PropertyAwareConfiguration(Configuration config, Settings settings, Logger logger)
          Shallow copy constructor, suitable for craeting a writable clone of a read-only configuration.
PropertyAwareConfiguration(DefaultConfiguration config, Settings settings, Logger logger)
          Create a new DefaultConfiguration instance.
PropertyAwareConfiguration(String name, Settings settings, Logger logger)
          Create a new DefaultConfiguration instance.
PropertyAwareConfiguration(String name, String location, Settings settings, Logger logger)
          Create a new DefaultConfiguration instance.
PropertyAwareConfiguration(String name, String location, String ns, String prefix, Settings settings, Logger logger)
          Create a new DefaultConfiguration instance.
 
Method Summary
 void setAttribute(String name, String value)
          Set the value of the specified attribute to the specified string.
 void setValue(String value)
          Set the value of this Configuration object to the specified string.
 
Methods inherited from class org.apache.avalon.framework.configuration.DefaultConfiguration
addAll, addAll, addAllAttributes, addAllChildren, addAllChildren, addAttribute, addChild, appendValueData, checkWriteable, equals, getAttribute, getAttributeNames, getChild, getChildCount, getChildren, getChildren, getLocation, getMutableChild, getMutableChild, getMutableChildren, getMutableChildren, getName, getNamespace, getPrefix, getValue, getValue, hashCode, isReadOnly, makeReadOnly, removeChild, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setValue, setValue, setValue, setValue, setValue
 
Methods inherited from class org.apache.avalon.framework.configuration.AbstractConfiguration
getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsInteger, getAttributeAsLong, getAttributeAsLong, getChild, getValueAsBoolean, getValueAsBoolean, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFloat, getValueAsInteger, getValueAsInteger, getValueAsLong, getValueAsLong, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.avalon.framework.configuration.Configuration
getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsInteger, getAttributeAsLong, getAttributeAsLong, getChild, getValueAsBoolean, getValueAsBoolean, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFloat, getValueAsInteger, getValueAsInteger, getValueAsLong, getValueAsLong
 

Constructor Detail

PropertyAwareConfiguration

public PropertyAwareConfiguration(Configuration config,
                                  boolean deepCopy,
                                  Settings settings,
                                  Logger logger)
                           throws ConfigurationException
Copy constructor, to create a clone of another configuration. To modify children, use getChild(), removeChild() and addChild().

Parameters:
config - the Configuration to copy
deepCopy - true will cause clones of the children to be added, false will add the original instances and is thus faster.
settings - The Settings to use when resolving tokens
logger - A Logger to use
Throws:
ConfigurationException - if an error occurs when copying

PropertyAwareConfiguration

public PropertyAwareConfiguration(Configuration config,
                                  Settings settings,
                                  Logger logger)
                           throws ConfigurationException
Shallow copy constructor, suitable for craeting a writable clone of a read-only configuration. To modify children, use getChild(), removeChild() and addChild().

Parameters:
config - the Configuration to copy
settings - The Settings to use when resolving tokens
logger - A Logger to use
Throws:
ConfigurationException - if an error occurs when copying

PropertyAwareConfiguration

public PropertyAwareConfiguration(String name,
                                  Settings settings,
                                  Logger logger)
Create a new DefaultConfiguration instance.

Parameters:
name - a String value

PropertyAwareConfiguration

public PropertyAwareConfiguration(String name,
                                  String location,
                                  Settings settings,
                                  Logger logger)
Create a new DefaultConfiguration instance.

Parameters:
name - a String value
location - a String value
settings - The Settings to use when resolving tokens
logger - A Logger to use

PropertyAwareConfiguration

public PropertyAwareConfiguration(String name,
                                  String location,
                                  String ns,
                                  String prefix,
                                  Settings settings,
                                  Logger logger)
Create a new DefaultConfiguration instance.

Parameters:
name - config node name
location - Builder-specific locator string
ns - Namespace string (typically a URI). Should not be null; use "" if no namespace.
prefix - A short string prefixed to element names, associating elements with a longer namespace string. Should not be null; use "" if no namespace.
settings - The Settings to use when resolving tokens
logger - A Logger to use

PropertyAwareConfiguration

public PropertyAwareConfiguration(DefaultConfiguration config,
                                  Settings settings,
                                  Logger logger)
                           throws ConfigurationException
Create a new DefaultConfiguration instance.

Parameters:
config - A DefaultConfiguration
settings - The Settings to use when resolving tokens
logger - A Logger to use
Throws:
ConfigurationException
Method Detail

setValue

public void setValue(String value)
Set the value of this Configuration object to the specified string.

Specified by:
setValue in interface MutableConfiguration
Overrides:
setValue in class DefaultConfiguration
Parameters:
value - a String value

setAttribute

public void setAttribute(String name,
                         String value)
Set the value of the specified attribute to the specified string.

Specified by:
setAttribute in interface MutableConfiguration
Overrides:
setAttribute in class DefaultConfiguration
Parameters:
name - name of the attribute to set
value - a String value


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.