org.genepattern.util
Class PropertyFactory

java.lang.Object
  extended byorg.genepattern.util.PropertyFactory
All Implemented Interfaces:
java.io.FilenameFilter

public class PropertyFactory
extends java.lang.Object
implements java.io.FilenameFilter

Class which loads properties files and returns values found in the Property file of interest This is a singleton

Version:
$Revision $

Method Summary
 boolean accept(java.io.File f, java.lang.String name)
          used to filter the resources dir for files ending with .props or .properties
static PropertyFactory getInstance()
           
 java.util.Properties getProperties(java.lang.String propertyFileName)
          Gets Properties object given a filename
 java.util.Properties getPropertiesOnClasspath(java.lang.String propsFileName)
          get properties from classpath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PropertyFactory getInstance()
Returns:
PropertiesFactory objects

getPropertiesOnClasspath

public java.util.Properties getPropertiesOnClasspath(java.lang.String propsFileName)
                                              throws PropertyNotFoundException
get properties from classpath

Throws:
PropertyNotFoundException

accept

public boolean accept(java.io.File f,
                      java.lang.String name)
used to filter the resources dir for files ending with .props or .properties

Specified by:
accept in interface java.io.FilenameFilter

getProperties

public java.util.Properties getProperties(java.lang.String propertyFileName)
                                   throws java.io.IOException,
                                          PropertyNotFoundException
Gets Properties object given a filename

Returns:
the Properties object associated with the filename
Throws:
if - can't find property file or property object
java.io.IOException
PropertyNotFoundException


Hosted by docs.bugaco.com