|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.emframe.dev.config.UserConfig
The UserConfig class is used to read and write module or task settings for a specific user. These settings would overwrite the GeneralConfig settings for the same sModuleID or sTaskID. The settings are written to a respository specific to the user logged in based upon the sModuleID and sTaskID strings used to create the UserConfig object. Only the user who wrote the settings are able to read the settings back in. However, the settings written by a particular module or task are available to all other modules or tasks if they know the sModuleID and sTaskID combination used for the same logged in user.
Constructor Summary | |
UserConfig(java.lang.String sModuleID,
java.lang.String sTaskID,
PluginContext ctx)
This method will create a UserConfig object for the user logged into the current session based upon the sModuleID and sTaskID parameters. |
Method Summary | |
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 sModuleID and sTaskID. |
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 sModuleID,
java.lang.String sTaskID,
PluginContext 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 sModuleID and sTaskID parameters. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UserConfig(java.lang.String sModuleID, java.lang.String sTaskID, PluginContext ctx)
ctx
- Context of the task to determine the currently logged in usersModuleID
- Configuration Module ID or nullsTaskID
- Configuration Task ID or nullMethod Detail |
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 present
ConfigException
- If the current logged in user is unable to perform the operationremoveSettingValue(java.lang.String, java.lang.String)
,
writeSettings()
public java.lang.Object getObjectSetting(java.lang.String sName)
sName
- Name of the setting
setObjectSetting(java.lang.String, java.lang.Object)
public java.lang.Object[] getObjectSettings(java.lang.String sName)
sName
- Name of the setting
setObjectSetting(java.lang.String, java.lang.Object)
public java.lang.String getSetting(java.lang.String sName)
sName
- Name of the setting
setSetting(java.lang.String, java.lang.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 found
setSetting(java.lang.String, java.lang.String)
public java.lang.String[] getSettingNames()
public java.lang.String[] getSettings(java.lang.String sName)
sName
- Name of the setting
setSetting(java.lang.String, java.lang.String)
public static UserConfig getUserConfig(java.lang.String sModuleID, java.lang.String sTaskID, PluginContext ctx)
ctx
- Context of the task to determine the currently logged in usersModuleID
- Configuration Module ID or nullsTaskID
- Configuration Task ID or null
public void removeSetting(java.lang.String sName) throws ConfigException
sName
- Name of setting
ConfigException
- If the current logged in user is unable to perform the operationwriteSettings()
public void removeSettingValue(java.lang.String sName, java.lang.String sValue) throws ConfigException
sName
- Name of the settingsValue
- Value to be removed
ConfigException
- If the current logged in user is unable to perform the operationaddSettingValue(java.lang.String, java.lang.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 overwritten
ConfigException
- If the current logged in user is unable to perform the operationgetObjectSetting(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 overwritten
ConfigException
- If the current logged in user is unable to perform the operationgetObjectSettings(java.lang.String)
,
writeSettings()
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 overwritten
ConfigException
- If the current logged in user is unable to perform the operationgetSetting(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 overwritten
ConfigException
- If the current logged in user is unable to perform the operationgetSettings(java.lang.String)
,
writeSettings()
public void writeSettings() throws ConfigException
ConfigException
- If the current logged in user is unable to perform the operation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |