|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.verisign.epp.util.Environment
public abstract class Environment
This class loads properties from a properties configuration file with one of
the envInitialize methods. After the properties have been
loaded, the values can be retrieved by using one of the get
methods.
| Field Summary | |
|---|---|
protected static java.util.Properties |
properties
Properties loaded from the configuration file |
| Constructor Summary | |
|---|---|
Environment()
|
|
| Method Summary | |
|---|---|
void |
envInitialize(java.lang.String aConfigFile)
Loads configuration file properties into a Properties
attribute in the following search order:File system System classpath Environment class ClassLoader
If the configuration file can not be located, an EnvException is thrown. |
void |
envInitialize(java.lang.String aConfigFile,
java.lang.ClassLoader aClassLoader)
Loads configuration file properties into a Properties
attribute using a custom ClassLoader |
static java.lang.String |
getEnv(java.lang.String aProperty)
This Method gets the given value from properties. |
static java.lang.String |
getOption(java.lang.String aProperty)
This Method gets a property value, but will not throw an exception if it does not exist. |
static java.lang.String |
getProperty(java.lang.String aProperty)
Gets a property loaded from the EPP configuration file. |
static java.lang.String |
getProperty(java.lang.String aProperty,
java.lang.String aDefaultValue)
Gets a property loaded from the EPP configuration file and if it doesn't exist, will return the passed default value ( aDefaultValue). |
static void |
setProperties(java.util.Properties aProperties)
Sets the Environment properties using a client
Properties object. |
static void |
setProperty(java.lang.String aProperty,
java.lang.String aValue)
Sets an individual property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static java.util.Properties properties
| Constructor Detail |
|---|
public Environment()
| Method Detail |
|---|
public void envInitialize(java.lang.String aConfigFile)
throws EnvException
Properties
attribute in the following search order:Environment class ClassLoader
EnvException is thrown.
aConfigFile - -
File name of configuration file
EnvException - Error finding or loading
configuration file
public void envInitialize(java.lang.String aConfigFile,
java.lang.ClassLoader aClassLoader)
throws EnvException
Properties
attribute using a custom ClassLoader.:
aConfigFile - -
File name of configuration file
EnvException - Error finding or loading
configuration file
public static java.lang.String getEnv(java.lang.String aProperty)
throws EnvException
aProperty - -
this String contains property name.
EnvException - Property is not definedpublic static java.lang.String getOption(java.lang.String aProperty)
aProperty - Property name
null otherwisepublic static java.lang.String getProperty(java.lang.String aProperty)
aProperty - Property name
null otherwise
public static java.lang.String getProperty(java.lang.String aProperty,
java.lang.String aDefaultValue)
aDefaultValue).
aProperty - Property nameaDefaultValue - Default value if property is not found
aDefaultValue otherwisepublic static void setProperties(java.util.Properties aProperties)
Environment properties using a client
Properties object. This is an option to using
a configuration file with one of the envInitialize
methods.
aProperties - A set of EPP configuration properties
public static void setProperty(java.lang.String aProperty,
java.lang.String aValue)
aValue is null than
the property will be removed.
aProperty - Name of propertyaValue - Property value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||