1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (1.8.0_121) on Fri Apr 21 15:32:50 BST 2017 -->
6 <title>PropertyHelperManager</title>
7 <meta name="date" content="2017-04-21">
8 <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
9 <script type="text/javascript" src="../../../script.js"></script>
12 <script type="text/javascript"><!--
14 if (location.href.indexOf('is-external=true') == -1) {
15 parent.document.title="PropertyHelperManager";
21 var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9};
22 var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
23 var altColor = "altColor";
24 var rowColor = "rowColor";
25 var tableTab = "tableTab";
26 var activeTableTab = "activeTableTab";
29 <div>JavaScript is disabled on your browser.</div>
31 <!-- ========= START OF TOP NAVBAR ======= -->
32 <div class="topNav"><a name="navbar.top">
35 <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
36 <a name="navbar.top.firstrow">
39 <ul class="navList" title="Navigation">
40 <li><a href="../../../overview-summary.html">Overview</a></li>
41 <li><a href="package-summary.html">Package</a></li>
42 <li class="navBarCell1Rev">Class</li>
43 <li><a href="class-use/PropertyHelperManager.html">Use</a></li>
44 <li><a href="package-tree.html">Tree</a></li>
45 <li><a href="../../../deprecated-list.html">Deprecated</a></li>
46 <li><a href="../../../index-files/index-1.html">Index</a></li>
47 <li><a href="../../../help-doc.html">Help</a></li>
52 <li><a href="../../../compbio/engine/conf/DirectoryManager.html" title="class in compbio.engine.conf"><span class="typeNameLink">Prev Class</span></a></li>
53 <li><a href="../../../compbio/engine/conf/RunnerConfigMarshaller.html" title="class in compbio.engine.conf"><span class="typeNameLink">Next Class</span></a></li>
56 <li><a href="../../../index.html?compbio/engine/conf/PropertyHelperManager.html" target="_top">Frames</a></li>
57 <li><a href="PropertyHelperManager.html" target="_top">No Frames</a></li>
59 <ul class="navList" id="allclasses_navbar_top">
60 <li><a href="../../../allclasses-noframe.html">All Classes</a></li>
63 <script type="text/javascript"><!--
64 allClassesLink = document.getElementById("allclasses_navbar_top");
66 allClassesLink.style.display = "block";
69 allClassesLink.style.display = "none";
75 <ul class="subNavList">
76 <li>Summary: </li>
77 <li>Nested | </li>
78 <li><a href="#field.summary">Field</a> | </li>
79 <li><a href="#constructor.summary">Constr</a> | </li>
80 <li><a href="#method.summary">Method</a></li>
82 <ul class="subNavList">
83 <li>Detail: </li>
84 <li><a href="#field.detail">Field</a> | </li>
85 <li><a href="#constructor.detail">Constr</a> | </li>
86 <li><a href="#method.detail">Method</a></li>
89 <a name="skip.navbar.top">
92 <!-- ========= END OF TOP NAVBAR ========= -->
93 <!-- ======== START OF CLASS DATA ======== -->
95 <div class="subTitle">compbio.engine.conf</div>
96 <h2 title="Class PropertyHelperManager" class="title">Class PropertyHelperManager</h2>
98 <div class="contentContainer">
99 <ul class="inheritance">
100 <li>java.lang.Object</li>
102 <ul class="inheritance">
103 <li>compbio.engine.conf.PropertyHelperManager</li>
107 <div class="description">
108 <ul class="blockList">
109 <li class="blockList">
112 <pre>public final class <span class="typeNameLabel">PropertyHelperManager</span>
113 extends java.lang.Object</pre>
117 <div class="summary">
118 <ul class="blockList">
119 <li class="blockList">
120 <!-- =========== FIELD SUMMARY =========== -->
121 <ul class="blockList">
122 <li class="blockList"><a name="field.summary">
125 <h3>Field Summary</h3>
126 <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
127 <caption><span>Fields</span><span class="tabEnd"> </span></caption>
129 <th class="colFirst" scope="col">Modifier and Type</th>
130 <th class="colLast" scope="col">Field and Description</th>
132 <tr class="altColor">
133 <td class="colFirst"><code>static java.lang.String</code></td>
134 <td class="colLast"><code><span class="memberNameLink"><a href="../../../compbio/engine/conf/PropertyHelperManager.html#confDir">confDir</a></span></code> </td>
136 <tr class="rowColor">
137 <td class="colFirst"><code>private static org.apache.log4j.Logger</code></td>
138 <td class="colLast"><code><span class="memberNameLink"><a href="../../../compbio/engine/conf/PropertyHelperManager.html#log">log</a></span></code> </td>
140 <tr class="altColor">
141 <td class="colFirst"><code>private static compbio.util.PropertyHelper</code></td>
142 <td class="colLast"><code><span class="memberNameLink"><a href="../../../compbio/engine/conf/PropertyHelperManager.html#ph">ph</a></span></code> </td>
147 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
148 <ul class="blockList">
149 <li class="blockList"><a name="constructor.summary">
152 <h3>Constructor Summary</h3>
153 <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
154 <caption><span>Constructors</span><span class="tabEnd"> </span></caption>
156 <th class="colOne" scope="col">Constructor and Description</th>
158 <tr class="altColor">
159 <td class="colOne"><code><span class="memberNameLink"><a href="../../../compbio/engine/conf/PropertyHelperManager.html#PropertyHelperManager--">PropertyHelperManager</a></span>()</code> </td>
164 <!-- ========== METHOD SUMMARY =========== -->
165 <ul class="blockList">
166 <li class="blockList"><a name="method.summary">
169 <h3>Method Summary</h3>
170 <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
171 <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
173 <th class="colFirst" scope="col">Modifier and Type</th>
174 <th class="colLast" scope="col">Method and Description</th>
176 <tr id="i0" class="altColor">
177 <td class="colFirst"><code>static boolean</code></td>
178 <td class="colLast"><code><span class="memberNameLink"><a href="../../../compbio/engine/conf/PropertyHelperManager.html#getBooleanProperty-java.lang.String-">getBooleanProperty</a></span>(java.lang.String propValue)</code> </td>
180 <tr id="i1" class="rowColor">
181 <td class="colFirst"><code>static int</code></td>
182 <td class="colLast"><code><span class="memberNameLink"><a href="../../../compbio/engine/conf/PropertyHelperManager.html#getIntProperty-java.lang.String-">getIntProperty</a></span>(java.lang.String propValue)</code> </td>
184 <tr id="i2" class="altColor">
185 <td class="colFirst"><code>static java.lang.String</code></td>
186 <td class="colLast"><code><span class="memberNameLink"><a href="../../../compbio/engine/conf/PropertyHelperManager.html#getLocalPath--">getLocalPath</a></span>()</code>
187 <div class="block">Method return the absolute path to the project root directory.</div>
190 <tr id="i3" class="rowColor">
191 <td class="colFirst"><code>static compbio.util.PropertyHelper</code></td>
192 <td class="colLast"><code><span class="memberNameLink"><a href="../../../compbio/engine/conf/PropertyHelperManager.html#getPropertyHelper--">getPropertyHelper</a></span>()</code>
193 <div class="block">Ways to fix path problem:
194 1) find a path to WEB-INF directory based on the path to a known class.</div>
197 <tr id="i4" class="altColor">
198 <td class="colFirst"><code>(package private) static java.io.File</code></td>
199 <td class="colLast"><code><span class="memberNameLink"><a href="../../../compbio/engine/conf/PropertyHelperManager.html#getResourceFromClasspath-java.lang.String-">getResourceFromClasspath</a></span>(java.lang.String resourceName)</code> </td>
202 <ul class="blockList">
203 <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
206 <h3>Methods inherited from class java.lang.Object</h3>
207 <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
214 <div class="details">
215 <ul class="blockList">
216 <li class="blockList">
217 <!-- ============ FIELD DETAIL =========== -->
218 <ul class="blockList">
219 <li class="blockList"><a name="field.detail">
222 <h3>Field Detail</h3>
226 <ul class="blockList">
227 <li class="blockList">
229 <pre>private static org.apache.log4j.Logger log</pre>
235 <ul class="blockList">
236 <li class="blockList">
238 <pre>private static compbio.util.PropertyHelper ph</pre>
244 <ul class="blockListLast">
245 <li class="blockList">
247 <pre>public static final java.lang.String confDir</pre>
252 <!-- ========= CONSTRUCTOR DETAIL ======== -->
253 <ul class="blockList">
254 <li class="blockList"><a name="constructor.detail">
257 <h3>Constructor Detail</h3>
258 <a name="PropertyHelperManager--">
261 <ul class="blockListLast">
262 <li class="blockList">
263 <h4>PropertyHelperManager</h4>
264 <pre>public PropertyHelperManager()</pre>
269 <!-- ============ METHOD DETAIL ========== -->
270 <ul class="blockList">
271 <li class="blockList"><a name="method.detail">
274 <h3>Method Detail</h3>
275 <a name="getPropertyHelper--">
278 <ul class="blockList">
279 <li class="blockList">
280 <h4>getPropertyHelper</h4>
281 <pre>public static compbio.util.PropertyHelper getPropertyHelper()</pre>
282 <div class="block">Ways to fix path problem:
283 1) find a path to WEB-INF directory based on the path to a known class.
284 Then prepend this absolute path to the rest of paths
285 pros: no input from user
286 cons: relocation of the source may cause problems
288 2) Require users to add configuration directories to the class
289 path and then load entries from it.
291 cons: Many paths needs to be added. Put significant burden on the user.
292 Hard to tell web appl server to add these entries to its class path.
294 3) Ask for project source directory explicitly in the configuration.
296 cons: similar to 1, but this initial configuration file must reside in
297 well known location! Why ask users what can be found automatically?
299 4) Have everything in the location already in class path for tomcat.
301 cons: only classes and lib/*.jar are added, Eclipse will remove non
302 classses from classes dir.
304 Try 1 - succeed.</div>
306 <dt><span class="returnLabel">Returns:</span></dt>
311 <a name="getResourceFromClasspath-java.lang.String-">
314 <ul class="blockList">
315 <li class="blockList">
316 <h4>getResourceFromClasspath</h4>
317 <pre>static java.io.File getResourceFromClasspath(java.lang.String resourceName)</pre>
320 <a name="getLocalPath--">
323 <ul class="blockList">
324 <li class="blockList">
325 <h4>getLocalPath</h4>
326 <pre>public static java.lang.String getLocalPath()</pre>
327 <div class="block">Method return the absolute path to the project root directory. It assumes
328 the following structure of the project:
332 WEB-INF/classes/compbio/engine/conf/PropertyHelperManager.class
333 If the structure changes it must be reflected in this method</div>
335 <dt><span class="returnLabel">Returns:</span></dt>
336 <dd>the local path</dd>
337 <dt><span class="throwsLabel">Throws:</span></dt>
338 <dd><code>java.lang.RuntimeException</code> - if cannot determine the local path</dd>
342 <a name="getIntProperty-java.lang.String-">
345 <ul class="blockList">
346 <li class="blockList">
347 <h4>getIntProperty</h4>
348 <pre>public static int getIntProperty(java.lang.String propValue)</pre>
351 <a name="getBooleanProperty-java.lang.String-">
354 <ul class="blockListLast">
355 <li class="blockList">
356 <h4>getBooleanProperty</h4>
357 <pre>public static boolean getBooleanProperty(java.lang.String propValue)</pre>
366 <!-- ========= END OF CLASS DATA ========= -->
367 <!-- ======= START OF BOTTOM NAVBAR ====== -->
368 <div class="bottomNav"><a name="navbar.bottom">
371 <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
372 <a name="navbar.bottom.firstrow">
375 <ul class="navList" title="Navigation">
376 <li><a href="../../../overview-summary.html">Overview</a></li>
377 <li><a href="package-summary.html">Package</a></li>
378 <li class="navBarCell1Rev">Class</li>
379 <li><a href="class-use/PropertyHelperManager.html">Use</a></li>
380 <li><a href="package-tree.html">Tree</a></li>
381 <li><a href="../../../deprecated-list.html">Deprecated</a></li>
382 <li><a href="../../../index-files/index-1.html">Index</a></li>
383 <li><a href="../../../help-doc.html">Help</a></li>
388 <li><a href="../../../compbio/engine/conf/DirectoryManager.html" title="class in compbio.engine.conf"><span class="typeNameLink">Prev Class</span></a></li>
389 <li><a href="../../../compbio/engine/conf/RunnerConfigMarshaller.html" title="class in compbio.engine.conf"><span class="typeNameLink">Next Class</span></a></li>
392 <li><a href="../../../index.html?compbio/engine/conf/PropertyHelperManager.html" target="_top">Frames</a></li>
393 <li><a href="PropertyHelperManager.html" target="_top">No Frames</a></li>
395 <ul class="navList" id="allclasses_navbar_bottom">
396 <li><a href="../../../allclasses-noframe.html">All Classes</a></li>
399 <script type="text/javascript"><!--
400 allClassesLink = document.getElementById("allclasses_navbar_bottom");
402 allClassesLink.style.display = "block";
405 allClassesLink.style.display = "none";
411 <ul class="subNavList">
412 <li>Summary: </li>
413 <li>Nested | </li>
414 <li><a href="#field.summary">Field</a> | </li>
415 <li><a href="#constructor.summary">Constr</a> | </li>
416 <li><a href="#method.summary">Method</a></li>
418 <ul class="subNavList">
419 <li>Detail: </li>
420 <li><a href="#field.detail">Field</a> | </li>
421 <li><a href="#constructor.detail">Constr</a> | </li>
422 <li><a href="#method.detail">Method</a></li>
425 <a name="skip.navbar.bottom">
428 <!-- ======== END OF BOTTOM NAVBAR ======= -->