com.ibm.websphere.samples.plantsbywebsphereclient
Class PBWSConfig
java.lang.Object
com.ibm.websphere.samples.plantsbywebsphereclient.PBWSConfig
public class PBWSConfig
- extends java.lang.Object
Configuration class that allows storing user-based properties in their
home directory.
|
Method Summary |
static java.util.Properties |
getUserProperties()
Retrieve the current user's properties file. |
static java.lang.String |
getUserProperty(java.lang.String key,
java.lang.String dftValue)
Retrive a property from the current user's personal configuration file. |
static java.lang.String |
setUserProperty(java.lang.String key,
java.lang.String value)
Set a property in the current user's personal configuration file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USERPROP_DEFAULTFROMADDR
public static final java.lang.String USERPROP_DEFAULTFROMADDR
- See Also:
- Constant Field Values
USERPROP_LASTFROMADDR
public static final java.lang.String USERPROP_LASTFROMADDR
- See Also:
- Constant Field Values
USERPROP_DEFAULTTOADDR
public static final java.lang.String USERPROP_DEFAULTTOADDR
- See Also:
- Constant Field Values
USERPROP_DEFAULTMESSAGE
public static final java.lang.String USERPROP_DEFAULTMESSAGE
- See Also:
- Constant Field Values
USERPROP_DEFAULTSUBJECT
public static final java.lang.String USERPROP_DEFAULTSUBJECT
- See Also:
- Constant Field Values
USERPROP_LASTREPORTFILE
public static final java.lang.String USERPROP_LASTREPORTFILE
- See Also:
- Constant Field Values
PBWSConfig
public PBWSConfig()
getUserProperties
public static java.util.Properties getUserProperties()
- Retrieve the current user's properties file.
- Returns:
- Properties
setUserProperty
public static java.lang.String setUserProperty(java.lang.String key,
java.lang.String value)
- Set a property in the current user's personal configuration file.
- Parameters:
String - Property to setString - Value of the property
- Returns:
- String The Value of the property that was set if successful. Null if unsuccessful.
getUserProperty
public static java.lang.String getUserProperty(java.lang.String key,
java.lang.String dftValue)
- Retrive a property from the current user's personal configuration file.
- Parameters:
String - Property to retrieveString - Default value to return if the property could not be retrieved.
- Returns:
- String Returns the value of the property or the default value.