public class UserConfig
extends java.lang.Object
| Constructor and Description |
|---|
UserConfig(java.lang.String sUserConfigID,
MContext ctx)
This constructor will create a UserConfig object for the user logged into the current session based upon the sUserConfigID.
|
UserConfig(java.lang.String sUserConfigID,
java.lang.String sObjectDN,
MContext ctx)
This constructor will create a UserConfig object for the user passed in based upon the sUserConfigID.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSettingValue(java.lang.String sName,
java.lang.String sValue)
Add a String value to the end of the String array of values for a setting.
|
java.lang.Object |
getObjectSetting(java.lang.String sName)
Get a setting's first value as a serialized Object.
|
java.lang.Object[] |
getObjectSettings(java.lang.String sName)
Get all of a setting's values as a serialized Object array.
|
java.lang.String |
getSetting(java.lang.String sName)
Get a setting's first value as a String.
|
java.lang.String |
getSetting(java.lang.String sName,
java.lang.String sDefaultValue)
Get a setting's first value as a String.
|
java.lang.String[] |
getSettingNames()
Get a String array of all setting names available for this sUserConfigID.
|
java.lang.String[] |
getSettings(java.lang.String sName)
Get all of a setting's values as a String array.
|
static UserConfig |
getUserConfig(java.lang.String sUserConfigID,
MContext ctx)
This method will get either a previously created UserConfig object from the session or create a new one
for the user currently logged in based upon the sUserConfigID parameter.
|
static UserConfig |
getUserConfig(java.lang.String sUserConfigID,
java.lang.String sObjectDN,
MContext ctx)
This method will get either a previously created UserConfig object from the session or create a new one
for the user currently logged in based upon the sUserConfigID parameter.
|
java.lang.String |
getUserConfigFileName()
Returns the absolute file name for this user config
|
void |
removeSetting(java.lang.String sName)
Removes all setting values from a setting.
|
void |
removeSettingValue(java.lang.String sName,
java.lang.String sValue)
Remove a String value from the String array of values for a setting.
|
void |
setObjectSetting(java.lang.String sName,
java.lang.Object oValue)
Set a setting to be a serialized Object value.
|
void |
setObjectSetting(java.lang.String sName,
java.lang.Object[] oaValues)
Set a setting to be a serialized Object array of values.
|
void |
setSetting(java.lang.String sName,
java.lang.String sValue)
Set a setting to be a single String value.
|
void |
setSetting(java.lang.String sName,
java.lang.String[] saValues)
Set a setting to be a String array of values.
|
void |
writeSettings()
Writes settings to persistent storage.
|
public UserConfig(java.lang.String sUserConfigID,
MContext ctx)
ctx - Context of the task to determine the currently logged in usersUserConfigID - Name of the UserConfig object to create or nullpublic UserConfig(java.lang.String sUserConfigID,
java.lang.String sObjectDN,
MContext ctx)
ctx - Context of the task to determine the currently logged in usersUserConfigID - Name of the UserConfig object to create or nullsObjectDN - DN of the object (may be different than the currently logged in user)setPersistentData() and getPersistentData().public static UserConfig getUserConfig(java.lang.String sUserConfigID, MContext ctx)
ctx - Context of the task to determine the currently logged in usersUserConfigID - The name of the UserConfig to retrievesetPersistentData() and getPersistentData().public static UserConfig getUserConfig(java.lang.String sUserConfigID, java.lang.String sObjectDN, MContext ctx)
ctx - Context of the task to determine the currently logged in usersUserConfigID - The name of the UserConfig to retrievesObjectDN - setPersistentData() and getPersistentData().public java.lang.String[] getSettingNames()
public java.lang.String getSetting(java.lang.String sName)
sName - Name of the settingsetSetting(String, String)public java.lang.String getSetting(java.lang.String sName,
java.lang.String sDefaultValue)
sName - Name of the settingsDefaultValue - Value to be returned of no value is foundsetSetting(String, String)public java.lang.Object getObjectSetting(java.lang.String sName)
sName - Name of the settingsetObjectSetting(String, Object)public java.lang.String[] getSettings(java.lang.String sName)
sName - Name of the settingsetSetting(String, String)public java.lang.Object[] getObjectSettings(java.lang.String sName)
sName - Name of the settingsetObjectSetting(String, Object)public void setSetting(java.lang.String sName,
java.lang.String sValue)
throws ConfigException
sName - Name of the settingsValue - Value to set, all other values will be overwrittenConfigException - If the current logged in user is unable to perform the operationgetSetting(String),
writeSettings()public void setObjectSetting(java.lang.String sName,
java.lang.Object oValue)
throws ConfigException
sName - Name of the settingoValue - Value to set, all other values will be overwrittenConfigException - If the current logged in user is unable to perform the operationgetObjectSetting(java.lang.String),
writeSettings()public void setSetting(java.lang.String sName,
java.lang.String[] saValues)
throws ConfigException
sName - Name of the settingsaValues - Values to be set, all other values will be overwrittenConfigException - If the current logged in user is unable to perform the operationgetSettings(java.lang.String),
writeSettings()public void setObjectSetting(java.lang.String sName,
java.lang.Object[] oaValues)
throws ConfigException
sName - Name of the settingoaValues - Values to be set, all other values will be overwrittenConfigException - If the current logged in user is unable to perform the operationgetObjectSettings(java.lang.String),
writeSettings()public void addSettingValue(java.lang.String sName,
java.lang.String sValue)
throws ConfigException
sName - Name of the settingsValue - Value to add to the current values already presentConfigException - If the current logged in user is unable to perform the operationremoveSettingValue(java.lang.String, java.lang.String),
writeSettings()public void removeSettingValue(java.lang.String sName,
java.lang.String sValue)
throws ConfigException
sName - Name of the settingsValue - Value to be removedConfigException - If the current logged in user is unable to perform the operationaddSettingValue(java.lang.String, java.lang.String),
writeSettings()public void removeSetting(java.lang.String sName)
throws ConfigException
sName - Name of settingConfigException - If the current logged in user is unable to perform the operationwriteSettings()public void writeSettings()
throws ConfigException
ConfigException - If the current logged in user is unable to perform the operationpublic java.lang.String getUserConfigFileName()
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.