|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.oclc.da.gdfr.registryprototype.properties.PropertiesManager
public class PropertiesManager
PropertiesManager This is a utility class to encapsulate reading all of the OCLC Digital Archives Property Files. This class will use a static initializer to load all of the properties into memory and then let the user call into the class to get the property value. The user must still know the name of the property they need to get.
Properties| Field Summary | |
|---|---|
static java.lang.String |
TEST_PROPS
This is server-tests properties file. |
| Method Summary | |
|---|---|
java.lang.String[] |
getArrayProperty(java.lang.String propName)
This method gets the requested property from the properties object in the form of an array of strings. |
static java.lang.String[] |
getArrayProperty(java.lang.String propsFile,
java.lang.String propName)
This method gets the requested property from the properties object. |
java.lang.Boolean |
getBooleanProperty(java.lang.String propName)
This method gets the requested property from the properties object in the form of boolean. |
static java.lang.Boolean |
getBooleanProperty(java.lang.String propsFile,
java.lang.String propName)
This method gets the requested property from the properties object. |
static PropertiesManager |
getManager(java.lang.String propsFile)
Obtain an instance of the PropertiesManager
for the file specified. |
java.lang.Long |
getNumericProperty(java.lang.String propName)
This method gets the requested property from the properties object in the form of integer. |
static java.lang.Long |
getNumericProperty(java.lang.String propsFile,
java.lang.String propName)
This method gets the requested property from the properties object. |
java.lang.String |
getProperty(java.lang.String propName)
This method gets the requested property from the properties object. |
static java.lang.String |
getProperty(java.lang.String propsFile,
java.lang.String propName)
This method gets the requested property from the properties object. |
static java.util.Properties |
loadProps(java.lang.String propsFile)
Load the properties file specified into properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TEST_PROPS
| Method Detail |
|---|
public static java.lang.String[] getArrayProperty(java.lang.String propsFile,
java.lang.String propName)
propsFile - The name of the property file to load from.propName - The name of the property needed as entered in the
property file.
public static java.lang.Boolean getBooleanProperty(java.lang.String propsFile,
java.lang.String propName)
propsFile - The name of the property file to load from.propName - The name of the property needed as entered in the
property file.
public static PropertiesManager getManager(java.lang.String propsFile)
PropertiesManager
for the file specified.
propsFile - The name of the properties file to obtain properties
for. This file should be in the classpath under a
config directory. Use one of the constants defined,
e.g. ANNOTATOR_PROPS, when possible.
public static java.lang.Long getNumericProperty(java.lang.String propsFile,
java.lang.String propName)
propsFile - The name of the property file to load from.propName - The name of the property needed as entered in the
property file.
public static java.lang.String getProperty(java.lang.String propsFile,
java.lang.String propName)
propsFile - The name of the property file to load from.propName - The name of the property needed as entered in the
property file.
public static java.util.Properties loadProps(java.lang.String propsFile)
propsFile - The name of the properties file to load.
(e.g. test.properties)public java.lang.String[] getArrayProperty(java.lang.String propName)
propName - The name of the property needed as entered in the
property file.
public java.lang.Boolean getBooleanProperty(java.lang.String propName)
booleanValue to get a boolean
value.
propName - The name of the property needed as entered in the
property file.
public java.lang.Long getNumericProperty(java.lang.String propName)
intValue to get an integer value.
propName - The name of the property needed as entered in the
property file.
public java.lang.String getProperty(java.lang.String propName)
propName - The name of the property needed as entered in the
property file.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||