All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.xmldbms.tools.PropertyProcessor

java.lang.Object
   |
   +----org.xmlmiddleware.xmldbms.tools.PropertyProcessor

public class PropertyProcessor
extends Object
Base class for Transfer and MapManager. For internal use only.

PropertyProcessor reads properties from a set of property/value pairs or a properties file. It then adds these to an existing Properties object. If requested, PropertyProcessor will recursively replace all property file properties (File, File1, File2, etc.) with their contents. This makes it possible to distribute properties over a hierarchy of property files.

Note that in expanding property files as well as constructing properties from an array of property/value pairs, duplicate properties are silently overwritten. Thus, the last value of a given property that is read is the one that is used.

PropertyProcessor is the base class for Transfer and MapManager.

Version:
2.0
Author:
Adam Flinton, Ronald Bourret

Constructor Index

 o PropertyProcessor()
Construct a PropertyProcessor object.

Method Index

 o addPropertiesFromArray(Properties, String[], int, boolean)
Add properties to a Properties object from an array of property/value pairs.
 o addPropertiesFromFile(Properties, String, boolean)
Add properties to a Properties object from a property file.

Constructors

 o PropertyProcessor
 public PropertyProcessor()
Construct a PropertyProcessor object.

Methods

 o addPropertiesFromArray
 public void addPropertiesFromArray(Properties props,
                                    String pairs[],
                                    int start,
                                    boolean expandFiles) throws XMLMiddlewareException
Add properties to a Properties object from an array of property/value pairs.

The syntax of each string is:

    =
 

Parameters:
props - The Properties object to add the new properties to
pairs - String array of property/value pairs.
start - The index to start in the pairs array. 0-based.
expandFiles - Whether to expand property files, etc. See the introduction for details.
Throws: XMLMiddlewareException
Thrown if an input file is not found or if an error occurs accessing an input file.
 o addPropertiesFromFile
 public void addPropertiesFromFile(Properties props,
                                   String filename,
                                   boolean expandFiles) throws XMLMiddlewareException
Add properties to a Properties object from a property file.

Parameters:
props - The Properties object to add the new properties to
filename - Name of the property file.
expandFiles - Whether to expand property files, etc. See the introduction for details.
Throws: XMLMiddlewareException
Thrown if an input file is not found or if an error occurs accessing an input file.

All Packages  Class Hierarchy  This Package  Previous  Next  Index