|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.security.voms.service.Configuration
Provides comfortable access to VO configuration parameters.
First it tries to locate the configuration directory through JNDI using the "java:comp/env/configDir" environmental variable, which can be set in a servlet context the following way:
<Context path="/voms-admin" docBase=".../voms-admin.war"> <Environment name="configDir" value=".../etc/voms-admin" type="java.lang.String" override="false"/> </Context>
java ... -Dvoms.configuration.directory=.../etc/voms-admin
.../var/etc/voms-admin/...
.
This string will be replaced by .../etc/voms-admin
.
Field Summary | |
static java.lang.String[] |
propertiesFiles
The name of the configurations file for VOMS services. |
Method Summary | |
static boolean |
getFlag(java.lang.String key,
boolean defaultValue)
Returns the value of a boolean flag (convenience method). |
static int |
getInt(java.lang.String key,
int defaultValue)
Returns the value of an integer value (convenience method). |
static long |
getLong(java.lang.String key,
long defaultValue)
Returns the value of an long value (convenience method). |
static java.util.Properties |
getProperties()
Returns the whole properties table. |
static java.lang.String |
getProperty(java.lang.String key)
Returns the value of the given VO property, or null if
there is no such property. |
static java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the value of the given VO property, or default
if there is no such property. |
static java.util.Properties |
getPropertyFamily(java.lang.String prefix)
Parse a set of properties with keys beginning with prefix .
|
static java.lang.String |
getVOName()
Returns the VO name. |
static boolean |
isLoaded()
Returns true if the configuration file was successfully loaded. |
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[] propertiesFiles
Method Detail |
public static java.lang.String getProperty(java.lang.String key)
null
if
there is no such property.
public static java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
default
if there is no such property.
public static java.util.Properties getPropertyFamily(java.lang.String prefix)
prefix
.
The common prefix is removed from the key names, and the new keys are
put in a new property set along with their original values.
prefix
- The common prefix to look for.
public static java.util.Properties getProperties()
It is not a wise idea to return the whole table, however the mail session object requires its settings in a Properties object. Unless we copy everything one-by-one, this is the easiest way to export it.
Returning a javax.mail.Session object from this class is not a great idea, because that would introduce unnecessary dependencies.
The ideal solution would be making EmailNotification a friend class...
EmailNotification
public static boolean getFlag(java.lang.String key, boolean defaultValue)
"false"
, "off"
, or "no"
;
otherwise returns true.
public static int getInt(java.lang.String key, int defaultValue)
public static long getLong(java.lang.String key, long defaultValue)
public static boolean isLoaded()
public static java.lang.String getVOName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |