compbio.engine.conf
Class PropertyHelperManager

java.lang.Object
  extended by compbio.engine.conf.PropertyHelperManager

public final class PropertyHelperManager
extends Object


Field Summary
static String confDir
           
 
Constructor Summary
PropertyHelperManager()
           
 
Method Summary
static String getLocalPath()
          Method return the absolute path to the project root directory.
static compbio.util.PropertyHelper getPropertyHelper()
          Ways to fix path problem: 1) find a path to WEB-INF directory based on the path to a known class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

confDir

public static final String confDir
Constructor Detail

PropertyHelperManager

public PropertyHelperManager()
Method Detail

getPropertyHelper

public static compbio.util.PropertyHelper getPropertyHelper()
Ways to fix path problem: 1) find a path to WEB-INF directory based on the path to a known class. Then prepend this absolute path to the rest of paths pros: no input from user cons: relocation of the source may cause problems 2) Require users to add configuration directories to the class path and then load entries from it. pros: cons: Many paths needs to be added. Put significant burden on the user. Hard to tell web appl server to add these entries to its class path. 3) Ask for project source directory explicitly in the configuration. pros cons: similar to 1, but this initial configuration file must reside in well known location! Why ask users what can be found automatically? 4) Have everything in the location already in class path for tomcat. cons: only classes and lib/*.jar are added, eclipse will remove non classses from classes dir. Try 1 - succeed.

Returns:
an instance

getLocalPath

public static String getLocalPath()
Method return the absolute path to the project root directory. It assumes the following structure of the project project root conf settings binaries WEB-INF classes compbio engine conf If the structure changes it must be reflected in this method

Returns:
the local path
Throws:
RuntimeException - if cannot determine the local path