compbio.engine.conf
Class PropertyHelperManager
java.lang.Object
compbio.engine.conf.PropertyHelperManager
public final class PropertyHelperManager
- extends java.lang.Object
Field Summary |
static java.lang.String |
confDir
|
Method Summary |
static java.lang.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 |
confDir
public static final java.lang.String confDir
PropertyHelperManager
public PropertyHelperManager()
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 java.lang.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:
java.lang.RuntimeException
- if cannot determine the local path