ca.uhn.hl7v2.util
Class PropertyLoader

java.lang.Object
  extended by ca.uhn.hl7v2.util.PropertyLoader

public class PropertyLoader
extends java.lang.Object

Loads system properties from a file. This is intended as a convenient way of setting multiple system properties.


Method Summary
static void loadOnce(java.lang.String propertyFileName)
          Calls loadProperties() if it has not been called before for the given file.
static void loadProperties(java.lang.String propertyFileName)
          Reads given "property file" and sets system properties accordingly.
static void main(java.lang.String[] args)
          Test harness
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadOnce

public static void loadOnce(java.lang.String propertyFileName)
                     throws java.io.IOException
Calls loadProperties() if it has not been called before for the given file. If the given property file has already been loaded, this method does nothing.

Throws:
java.io.IOException

loadProperties

public static void loadProperties(java.lang.String propertyFileName)
                           throws java.io.IOException
Reads given "property file" and sets system properties accordingly. In the property file, there should be one property per line. A line should consist of 1) the fully qualified property name, 2) one or more tabs, and 3) the value (everything after the first group of tabs and before any subsequent groups will be considered "the value"). Lines in the file are consdidered comments if they begin with "%".

Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
Test harness



Copyright © 2001-2011 University Health Network. All Rights Reserved.