Files
DependencyCheck/dependency-check-utils/apidocs/org/owasp/dependencycheck/utils/Settings.html
2015-03-06 19:43:56 -05:00

737 lines
46 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Fri Mar 06 06:02:09 EST 2015 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Settings (Dependency-Check Utils 1.2.9 API)</title>
<meta name="date" content="2015-03-06">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Settings (Dependency-Check Utils 1.2.9 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Settings.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/owasp/dependencycheck/utils/LogUtils.html" title="class in org.owasp.dependencycheck.utils"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/owasp/dependencycheck/utils/Settings.KEYS.html" title="class in org.owasp.dependencycheck.utils"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/owasp/dependencycheck/utils/Settings.html" target="_top">Frames</a></li>
<li><a href="Settings.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.owasp.dependencycheck.utils</div>
<h2 title="Class Settings" class="title">Class Settings</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.owasp.dependencycheck.utils.Settings</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="strong">Settings</span>
extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">A simple settings container that wraps the dependencycheck.properties file.</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>Jeremy Long <jeremy.long@owasp.org></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.KEYS.html" title="class in org.owasp.dependencycheck.utils">Settings.KEYS</a></strong></code>
<div class="block">The collection of keys used within the properties file.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#cleanup()">cleanup</a></strong>()</code>
<div class="block">Cleans up resources to prevent memory leaks.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#cleanup(boolean)">cleanup</a></strong>(boolean&nbsp;deleteTemporary)</code>
<div class="block">Cleans up resources to prevent memory leaks.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getBoolean(java.lang.String)">getBoolean</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>
<div class="block">Returns a boolean value from the properties file.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getBoolean(java.lang.String,%20boolean)">getBoolean</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
boolean&nbsp;defaultValue)</code>
<div class="block">Returns a boolean value from the properties file.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getConnectionString(java.lang.String,%20java.lang.String,%20java.lang.String)">getConnectionString</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;connectionStringKey,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;dbFileNameKey,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;dbVersionKey)</code>
<div class="block">Returns a connection string from the configured properties.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getDataDirectory()">getDataDirectory</a></strong>()</code>
<div class="block">Retrieves the directory that the JAR file exists in so that we can ensure we always use a common data directory
for the embedded H2 database.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getDataFile(java.lang.String)">getDataFile</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>
<div class="block">Returns a value from the properties file as a File object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getFile(java.lang.String)">getFile</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>
<div class="block">Returns a value from the properties file as a File object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/owasp/dependencycheck/utils/Settings.html" title="class in org.owasp.dependencycheck.utils">Settings</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getInstance()">getInstance</a></strong>()</code>
<div class="block">Gets the underlying instance of the Settings object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getInt(java.lang.String)">getInt</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>
<div class="block">Returns an int value from the properties file.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getInt(java.lang.String,%20int)">getInt</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
int&nbsp;defaultValue)</code>
<div class="block">Returns an int value from the properties file.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getLong(java.lang.String)">getLong</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>
<div class="block">Returns a long value from the properties file.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getString(java.lang.String)">getString</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>
<div class="block">Returns a value from the properties file.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getString(java.lang.String,%20java.lang.String)">getString</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;defaultValue)</code>
<div class="block">Returns a value from the properties file.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#getTempDirectory()">getTempDirectory</a></strong>()</code>
<div class="block">Returns the temporary directory.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#initialize()">initialize</a></strong>()</code>
<div class="block">Initializes the thread local settings object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#initialize(java.lang.String)">initialize</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;propertiesFilePath)</code>
<div class="block">Initializes the thread local settings object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#mergeProperties(java.io.File)">mergeProperties</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;filePath)</code>
<div class="block">Merges a new properties file into the current properties.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#mergeProperties(java.io.InputStream)">mergeProperties</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;stream)</code>
<div class="block">Merges a new properties file into the current properties.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#mergeProperties(java.lang.String)">mergeProperties</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filePath)</code>
<div class="block">Merges a new properties file into the current properties.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#removeProperty(java.lang.String)">removeProperty</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>
<div class="block">Removes a property from the local properties collection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#setBoolean(java.lang.String,%20boolean)">setBoolean</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
boolean&nbsp;value)</code>
<div class="block">Sets a property value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#setInstance(org.owasp.dependencycheck.utils.Settings)">setInstance</a></strong>(<a href="../../../../org/owasp/dependencycheck/utils/Settings.html" title="class in org.owasp.dependencycheck.utils">Settings</a>&nbsp;instance)</code>
<div class="block">Sets the instance of the Settings object to use in this thread.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/owasp/dependencycheck/utils/Settings.html#setString(java.lang.String,%20java.lang.String)">setString</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">Sets a property value.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="initialize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initialize</h4>
<pre>public static&nbsp;void&nbsp;initialize()</pre>
<div class="block">Initializes the thread local settings object. Note, to use the settings object you must call this method.
However, you must also call Settings.cleanup() to properly release resources.</div>
</li>
</ul>
<a name="initialize(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initialize</h4>
<pre>public static&nbsp;void&nbsp;initialize(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;propertiesFilePath)</pre>
<div class="block">Initializes the thread local settings object. Note, to use the settings object you must call this method.
However, you must also call Settings.cleanup() to properly release resources.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>propertiesFilePath</code> - the path to the base properties file to load</dd></dl>
</li>
</ul>
<a name="cleanup()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cleanup</h4>
<pre>public static&nbsp;void&nbsp;cleanup()</pre>
<div class="block">Cleans up resources to prevent memory leaks.</div>
</li>
</ul>
<a name="cleanup(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cleanup</h4>
<pre>public static&nbsp;void&nbsp;cleanup(boolean&nbsp;deleteTemporary)</pre>
<div class="block">Cleans up resources to prevent memory leaks.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>deleteTemporary</code> - flag indicating whether any temporary directories generated should be removed</dd></dl>
</li>
</ul>
<a name="getInstance()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInstance</h4>
<pre>public static&nbsp;<a href="../../../../org/owasp/dependencycheck/utils/Settings.html" title="class in org.owasp.dependencycheck.utils">Settings</a>&nbsp;getInstance()</pre>
<div class="block">Gets the underlying instance of the Settings object.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the Settings object</dd></dl>
</li>
</ul>
<a name="setInstance(org.owasp.dependencycheck.utils.Settings)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setInstance</h4>
<pre>public static&nbsp;void&nbsp;setInstance(<a href="../../../../org/owasp/dependencycheck/utils/Settings.html" title="class in org.owasp.dependencycheck.utils">Settings</a>&nbsp;instance)</pre>
<div class="block">Sets the instance of the Settings object to use in this thread.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>instance</code> - the instance of the settings object to use in this thread</dd></dl>
</li>
</ul>
<a name="setString(java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setString</h4>
<pre>public static&nbsp;void&nbsp;setString(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</pre>
<div class="block">Sets a property value.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key for the property</dd><dd><code>value</code> - the value for the property</dd></dl>
</li>
</ul>
<a name="setBoolean(java.lang.String, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBoolean</h4>
<pre>public static&nbsp;void&nbsp;setBoolean(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
boolean&nbsp;value)</pre>
<div class="block">Sets a property value.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key for the property</dd><dd><code>value</code> - the value for the property</dd></dl>
</li>
</ul>
<a name="mergeProperties(java.io.File)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mergeProperties</h4>
<pre>public static&nbsp;void&nbsp;mergeProperties(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;filePath)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Merges a new properties file into the current properties. This method allows for the loading of a user provided
properties file.<br/><br/>
Note: even if using this method - system properties will be loaded before properties loaded from files.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>filePath</code> - the path to the properties file to merge.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></code> - is thrown when the filePath points to a non-existent file</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - is thrown when there is an exception loading/merging the properties</dd></dl>
</li>
</ul>
<a name="mergeProperties(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mergeProperties</h4>
<pre>public static&nbsp;void&nbsp;mergeProperties(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filePath)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Merges a new properties file into the current properties. This method allows for the loading of a user provided
properties file.<br/><br/>
Note: even if using this method - system properties will be loaded before properties loaded from files.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>filePath</code> - the path to the properties file to merge.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></code> - is thrown when the filePath points to a non-existent file</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - is thrown when there is an exception loading/merging the properties</dd></dl>
</li>
</ul>
<a name="mergeProperties(java.io.InputStream)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mergeProperties</h4>
<pre>public static&nbsp;void&nbsp;mergeProperties(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;stream)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Merges a new properties file into the current properties. This method allows for the loading of a user provided
properties file.<br/><br/>
Note: even if using this method - system properties will be loaded before properties loaded from files.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>stream</code> - an Input Stream pointing at a properties file to merge</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - is thrown when there is an exception loading/merging the properties</dd></dl>
</li>
</ul>
<a name="getFile(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFile</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getFile(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</pre>
<div class="block">Returns a value from the properties file as a File object. If the value was specified as a system property or
passed in via the -Dprop=value argument - this method will return the value from the system properties before the
values in the contained configuration file.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to lookup within the properties file</dd>
<dt><span class="strong">Returns:</span></dt><dd>the property from the properties file converted to a File object</dd></dl>
</li>
</ul>
<a name="getDataFile(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDataFile</h4>
<pre>protected static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getDataFile(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</pre>
<div class="block">Returns a value from the properties file as a File object. If the value was specified as a system property or
passed in via the -Dprop=value argument - this method will return the value from the system properties before the
values in the contained configuration file.
This method will check the configured base directory and will use this as the base of the file path.
Additionally, if the base directory begins with a leading "[JAR]\" sequence with the path to the folder
containing the JAR file containing this class.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to lookup within the properties file</dd>
<dt><span class="strong">Returns:</span></dt><dd>the property from the properties file converted to a File object</dd></dl>
</li>
</ul>
<a name="getString(java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getString</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getString(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;defaultValue)</pre>
<div class="block">Returns a value from the properties file. If the value was specified as a system property or passed in via the
-Dprop=value argument - this method will return the value from the system properties before the values in the
contained configuration file.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to lookup within the properties file</dd><dd><code>defaultValue</code> - the default value for the requested property</dd>
<dt><span class="strong">Returns:</span></dt><dd>the property from the properties file</dd></dl>
</li>
</ul>
<a name="getTempDirectory()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTempDirectory</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getTempDirectory()
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Returns the temporary directory.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the temporary directory</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - thrown if the temporary directory does not exist and cannot be created</dd></dl>
</li>
</ul>
<a name="getString(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getString</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getString(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</pre>
<div class="block">Returns a value from the properties file. If the value was specified as a system property or passed in via the
-Dprop=value argument - this method will return the value from the system properties before the values in the
contained configuration file.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to lookup within the properties file</dd>
<dt><span class="strong">Returns:</span></dt><dd>the property from the properties file</dd></dl>
</li>
</ul>
<a name="removeProperty(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeProperty</h4>
<pre>public static&nbsp;void&nbsp;removeProperty(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</pre>
<div class="block">Removes a property from the local properties collection. This is mainly used in test cases.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the property key to remove</dd></dl>
</li>
</ul>
<a name="getInt(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInt</h4>
<pre>public static&nbsp;int&nbsp;getInt(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)
throws <a href="../../../../org/owasp/dependencycheck/utils/InvalidSettingException.html" title="class in org.owasp.dependencycheck.utils">InvalidSettingException</a></pre>
<div class="block">Returns an int value from the properties file. If the value was specified as a system property or passed in via
the -Dprop=value argument - this method will return the value from the system properties before the values in the
contained configuration file.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to lookup within the properties file</dd>
<dt><span class="strong">Returns:</span></dt><dd>the property from the properties file</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/owasp/dependencycheck/utils/InvalidSettingException.html" title="class in org.owasp.dependencycheck.utils">InvalidSettingException</a></code> - is thrown if there is an error retrieving the setting</dd></dl>
</li>
</ul>
<a name="getInt(java.lang.String, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInt</h4>
<pre>public static&nbsp;int&nbsp;getInt(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
int&nbsp;defaultValue)</pre>
<div class="block">Returns an int value from the properties file. If the value was specified as a system property or passed in via
the -Dprop=value argument - this method will return the value from the system properties before the values in the
contained configuration file.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to lookup within the properties file</dd><dd><code>defaultValue</code> - the default value to return</dd>
<dt><span class="strong">Returns:</span></dt><dd>the property from the properties file or the defaultValue if the property does not exist or cannot be
converted to an integer</dd></dl>
</li>
</ul>
<a name="getLong(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLong</h4>
<pre>public static&nbsp;long&nbsp;getLong(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)
throws <a href="../../../../org/owasp/dependencycheck/utils/InvalidSettingException.html" title="class in org.owasp.dependencycheck.utils">InvalidSettingException</a></pre>
<div class="block">Returns a long value from the properties file. If the value was specified as a system property or passed in via
the -Dprop=value argument - this method will return the value from the system properties before the values in the
contained configuration file.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to lookup within the properties file</dd>
<dt><span class="strong">Returns:</span></dt><dd>the property from the properties file</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/owasp/dependencycheck/utils/InvalidSettingException.html" title="class in org.owasp.dependencycheck.utils">InvalidSettingException</a></code> - is thrown if there is an error retrieving the setting</dd></dl>
</li>
</ul>
<a name="getBoolean(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBoolean</h4>
<pre>public static&nbsp;boolean&nbsp;getBoolean(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)
throws <a href="../../../../org/owasp/dependencycheck/utils/InvalidSettingException.html" title="class in org.owasp.dependencycheck.utils">InvalidSettingException</a></pre>
<div class="block">Returns a boolean value from the properties file. If the value was specified as a system property or passed in
via the <code>-Dprop=value</code> argument this method will return the value from the system properties before
the values in the contained configuration file.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to lookup within the properties file</dd>
<dt><span class="strong">Returns:</span></dt><dd>the property from the properties file</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/owasp/dependencycheck/utils/InvalidSettingException.html" title="class in org.owasp.dependencycheck.utils">InvalidSettingException</a></code> - is thrown if there is an error retrieving the setting</dd></dl>
</li>
</ul>
<a name="getBoolean(java.lang.String, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBoolean</h4>
<pre>public static&nbsp;boolean&nbsp;getBoolean(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
boolean&nbsp;defaultValue)
throws <a href="../../../../org/owasp/dependencycheck/utils/InvalidSettingException.html" title="class in org.owasp.dependencycheck.utils">InvalidSettingException</a></pre>
<div class="block">Returns a boolean value from the properties file. If the value was specified as a system property or passed in
via the <code>-Dprop=value</code> argument this method will return the value from the system properties before
the values in the contained configuration file.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to lookup within the properties file</dd><dd><code>defaultValue</code> - the default value to return if the setting does not exist</dd>
<dt><span class="strong">Returns:</span></dt><dd>the property from the properties file</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/owasp/dependencycheck/utils/InvalidSettingException.html" title="class in org.owasp.dependencycheck.utils">InvalidSettingException</a></code> - is thrown if there is an error retrieving the setting</dd></dl>
</li>
</ul>
<a name="getConnectionString(java.lang.String, java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnectionString</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getConnectionString(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;connectionStringKey,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;dbFileNameKey,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;dbVersionKey)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
<a href="../../../../org/owasp/dependencycheck/utils/InvalidSettingException.html" title="class in org.owasp.dependencycheck.utils">InvalidSettingException</a></pre>
<div class="block">Returns a connection string from the configured properties. If the connection string contains a %s, this method
will determine the 'data' directory and replace the %s with the path to the data directory. If the data directory
does not exists it will be created.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>connectionStringKey</code> - the property file key for the connection string</dd><dd><code>dbFileNameKey</code> - the settings key for the db filename</dd><dd><code>dbVersionKey</code> - the settings key for the dbVersion</dd>
<dt><span class="strong">Returns:</span></dt><dd>the connection string</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - thrown the data directory cannot be created</dd>
<dd><code><a href="../../../../org/owasp/dependencycheck/utils/InvalidSettingException.html" title="class in org.owasp.dependencycheck.utils">InvalidSettingException</a></code> - thrown if there is an invalid setting</dd></dl>
</li>
</ul>
<a name="getDataDirectory()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getDataDirectory</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getDataDirectory()
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Retrieves the directory that the JAR file exists in so that we can ensure we always use a common data directory
for the embedded H2 database. This is public solely for some unit tests; otherwise this should be private.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the data directory to store data files</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - is thrown if an IOException occurs of course...</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Settings.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/owasp/dependencycheck/utils/LogUtils.html" title="class in org.owasp.dependencycheck.utils"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/owasp/dependencycheck/utils/Settings.KEYS.html" title="class in org.owasp.dependencycheck.utils"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/owasp/dependencycheck/utils/Settings.html" target="_top">Frames</a></li>
<li><a href="Settings.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright© 2012-15 Jeremy Long. All Rights Reserved.</small></p>
</body>
</html>