|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.LexGrid.util.config.PropertiesUtility
public class PropertiesUtility
Class to aid in finding and loading properties files.
Field Summary | |
---|---|
static LgMessageDirectorIF |
logger
|
static java.lang.String |
propertiesLocationKey
|
static java.lang.String |
propertiesParentFolderKey
|
static java.lang.String |
systemVariable
|
Constructor Summary | |
---|---|
PropertiesUtility()
|
Method Summary | |
---|---|
static java.util.Properties |
loadPropertiesFromClasspath(java.lang.String absolutePath)
Load a properties file from the classpath. |
static java.util.Properties |
loadPropertiesFromFileOrURL(java.lang.String propertiesFile)
Create a java properties object from a location. |
static java.util.Properties |
locateAndLoadPropFile(java.lang.String fileName)
Convenience method that combines locatePropFile(fileName) and loadPropertiesFromFileOrURL(String) |
static java.util.Properties |
locateAndLoadPropFile(java.lang.String fileName,
java.lang.String classToSearchFor)
Convenience method that combines locatePropFile(fileName, classToSearchFor) and loadPropertiesFromFileOrURL(String) |
static java.util.Properties |
locateAndLoadPropFileConfigureLog4J(java.lang.String fileName,
java.lang.String log4JConfigFilePropertyName)
Convenience method that combines locatePropFile(fileName, classToSearchFor) and loadPropertiesFromFileOrURL(String) and Log4JUtility.configureLog4JFromPathSpecifiedInProperties |
static java.util.Properties |
locateAndLoadPropFileConfigureLog4J(java.lang.String fileName,
java.lang.String log4JConfigFilePropertyName,
java.lang.String classToSearchFor)
Convenience method that combines locatePropFile(fileName, classToSearchFor) and loadPropertiesFromFileOrURL(String) and Log4JUtility.configureLog4JFromPathSpecifiedInProperties |
static java.lang.String |
locatePropFile(java.lang.String fileName)
Located the named file on the file system. |
static java.lang.String |
locatePropFile(java.lang.String fileName,
java.lang.String classToSearchFor)
Located the named file on the file system. |
static java.lang.String |
locatePropFile(java.lang.String fileName,
java.lang.String classToSearchFor,
LgLoggerIF logger)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String propertiesLocationKey
public static java.lang.String propertiesParentFolderKey
public static LgMessageDirectorIF logger
public static java.lang.String systemVariable
Constructor Detail |
---|
public PropertiesUtility()
Method Detail |
---|
public static java.util.Properties loadPropertiesFromFileOrURL(java.lang.String propertiesFile) throws java.io.IOException
propertiesFile
- can be a file path or a url.
java.io.IOException
public static java.util.Properties loadPropertiesFromClasspath(java.lang.String absolutePath) throws java.io.IOException
absolutePath
- absolute path to the properties file in the classpath. Should
start with '/'
java.io.IOException
public static java.lang.String locatePropFile(java.lang.String fileName)
fileName
- Name of the file to locate
public static java.lang.String locatePropFile(java.lang.String fileName, java.lang.String classToSearchFor)
fileName
- Name of the file to locateclassToSearchFor
- A class that exists in your classpath to use as a starting
point for the search. The recommended value for most use cases
is "this.getClass().getName()".
public static java.lang.String locatePropFile(java.lang.String fileName, java.lang.String classToSearchFor, LgLoggerIF logger)
public static java.util.Properties locateAndLoadPropFile(java.lang.String fileName) throws java.io.IOException
fileName
-
java.io.IOException
public static java.util.Properties locateAndLoadPropFile(java.lang.String fileName, java.lang.String classToSearchFor) throws java.io.IOException
fileName
-
java.io.IOException
public static java.util.Properties locateAndLoadPropFileConfigureLog4J(java.lang.String fileName, java.lang.String log4JConfigFilePropertyName, java.lang.String classToSearchFor) throws java.lang.Exception
fileName
-
java.lang.Exception
public static java.util.Properties locateAndLoadPropFileConfigureLog4J(java.lang.String fileName, java.lang.String log4JConfigFilePropertyName) throws java.lang.Exception
fileName
-
java.lang.Exception
|
Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |