<!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>PropertyService (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="PropertyService (MetaCat API)"; } } catch(err) { } //--> var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":10,"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":10,"i22":9,"i23":9,"i24":9,"i25":10,"i26":9}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance 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/PropertyService.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/properties/PropertiesInterface.html" title="interface in edu.ucsb.nceas.metacat.properties"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../../../edu/ucsb/nceas/metacat/properties/SimpleProperties.html" title="class in edu.ucsb.nceas.metacat.properties"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?edu/ucsb/nceas/metacat/properties/PropertyService.html" target="_top">Frames</a></li> <li><a href="PropertyService.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.properties</div> <h2 title="Class PropertyService" class="title">Class PropertyService</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">edu.ucsb.nceas.metacat.shared.BaseService</a></li> <li> <ul class="inheritance"> <li>edu.ucsb.nceas.metacat.properties.PropertyService</li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="typeNameLabel">PropertyService</span> extends <a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></pre> <div class="block">A suite of utility classes for the metadata configuration utility</div> </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 java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#BYPASSED">BYPASSED</a></span></code> </td> </tr> <tr 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/properties/PropertyService.html#CONFIG_FILE_DIR">CONFIG_FILE_DIR</a></span></code> </td> </tr> <tr 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/properties/PropertyService.html#CONFIG_FILE_NAME">CONFIG_FILE_NAME</a></span></code> </td> </tr> <tr 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/properties/PropertyService.html#CONFIG_FILE_PATH">CONFIG_FILE_PATH</a></span></code> </td> </tr> <tr 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/properties/PropertyService.html#CONFIGURED">CONFIGURED</a></span></code> </td> </tr> <tr 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/properties/PropertyService.html#TEST_CONFIG_FILE_NAME">TEST_CONFIG_FILE_NAME</a></span></code> </td> </tr> <tr 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/properties/PropertyService.html#UNCONFIGURED">UNCONFIGURED</a></span></code> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="fields.inherited.from.class.edu.ucsb.nceas.metacat.shared.BaseService"> <!-- --> </a> <h3>Fields inherited from class edu.ucsb.nceas.metacat.shared.<a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></h3> <code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html#Z:Z_serviceName">_serviceName</a></code></li> </ul> </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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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 void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#addProperty-java.lang.String-java.lang.String-">addProperty</a></span>(java.lang.String propertyName, java.lang.String value)</code> <div class="block">Utility method to add a property value both in memory and to the properties file</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>static boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#arePropertiesConfigured--">arePropertiesConfigured</a></span>()</code> <div class="block">Reports whether properties are fully configured.</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#bypassConfiguration--">bypassConfiguration</a></span>()</code> <div class="block">Reports whether the metacat configuration utility should be run.</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>static boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#checkAndSetProperty-javax.servlet.http.HttpServletRequest-java.lang.String-">checkAndSetProperty</a></span>(javax.servlet.http.HttpServletRequest request, java.lang.String propertyName)</code> <div class="block">Take input from the user in an HTTP request about an property to be changed and update the metacat property file with that new value if it has changed from the value that was originally set.</div> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>static boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#doBypass--">doBypass</a></span>()</code> <div class="block">Determine if the system is configured to bypass configuration.</div> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#doRefresh--">doRefresh</a></span>()</code> </td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code>static edu.ucsb.nceas.utilities.SortedProperties</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#getAuthBackupProperties--">getAuthBackupProperties</a></span>()</code> <div class="block">Get the auth backup properties file.</div> </td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code>static edu.ucsb.nceas.utilities.PropertiesMetaData</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#getAuthMetaData--">getAuthMetaData</a></span>()</code> <div class="block">Get the auth properties metadata.</div> </td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code>static <a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html" title="class in edu.ucsb.nceas.metacat.properties">PropertyService</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#getInstance--">getInstance</a></span>()</code> <div class="block">Get the single instance of PropertyService for test purposes.</div> </td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><code>static <a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html" title="class in edu.ucsb.nceas.metacat.properties">PropertyService</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#getInstance-javax.servlet.ServletContext-">getInstance</a></span>(javax.servlet.ServletContext context)</code> <div class="block">Get the single instance of PropertyService.</div> </td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><code>static <a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html" title="class in edu.ucsb.nceas.metacat.properties">PropertyService</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#getInstance-java.lang.String-">getInstance</a></span>(java.lang.String testConfigFileDir)</code> <div class="block">Get the single instance of PropertyService for test purposes.</div> </td> </tr> <tr id="i11" class="rowColor"> <td class="colFirst"><code>static edu.ucsb.nceas.utilities.SortedProperties</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#getMainBackupProperties--">getMainBackupProperties</a></span>()</code> <div class="block">Get the main backup properties file.</div> </td> </tr> <tr id="i12" class="altColor"> <td class="colFirst"><code>static edu.ucsb.nceas.utilities.PropertiesMetaData</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#getMainMetaData--">getMainMetaData</a></span>()</code> <div class="block">Get the main properties metadata.</div> </td> </tr> <tr id="i13" class="rowColor"> <td class="colFirst"><code>static java.util.Map<java.lang.String,java.lang.String></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#getPropertiesByGroup-java.lang.String-">getPropertiesByGroup</a></span>(java.lang.String groupName)</code> <div class="block">Get a Map of all properties that start with the groupName prefix.</div> </td> </tr> <tr id="i14" 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/properties/PropertyService.html#getProperty-java.lang.String-">getProperty</a></span>(java.lang.String propertyName)</code> <div class="block">Utility method to get a property value from the properties file</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/properties/PropertyService.html#getPropertyNames--">getPropertyNames</a></span>()</code> <div class="block">Get a set of all property names.</div> </td> </tr> <tr id="i16" class="altColor"> <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/properties/PropertyService.html#getPropertyNamesByGroup-java.lang.String-">getPropertyNamesByGroup</a></span>(java.lang.String groupName)</code> <div class="block">Get a Set of all property names that start with the groupName prefix.</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/properties/PropertyService.html#getRecommendedExternalDir--">getRecommendedExternalDir</a></span>()</code> <div class="block">Returns the recommended external base directory.</div> </td> </tr> <tr id="i18" class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#persistAuthBackupProperties-javax.servlet.ServletContext-">persistAuthBackupProperties</a></span>(javax.servlet.ServletContext servletContext)</code> <div class="block">Writes out backup configurable properties to a file.</div> </td> </tr> <tr id="i19" class="rowColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#persistMainBackupProperties--">persistMainBackupProperties</a></span>()</code> <div class="block">Writes out backup configurable properties to a file.</div> </td> </tr> <tr id="i20" class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#persistProperties--">persistProperties</a></span>()</code> <div class="block">Save the properties to a properties file.</div> </td> </tr> <tr id="i21" class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#refreshable--">refreshable</a></span>()</code> </td> </tr> <tr id="i22" class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#setProperty-java.lang.String-java.lang.String-">setProperty</a></span>(java.lang.String propertyName, java.lang.String newValue)</code> <div class="block">Utility method to set a property value both in memory and to the properties file</div> </td> </tr> <tr id="i23" class="rowColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#setPropertyNoPersist-java.lang.String-java.lang.String-">setPropertyNoPersist</a></span>(java.lang.String propertyName, java.lang.String newValue)</code> <div class="block">Utility method to set a property value in memory.</div> </td> </tr> <tr id="i24" class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#setRecommendedExternalDir-java.lang.String-">setRecommendedExternalDir</a></span>(java.lang.String extBaseDir)</code> <div class="block">Sets the recommended external directory.</div> </td> </tr> <tr id="i25" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#stop--">stop</a></span>()</code> </td> </tr> <tr id="i26" class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html#syncToSettings--">syncToSettings</a></span>()</code> <div class="block">The properties on the Setting class isn't synchronized with the change the Metacat properties file.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.edu.ucsb.nceas.metacat.shared.BaseService"> <!-- --> </a> <h3>Methods inherited from class edu.ucsb.nceas.metacat.shared.<a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></h3> <code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html#refresh--">refresh</a></code></li> </ul> <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="CONFIGURED"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>CONFIGURED</h4> <pre>public static final java.lang.String CONFIGURED</pre> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../constant-values.html#edu.ucsb.nceas.metacat.properties.PropertyService.CONFIGURED">Constant Field Values</a></dd> </dl> </li> </ul> <a name="UNCONFIGURED"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>UNCONFIGURED</h4> <pre>public static final java.lang.String UNCONFIGURED</pre> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../constant-values.html#edu.ucsb.nceas.metacat.properties.PropertyService.UNCONFIGURED">Constant Field Values</a></dd> </dl> </li> </ul> <a name="BYPASSED"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>BYPASSED</h4> <pre>public static final java.lang.String BYPASSED</pre> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../constant-values.html#edu.ucsb.nceas.metacat.properties.PropertyService.BYPASSED">Constant Field Values</a></dd> </dl> </li> </ul> <a name="CONFIG_FILE_DIR"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>CONFIG_FILE_DIR</h4> <pre>public static java.lang.String CONFIG_FILE_DIR</pre> </li> </ul> <a name="CONFIG_FILE_NAME"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>CONFIG_FILE_NAME</h4> <pre>public static java.lang.String CONFIG_FILE_NAME</pre> </li> </ul> <a name="CONFIG_FILE_PATH"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>CONFIG_FILE_PATH</h4> <pre>public static java.lang.String CONFIG_FILE_PATH</pre> </li> </ul> <a name="TEST_CONFIG_FILE_NAME"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>TEST_CONFIG_FILE_NAME</h4> <pre>public static java.lang.String TEST_CONFIG_FILE_NAME</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getInstance-javax.servlet.ServletContext-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getInstance</h4> <pre>public static <a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html" title="class in edu.ucsb.nceas.metacat.properties">PropertyService</a> getInstance(javax.servlet.ServletContext context) throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <div class="block">Get the single instance of PropertyService.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the single instance of PropertyService</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="getInstance-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getInstance</h4> <pre>public static <a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html" title="class in edu.ucsb.nceas.metacat.properties">PropertyService</a> getInstance(java.lang.String testConfigFileDir) throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <div class="block">Get the single instance of PropertyService for test purposes. In this case, we allow the configuration directory to be passed in.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>configDir</code> - the configuration directory we need to look in</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the single instance of PropertyService</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="getInstance--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getInstance</h4> <pre>public static <a href="../../../../../edu/ucsb/nceas/metacat/properties/PropertyService.html" title="class in edu.ucsb.nceas.metacat.properties">PropertyService</a> getInstance() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <div class="block">Get the single instance of PropertyService for test purposes. In this case, we allow the configuration directory to be passed in.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>configDir</code> - the configuration directory we need to look in</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the single instance of PropertyService</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="refreshable--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>refreshable</h4> <pre>public boolean refreshable()</pre> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html#refreshable--">refreshable</a></code> in class <code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></code></dd> </dl> </li> </ul> <a name="doRefresh--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>doRefresh</h4> <pre>public void doRefresh() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html#doRefresh--">doRefresh</a></code> in class <code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></code></dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="stop--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>stop</h4> <pre>public void stop() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html#stop--">stop</a></code> in class <code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></code></dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="getProperty-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getProperty</h4> <pre>public static java.lang.String getProperty(java.lang.String propertyName) throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Utility method to get a property value from the properties file</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>propertyName</code> - the name of the property requested</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the String value for the property</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="getPropertyNames--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getPropertyNames</h4> <pre>public static java.util.Vector<java.lang.String> getPropertyNames()</pre> <div class="block">Get a set of all property names.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>Set of property names</dd> </dl> </li> </ul> <a name="getPropertyNamesByGroup-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getPropertyNamesByGroup</h4> <pre>public static java.util.Vector<java.lang.String> getPropertyNamesByGroup(java.lang.String groupName)</pre> <div class="block">Get a Set of all property names that start with the groupName prefix.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>groupName</code> - the prefix of the keys to search for.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>enumeration of property names</dd> </dl> </li> </ul> <a name="getPropertiesByGroup-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getPropertiesByGroup</h4> <pre>public static java.util.Map<java.lang.String,java.lang.String> getPropertiesByGroup(java.lang.String groupName) throws edu.ucsb.nceas.utilities.PropertyNotFoundException</pre> <div class="block">Get a Map of all properties that start with the groupName prefix.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>groupName</code> - the prefix of the keys to search for.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>Map of property names</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.PropertyNotFoundException</code></dd> </dl> </li> </ul> <a name="setProperty-java.lang.String-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setProperty</h4> <pre>public static void setProperty(java.lang.String propertyName, java.lang.String newValue) throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Utility method to set a property value both in memory and to the properties file</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>propertyName</code> - the name of the property requested</dd> <dd><code>newValue</code> - the new value for the property</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="addProperty-java.lang.String-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addProperty</h4> <pre>public static void addProperty(java.lang.String propertyName, java.lang.String value) throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Utility method to add a property value both in memory and to the properties file</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>propertyName</code> - the name of the property to add</dd> <dd><code>newValue</code> - the value for the property</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="setPropertyNoPersist-java.lang.String-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setPropertyNoPersist</h4> <pre>public static void setPropertyNoPersist(java.lang.String propertyName, java.lang.String newValue) throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Utility method to set a property value in memory. This will NOT cause the property to be written to disk. Use this method to set multiple properties in a row without causing excessive I/O. You must call persistProperties() once you're done setting properties to have them written to disk.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>propertyName</code> - the name of the property requested</dd> <dd><code>newValue</code> - the new value for the property</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="persistProperties--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>persistProperties</h4> <pre>public static void persistProperties() throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Save the properties to a properties file. Note, the order and comments will be preserved.</div> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="getMainBackupProperties--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getMainBackupProperties</h4> <pre>public static edu.ucsb.nceas.utilities.SortedProperties getMainBackupProperties() throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Get the main backup properties file. These are configurable properties that are stored outside the metacat install directories so the user does not need to re-enter all the configuration information every time they do an upgrade.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a SortedProperties object with the backup properties</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="getAuthBackupProperties--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAuthBackupProperties</h4> <pre>public static edu.ucsb.nceas.utilities.SortedProperties getAuthBackupProperties() throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Get the auth backup properties file. These are configurable properties that are stored outside the metacat install directories so the user does not need to re-enter all the configuration information every time they do an upgrade.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a SortedProperties object with the backup properties</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="getMainMetaData--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getMainMetaData</h4> <pre>public static edu.ucsb.nceas.utilities.PropertiesMetaData getMainMetaData() throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Get the main properties metadata. This is retrieved from an xml file that describes the attributes of configurable properties.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a PropertiesMetaData object with the main properties metadata</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="getAuthMetaData--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAuthMetaData</h4> <pre>public static edu.ucsb.nceas.utilities.PropertiesMetaData getAuthMetaData() throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Get the auth properties metadata. This is retrieved from an xml file that describes the attributes of configurable properties.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a PropertiesMetaData object with the organization properties metadata</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="persistMainBackupProperties--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>persistMainBackupProperties</h4> <pre>public static void persistMainBackupProperties() throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Writes out backup configurable properties to a file.</div> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="persistAuthBackupProperties-javax.servlet.ServletContext-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>persistAuthBackupProperties</h4> <pre>public static void persistAuthBackupProperties(javax.servlet.ServletContext servletContext) throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Writes out backup configurable properties to a file.</div> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="arePropertiesConfigured--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>arePropertiesConfigured</h4> <pre>public static boolean arePropertiesConfigured() throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Reports whether properties are fully configured.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a boolean that is true if properties are not unconfigured and false otherwise</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="doBypass--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>doBypass</h4> <pre>public static boolean doBypass() throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Determine if the system is configured to bypass configuration. If so, the system will look for backup configuration files at startup time and use those to configure metacat. The bypass options should only be set by developers. Production code should never bypass confguration.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>true if dev.runConfiguration is set to true in metacat.properties and we have not already checked for bypass, false otherwise.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="bypassConfiguration--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>bypassConfiguration</h4> <pre>public static void bypassConfiguration() throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Reports whether the metacat configuration utility should be run. Returns false if -- dev.runConfiguration=false and -- backup properties file exists Note that dev.runConfiguration should only be set to false when reinstalling the same version of the application in developement.</div> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="checkAndSetProperty-javax.servlet.http.HttpServletRequest-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>checkAndSetProperty</h4> <pre>public static boolean checkAndSetProperty(javax.servlet.http.HttpServletRequest request, java.lang.String propertyName) throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">Take input from the user in an HTTP request about an property to be changed and update the metacat property file with that new value if it has changed from the value that was originally set.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>request</code> - that was generated by the user</dd> <dd><code>response</code> - to send output back to the user</dd> <dd><code>propertyName</code> - the name of the property to be checked and set</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</code></dd> </dl> </li> </ul> <a name="setRecommendedExternalDir-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setRecommendedExternalDir</h4> <pre>public static void setRecommendedExternalDir(java.lang.String extBaseDir)</pre> <div class="block">Sets the recommended external directory. This is populated during initialization time using the SystemUtil.discoverExternalDir() method. This directory will be used to suggest external user directories when the user configures metacat for the first time.</div> </li> </ul> <a name="getRecommendedExternalDir--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getRecommendedExternalDir</h4> <pre>public static java.lang.String getRecommendedExternalDir()</pre> <div class="block">Returns the recommended external base directory. This is populated during initialization time using the SystemUtil.discoverExternalBaseDir() method. This directory will be used to suggest external user directories when the user configures metacat for the first time.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a String holding the recommended external directory</dd> </dl> </li> </ul> <a name="syncToSettings--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>syncToSettings</h4> <pre>public static void syncToSettings() throws edu.ucsb.nceas.utilities.GeneralPropertyException</pre> <div class="block">The properties on the Setting class isn't synchronized with the change the Metacat properties file. This method synchronizes (reloads) the properties' change to the Setting class when the property file was modified.</div> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>edu.ucsb.nceas.utilities.GeneralPropertyException</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/PropertyService.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/properties/PropertiesInterface.html" title="interface in edu.ucsb.nceas.metacat.properties"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../../../edu/ucsb/nceas/metacat/properties/SimpleProperties.html" title="class in edu.ucsb.nceas.metacat.properties"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?edu/ucsb/nceas/metacat/properties/PropertyService.html" target="_top">Frames</a></li> <li><a href="PropertyService.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>