|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.contentmanagement.layerindependent.servicehelper.ConfigUtils
public class ConfigUtils
Contains utility functionality for handling configurations in JNDI files and Java property files.
Field Summary | |
---|---|
static java.lang.String |
CONFIG_DIRECTORY_VARIABLE_NAME
the particular parameter in the JNDI that contains the configuration directory - introduced here, so no default JNDI parameter |
static java.lang.String |
JNDI_SERVICE_CTX_LOOKUP_PREFIX
lookup prefix to find JNDI stuff of a service |
Constructor Summary | |
---|---|
ConfigUtils()
|
Method Summary | |
---|---|
static java.io.File |
getConfigDir()
This method returns the path of the configuration a WSRF GT4 service. |
static java.util.Properties |
loadProperties(java.io.File propertiesFile)
Loads the local configuration from disk and refreshes the settings with the values read from file. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String JNDI_SERVICE_CTX_LOOKUP_PREFIX
public static final java.lang.String CONFIG_DIRECTORY_VARIABLE_NAME
Constructor Detail |
---|
public ConfigUtils()
Method Detail |
---|
public static java.io.File getConfigDir() throws java.lang.Exception
deploy-jndi-config.xml
in the <service>
section:
<environment name="configDir" type="java.lang.String" value="@config.dir@"/>
Commonly, this directory should be something like
$GLOBUS_LOCATION/etc/<name_of_gar>/
.
java.lang.Exception
- if something goes wrong with lookuppublic static java.util.Properties loadProperties(java.io.File propertiesFile) throws java.io.IOException
propertiesFile
- the file containing the properties
java.io.IOException
- if properties file cannot be loaded
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |