wt.util
Class NestedProperties

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byjava.util.Properties
              extended bywt.util.WTProperties
                  extended bywt.util.NestedProperties
All Implemented Interfaces:
Cloneable, Map, Serializable
Direct Known Subclasses:
CoreQueryProperties

public class NestedProperties
extends WTProperties

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Hashtable
 
Field Summary
 
Fields inherited from class wt.util.WTProperties
RESOURCE_NAME, SERVER_CODEBASE_LOCATOR, SERVER_CODEBASE_PROPERTY
 
Fields inherited from class java.util.Properties
 
Fields inherited from class java.util.Hashtable
 
Constructor Summary
NestedProperties(Properties defaults)
          NestedProperties constructor comment.
 
Method Summary
static void addOptionalProperties(String propertyName)
          If they exist, add the properties of a file resource, specified by a property in the local properties, to the local properties.
static void addOptionalPropertiesFile(String fileName, String dir)
          If they exist, add the properties of a file resource to the local properties.
static void addProperties(String propertyName)
          Add the properties of a file resource, specified by a property in the local properties, to the local properties.
private static void addProperties(String propertyName, boolean optional)
           
static void addPropertiesFile(String fileName, String dir)
          Add the properties of a file resource, specified by a property in the local properties, to the local properties.
private static void addPropertiesFile(String fileName, String dir, boolean optional)
           
static void main(String[] args)
          Simple tester.
 
Methods inherited from class wt.util.WTProperties
appendPropertyToFile, appendPropertyToFile, copyFile, getAppletProperties, getLocalProperties, getProperty, getProperty, getProperty, getServerCodebase, getServerCodebase, getServerProperties, getServerProperties, getURL, list, parseArgs, propertyNames, reset, setLocalPropertiesOnly, setVerbose, store, store, store, substitute
 
Methods inherited from class java.util.Properties
getProperty, list, list, load, save, setProperty, store
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedProperties

public NestedProperties(Properties defaults)
NestedProperties constructor comment.

Parameters:
defaults - java.util.Properties
Method Detail

addOptionalProperties

public static void addOptionalProperties(String propertyName)
                                  throws IOException
If they exist, add the properties of a file resource, specified by a property in the local properties, to the local properties. After the properties from the file are loaded into the local properties, any args that were passed into the application's WTContext will override properties that are in the local properties.

Parameters:
propertyName - the key to the property in the local properties that contains the name of the file resource
Throws:
IOException

addProperties

private static void addProperties(String propertyName,
                                  boolean optional)
                           throws IOException
Throws:
IOException

addProperties

public static void addProperties(String propertyName)
                          throws IOException
Add the properties of a file resource, specified by a property in the local properties, to the local properties. After the properties from the file are loaded into the local properties, any args that were passed into the application's WTContext will override properties that are in the local properties.

Parameters:
propertyName - the key to the property in the local properties that contains the name of the file resource
Throws:
IOException

addOptionalPropertiesFile

public static void addOptionalPropertiesFile(String fileName,
                                             String dir)
                                      throws IOException
If they exist, add the properties of a file resource to the local properties. After the properties from the file are loaded into the local properties, any args that were passed into the application's WTContext will override properties that are in the local properties.

Parameters:
fileName - the name of the file resource
dir - optional directory path for the file
Throws:
IOException

addPropertiesFile

private static void addPropertiesFile(String fileName,
                                      String dir,
                                      boolean optional)
                               throws IOException
Throws:
IOException

addPropertiesFile

public static void addPropertiesFile(String fileName,
                                     String dir)
                              throws IOException
Add the properties of a file resource, specified by a property in the local properties, to the local properties. After the properties from the file are loaded into the local properties, any args that were passed into the application's WTContext will override properties that are in the local properties.

Parameters:
fileName - the name of the file resource
dir - optional directory path for the file
Throws:
IOException

main

public static void main(String[] args)
                 throws IOException
Simple tester. Prints local and server properties lists. If an argument is specified, it is used as a prefix filter on the keys.

Throws:
IOException