com.ibm.websphere.samples.plantsbywebsphereclient
Class PBWSConfig

java.lang.Object
  extended by 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.


Field Summary
static java.lang.String USERPROP_DEFAULTFROMADDR
           
static java.lang.String USERPROP_DEFAULTMESSAGE
           
static java.lang.String USERPROP_DEFAULTSUBJECT
           
static java.lang.String USERPROP_DEFAULTTOADDR
           
static java.lang.String USERPROP_LASTFROMADDR
           
static java.lang.String USERPROP_LASTREPORTFILE
           
 
Constructor Summary
PBWSConfig()
           
 
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
 

Field Detail

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
Constructor Detail

PBWSConfig

public PBWSConfig()
Method Detail

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 set
String - 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 retrieve
String - Default value to return if the property could not be retrieved.
Returns:
String Returns the value of the property or the default value.