org.apache.cocoon.framework
Class Configurations

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--java.util.Properties
                    |
                    +--org.apache.cocoon.framework.Configurations

public class Configurations
extends java.util.Properties

This class encapsulates all the configurations needed by a Configurable class to work.

Version:
$Revision: 1.8 $ $Date: 1999/10/13 22:55:41 $
Author:
Stefano Mazzocchi
See Also:
Serialized Form

Field Summary
private  java.lang.String baseName
           
 
Fields inherited from class java.util.Properties
defaults, hexDigit, keyValueSeparators, serialVersionUID, specialSaveChars, strictKeyValueSeparators, whiteSpaceChars
 
Fields inherited from class java.util.Hashtable
count, ENTRIES, entrySet, KEYS, keySet, loadFactor, modCount, serialVersionUID, table, threshold, values, VALUES
 
Constructor Summary
Configurations()
           
Configurations(Configurations c)
          Create the class with given defaults.
Configurations(java.lang.String file)
          Create the class from a the file
Configurations(java.lang.String file, Configurations defaults)
          Create the class with given defaults and from the file
 
Method Summary
 java.lang.Object get(java.lang.String key)
          Get the configuration.
 java.lang.Object get(java.lang.String key, java.lang.Object def)
          Get the configuration and use the given default value if not found.
 Configurations getConfigurations(java.lang.String base)
          Create a subconfiguration starting from the base node.
 java.lang.Object getNotNull(java.lang.String key)
          Get the configuration, throw an exception if not present.
 java.util.Vector getVector(java.lang.String key)
          Get a vector of configurations when the syntax is incremental
 void set(java.lang.String key, java.lang.Object value)
          Set the configuration.
 void setBasename(java.lang.String baseName)
           
 
Methods inherited from class java.util.Properties
, continueLine, enumerate, getProperty, getProperty, list, list, load, loadConvert, propertyNames, save, saveConvert, setProperty, store, toHex, writeln
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, readObject, rehash, remove, size, toString, values, writeObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

baseName

private java.lang.String baseName
Constructor Detail

Configurations

public Configurations()

Configurations

public Configurations(java.lang.String file)
               throws java.lang.Exception
Create the class from a the file

Configurations

public Configurations(java.lang.String file,
                      Configurations defaults)
               throws java.lang.Exception
Create the class with given defaults and from the file

Configurations

public Configurations(Configurations c)
Create the class with given defaults.
Method Detail

set

public void set(java.lang.String key,
                java.lang.Object value)
Set the configuration.

get

public java.lang.Object get(java.lang.String key)
Get the configuration.

get

public java.lang.Object get(java.lang.String key,
                            java.lang.Object def)
Get the configuration and use the given default value if not found.

getNotNull

public java.lang.Object getNotNull(java.lang.String key)
Get the configuration, throw an exception if not present.

getVector

public java.util.Vector getVector(java.lang.String key)
Get a vector of configurations when the syntax is incremental

getConfigurations

public Configurations getConfigurations(java.lang.String base)
Create a subconfiguration starting from the base node.

setBasename

public void setBasename(java.lang.String baseName)


Copyright 1999 Java Apache Project. All Rights Reserved.