<!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 (1.8.0_265) on Tue Aug 25 19:30:52 UTC 2020 --> <title>SystemUtil (MetaCat API)</title> <meta name="date" content="2020-08-25"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="SystemUtil (MetaCat API)"; } } catch(err) { } //--> var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <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/SystemUtil.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="../../../../../edu/ucsb/nceas/metacat/util/SkinUtil.html" title="class in edu.ucsb.nceas.metacat.util"><span class="typeNameLink">Prev Class</span></a></li> <li>Next Class</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?edu/ucsb/nceas/metacat/util/SystemUtil.html" target="_top">Frames</a></li> <li><a href="SystemUtil.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: </li> <li>Nested | </li> <li><a href="#field.summary">Field</a> | </li> <li>Constr | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li><a href="#field.detail">Field</a> | </li> <li>Constr | </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">edu.ucsb.nceas.metacat.util</div> <h2 title="Class SystemUtil" class="title">Class SystemUtil</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>edu.ucsb.nceas.metacat.util.SystemUtil</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="typeNameLabel">SystemUtil</span> extends java.lang.Object</pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> <caption><span>Fields</span><span class="tabEnd"> </span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#LINUX_OS">LINUX_OS</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#MAC_OS">MAC_OS</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#OTHER_OS">OTHER_OS</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#WIN_OS">WIN_OS</a></span></code> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <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> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#discoverApplicationContext-javax.servlet.ServletContext-">discoverApplicationContext</a></span>(javax.servlet.ServletContext servletContext)</code> <div class="block">Attempt to discover the context for this application.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#discoverDeployDir-javax.servlet.http.HttpServletRequest-">discoverDeployDir</a></span>(javax.servlet.http.HttpServletRequest request)</code> <div class="block">Attempt to discover the deployment directory for this application.</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#discoverExternalDir--">discoverExternalDir</a></span>()</code> <div class="block">Attempt to discover the external (to the metacat installation) directory where metacat will hold backup files.</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#discoverServerName-javax.servlet.http.HttpServletRequest-">discoverServerName</a></span>(javax.servlet.http.HttpServletRequest request)</code> <div class="block">Attempt to discover the server name.</div> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#discoverServerPort-javax.servlet.http.HttpServletRequest-">discoverServerPort</a></span>(javax.servlet.http.HttpServletRequest request)</code> <div class="block">Attempt to discover the server port.</div> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#discoverServerSSLPort-javax.servlet.http.HttpServletRequest-">discoverServerSSLPort</a></span>(javax.servlet.http.HttpServletRequest request)</code> <div class="block">Attempt to discover the server ssl port.</div> </td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getCGI_URL--">getCGI_URL</a></span>()</code> <div class="block">Get the CGI URL which is made up of the server URL + file separator + the CGI directory</div> </td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getContextDir--">getContextDir</a></span>()</code> <div class="block">Get the context directory.</div> </td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getContextURL--">getContextURL</a></span>()</code> <div class="block">Get the server URL with the context.</div> </td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getDefaultStyleURL--">getDefaultStyleURL</a></span>()</code> <div class="block">Get the default style URL from metacat.properties.</div> </td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getInternalContextURL--">getInternalContextURL</a></span>()</code> <div class="block">Get the internal context url.</div> </td> </tr> <tr id="i11" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getInternalServerURL--">getInternalServerURL</a></span>()</code> <div class="block">Get the internal server URL.</div> </td> </tr> <tr id="i12" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getMetacatReleaseInfo--">getMetacatReleaseInfo</a></span>()</code> <div class="block">Gets a string that holds some description about the release.</div> </td> </tr> <tr id="i13" class="rowColor"> <td class="colFirst"><code>static <a href="../../../../../edu/ucsb/nceas/metacat/MetacatVersion.html" title="class in edu.ucsb.nceas.metacat">MetacatVersion</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getMetacatVersion--">getMetacatVersion</a></span>()</code> <div class="block">Get the metacat version by getting the string representation from metacat.properties and instantiating a MetacatVersion object.</div> </td> </tr> <tr id="i14" class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getOsClass--">getOsClass</a></span>()</code> <div class="block">Get the OS for this system.</div> </td> </tr> <tr id="i15" class="rowColor"> <td class="colFirst"><code>static java.util.Vector<java.lang.String></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getPathsForIndexing--">getPathsForIndexing</a></span>()</code> <div class="block">Get a list of xml paths that need to be indexed</div> </td> </tr> <tr id="i16" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getSecureContextURL--">getSecureContextURL</a></span>()</code> <div class="block">Get the secure server URL with the context.</div> </td> </tr> <tr id="i17" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getSecureServer--">getSecureServer</a></span>()</code> <div class="block">Get the secure server which is made up of the server name + : + the https port number.</div> </td> </tr> <tr id="i18" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getSecureServerURL--">getSecureServerURL</a></span>()</code> <div class="block">Get the secure server URL which is made up of the server name + : + the https port number.</div> </td> </tr> <tr id="i19" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getServerURL--">getServerURL</a></span>()</code> <div class="block">Get the server URL which is made up of the server name + : + the http port number.</div> </td> </tr> <tr id="i20" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getServletURL--">getServletURL</a></span>()</code> <div class="block">Get the servlet URL.</div> </td> </tr> <tr id="i21" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getSQLDir--">getSQLDir</a></span>()</code> <div class="block">Get the SQL directory.</div> </td> </tr> <tr id="i22" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getStoredBackupDir--">getStoredBackupDir</a></span>()</code> <div class="block">Gets the stored backup location.</div> </td> </tr> <tr id="i23" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getStyleCommonURL--">getStyleCommonURL</a></span>()</code> <div class="block">Get the style common URL.</div> </td> </tr> <tr id="i24" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getStyleSkinsDir--">getStyleSkinsDir</a></span>()</code> <div class="block">Get the style skins directory.</div> </td> </tr> <tr id="i25" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getStyleSkinsURL--">getStyleSkinsURL</a></span>()</code> <div class="block">Get the style skins URL.</div> </td> </tr> <tr id="i26" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getUserHomeDir--">getUserHomeDir</a></span>()</code> <div class="block">Get the current user's home directory</div> </td> </tr> <tr id="i27" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getUserManagementUrl--">getUserManagementUrl</a></span>()</code> <div class="block">Get the url pointing to the user management page.</div> </td> </tr> <tr id="i28" class="altColor"> <td class="colFirst"><code>static boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#isInternalURLReplacedByExternal--">isInternalURLReplacedByExternal</a></span>()</code> <div class="block">Check if the internal url has been replaced by external url.</div> </td> </tr> <tr id="i29" class="rowColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#storeExternalDirLocation-java.lang.String-">storeExternalDirLocation</a></span>(java.lang.String externalDir)</code> <div class="block">Store the location of the backup file location into a file at <user_home>/<application_dir>/backup-location</div> </td> </tr> <tr id="i30" class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#writeStoredBackupFile-java.lang.String-">writeStoredBackupFile</a></span>(java.lang.String backupPath)</code> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ FIELD DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="field.detail"> <!-- --> </a> <h3>Field Detail</h3> <a name="WIN_OS"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>WIN_OS</h4> <pre>public static int WIN_OS</pre> </li> </ul> <a name="LINUX_OS"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>LINUX_OS</h4> <pre>public static int LINUX_OS</pre> </li> </ul> <a name="MAC_OS"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>MAC_OS</h4> <pre>public static int MAC_OS</pre> </li> </ul> <a name="OTHER_OS"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>OTHER_OS</h4> <pre>public static int OTHER_OS</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getOsClass--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOsClass</h4> <pre>public static int getOsClass()</pre> <div class="block">Get the OS for this system.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>an integer representing the class of OS. Possibilities are: WIN_OS = 1; LINUX_OS = 2; MAC_OS = 3; OTHER_OS = 4;</dd> </dl> </li> </ul> <a name="discoverServerName-javax.servlet.http.HttpServletRequest-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>discoverServerName</h4> <pre>public static java.lang.String discoverServerName(javax.servlet.http.HttpServletRequest request)</pre> <div class="block">Attempt to discover the server name. The name is retrieved from the http servlet request. This is used by configuration routines before the port has been populated in metacat.properties. it is possible the port that the user configures might be different than the name we get here. You should use getServerPort() instead of this method whenever possible.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>request</code> - the http servlet request we will use to find the server name</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a string holding the server name</dd> </dl> </li> </ul> <a name="discoverServerPort-javax.servlet.http.HttpServletRequest-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>discoverServerPort</h4> <pre>public static java.lang.String discoverServerPort(javax.servlet.http.HttpServletRequest request)</pre> <div class="block">Attempt to discover the server port. The port is retrieved from the http servlet request. This is used by configuration routines before the port has been populated in metacat.properties. it is possible the port that the user configures might be different than the port we get here. You should use getServerPort() instead of this method whenever possible.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>request</code> - the http servlet request we will use to find the server port</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a string holding the server port</dd> </dl> </li> </ul> <a name="discoverServerSSLPort-javax.servlet.http.HttpServletRequest-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>discoverServerSSLPort</h4> <pre>public static java.lang.String discoverServerSSLPort(javax.servlet.http.HttpServletRequest request)</pre> <div class="block">Attempt to discover the server ssl port. The ssl port is assumed using the standard port. This is used by configuration routines before the port has been populated in metacat.properties. it is possible the prot that the user configures might be different than the port we get here. You should use getServerSSLPort() instead of this method whenever possible.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>request</code> - the http servlet request we will use to find the server port</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a string holding the server ssl port</dd> </dl> </li> </ul> <a name="getServerURL--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getServerURL</h4> <pre>public static java.lang.String getServerURL() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the server URL which is made up of the server name + : + the http port number. Note that if the port is 80, it is left off.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the server URL</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getSecureServerURL--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getSecureServerURL</h4> <pre>public static java.lang.String getSecureServerURL() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the secure server URL which is made up of the server name + : + the https port number. Note that if the port is 443, it is left off.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the server URL</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getSecureServer--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getSecureServer</h4> <pre>public static java.lang.String getSecureServer() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the secure server which is made up of the server name + : + the https port number. Note that if the port is 443, it is left off. NOTE: does NOT include "https://"</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the secure server</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../edu/ucsb/nceas/metacat/util/SystemUtil.html#getSecureServerURL--"><code>getSecureServerURL()</code></a></dd> </dl> </li> </ul> <a name="getCGI_URL--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getCGI_URL</h4> <pre>public static java.lang.String getCGI_URL() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the CGI URL which is made up of the server URL + file separator + the CGI directory</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the server URL</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getContextURL--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getContextURL</h4> <pre>public static java.lang.String getContextURL() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the server URL with the context. This is made up of the server URL + file separator + the context</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the server URL with context</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getSecureContextURL--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getSecureContextURL</h4> <pre>public static java.lang.String getSecureContextURL() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the secure server URL with the context. This is made up of the secure server URL + file separator + the context</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the server URL with context</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getServletURL--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getServletURL</h4> <pre>public static java.lang.String getServletURL() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the servlet URL. This is made up of the server URL with context + file separator + the metacat servlet name</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the servlet URL</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getInternalContextURL--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getInternalContextURL</h4> <pre>public static java.lang.String getInternalContextURL() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the internal context url. If the internal server url is not accessible, it falls back to the external context url.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the url of the internal Metacat context</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getInternalServerURL--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getInternalServerURL</h4> <pre>public static java.lang.String getInternalServerURL() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the internal server URL. If the internal server url is not accessible, it falls back to the external url</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the url of the internal server</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="isInternalURLReplacedByExternal--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isInternalURLReplacedByExternal</h4> <pre>public static boolean isInternalURLReplacedByExternal()</pre> <div class="block">Check if the internal url has been replaced by external url.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>true if the url has been replaced; otherwise false;</dd> </dl> </li> </ul> <a name="getStyleSkinsURL--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStyleSkinsURL</h4> <pre>public static java.lang.String getStyleSkinsURL() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the style skins URL. This is made up of the server URL with context + file separator + "style" + file separator + "skins"</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the style skins URL</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getStyleCommonURL--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStyleCommonURL</h4> <pre>public static java.lang.String getStyleCommonURL() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the style common URL. This is made up of the server URL with context + file separator + "style" + file separator + "common"</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the style common URL</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getMetacatVersion--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getMetacatVersion</h4> <pre>public static <a href="../../../../../edu/ucsb/nceas/metacat/MetacatVersion.html" title="class in edu.ucsb.nceas.metacat">MetacatVersion</a> getMetacatVersion() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the metacat version by getting the string representation from metacat.properties and instantiating a MetacatVersion object. The info is set in build.properties and then populated into metacat.properties at build time using Ant token replacement.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a MetacatVersion object holding metacat version information</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getMetacatReleaseInfo--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getMetacatReleaseInfo</h4> <pre>public static java.lang.String getMetacatReleaseInfo() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Gets a string that holds some description about the release. Typically this is used during release candidates for display purposes and might hold something like "Release Candidate 1". Normally it is empty for final production release. The info is set in build.properties and then populated into metacat.properties at build time using Ant token replacement.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a MetacatVersion object holding metacat version information</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getContextDir--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getContextDir</h4> <pre>public static java.lang.String getContextDir() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the context directory. This is made up of the deployment directory + file separator + context</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the context directory</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="discoverApplicationContext-javax.servlet.ServletContext-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>discoverApplicationContext</h4> <pre>public static java.lang.String discoverApplicationContext(javax.servlet.ServletContext servletContext)</pre> <div class="block">Attempt to discover the context for this application. This is a best guess scenario. It is used by configuration routines before the context has been populated in metacat.properties. You should always use getApplicationContext() instead of this method if possible.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>servletContext</code> - the servlet context we will use to find the application context</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a string holding the context</dd> </dl> </li> </ul> <a name="getStoredBackupDir--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStoredBackupDir</h4> <pre>public static java.lang.String getStoredBackupDir() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/MetacatUtilException.html" title="class in edu.ucsb.nceas.metacat.shared">MetacatUtilException</a></pre> <div class="block">Gets the stored backup location. This location is held in a file at <user_home>/.<application_context>/backup-location</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a string holding the backup location. Null if none could be found.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/MetacatUtilException.html" title="class in edu.ucsb.nceas.metacat.shared">MetacatUtilException</a></code></dd> </dl> </li> </ul> <a name="writeStoredBackupFile-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>writeStoredBackupFile</h4> <pre>public static void writeStoredBackupFile(java.lang.String backupPath) throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/MetacatUtilException.html" title="class in edu.ucsb.nceas.metacat.shared">MetacatUtilException</a></pre> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/MetacatUtilException.html" title="class in edu.ucsb.nceas.metacat.shared">MetacatUtilException</a></code></dd> </dl> </li> </ul> <a name="discoverExternalDir--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>discoverExternalDir</h4> <pre>public static java.lang.String discoverExternalDir() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/MetacatUtilException.html" title="class in edu.ucsb.nceas.metacat.shared">MetacatUtilException</a></pre> <div class="block">Attempt to discover the external (to the metacat installation) directory where metacat will hold backup files. This functionality is used to populate the configuration utility initially. The user can change the directory manually, so you can't rely on this method to give you the actual directory. Here are the steps taken to discover the directory: -- 1) Look for an existing hidden (.<application_context>) directory in a default system directory. Get the default base directory for the OS. (See application.windowsBackupBaseDir and application.linuxBackupBaseDir in metacat.properties.) If a directory called <base_dir>/metacat/.<application_context> exists, return <base_dir>/metacat. -- 2) Otherwise, look for an existing hidden (.metacat) directory in the user directory. If a directory called <user_dir>/metacat/.<application_context> exists for the user that started tomcat, return <user_dir>/metacat. -- 3) Otherwise, look for an existing metacat directory in a default system directory. Get the default base directory for the OS. (See application.windowsBackupBaseDir and application.linuxBackupBaseDir in metacat.properties.) If a directory called <base_dir>/metacat exists, return <base_dir>/metacat. -- 4) Otherwise, look for an existing metacat directory in the user directory. If a directory called <user_dir>/metacat/ exists for the user that started tomcat, return <user_dir>/metacat. -- 5) Otherwise, is the <base_dir> writable by the user that started tomcat? If so, return <base_dir>/metacat -- 6) Does the <user_home> exist? If so, return <user_home>/metacat -- 7) Otherwise, return null</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a string holding the backup directory path</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/MetacatUtilException.html" title="class in edu.ucsb.nceas.metacat.shared">MetacatUtilException</a></code></dd> </dl> </li> </ul> <a name="storeExternalDirLocation-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>storeExternalDirLocation</h4> <pre>public static void storeExternalDirLocation(java.lang.String externalDir)</pre> <div class="block">Store the location of the backup file location into a file at <user_home>/<application_dir>/backup-location</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>externalDir</code> - the backup file location.</dd> </dl> </li> </ul> <a name="getStyleSkinsDir--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStyleSkinsDir</h4> <pre>public static java.lang.String getStyleSkinsDir() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the style skins directory. This is made up of the tomcat directory with context + file separator + "style" + file separator + "skins"</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the style skins directory</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getSQLDir--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getSQLDir</h4> <pre>public static java.lang.String getSQLDir() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the SQL directory. This is made up of the context directory + file separator + sql</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the sql directory</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getDefaultStyleURL--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getDefaultStyleURL</h4> <pre>public static java.lang.String getDefaultStyleURL() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the default style URL from metacat.properties.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>string holding the default style URL</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="discoverDeployDir-javax.servlet.http.HttpServletRequest-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>discoverDeployDir</h4> <pre>public static java.lang.String discoverDeployDir(javax.servlet.http.HttpServletRequest request)</pre> <div class="block">Attempt to discover the deployment directory for this application. This is a best guess scenario. It is used by configuration routines before the deployment directory has been populated in metacat.properties.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>request</code> - the http servlet request we will use to find the tomcat directory</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a string holding the web application directory</dd> </dl> </li> </ul> <a name="getUserHomeDir--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getUserHomeDir</h4> <pre>public static java.lang.String getUserHomeDir()</pre> <div class="block">Get the current user's home directory</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a string holding the home directory</dd> </dl> </li> </ul> <a name="getPathsForIndexing--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getPathsForIndexing</h4> <pre>public static java.util.Vector<java.lang.String> getPathsForIndexing() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/MetacatUtilException.html" title="class in edu.ucsb.nceas.metacat.shared">MetacatUtilException</a></pre> <div class="block">Get a list of xml paths that need to be indexed</div> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/MetacatUtilException.html" title="class in edu.ucsb.nceas.metacat.shared">MetacatUtilException</a></code></dd> </dl> </li> </ul> <a name="getUserManagementUrl--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>getUserManagementUrl</h4> <pre>public static java.lang.String getUserManagementUrl() throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get the url pointing to the user management page.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the url.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></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> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <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/SystemUtil.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="../../../../../edu/ucsb/nceas/metacat/util/SkinUtil.html" title="class in edu.ucsb.nceas.metacat.util"><span class="typeNameLink">Prev Class</span></a></li> <li>Next Class</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?edu/ucsb/nceas/metacat/util/SystemUtil.html" target="_top">Frames</a></li> <li><a href="SystemUtil.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: </li> <li>Nested | </li> <li><a href="#field.summary">Field</a> | </li> <li>Constr | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li><a href="#field.detail">Field</a> | </li> <li>Constr | </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><i>Copyright © 2020 Regents of the University of California. All Rights Reserved.</i></small></p> </body> </html>