|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nim.Nugget
com.nitido.nim.NonCachableNugget
com.nitido.nimx.nuggets.iplanetset.IPlanetSettingsNugget
public abstract class IPlanetSettingsNugget
IPlanetSettingsNugget is responsible for accessing and modifying personal preference settings that may involve more than one iPlanet servers.
This Nugget provides the following additional features that the regular NiM Entity User Space did not provide:
Replication Issue with Master-Slave Cluster LDAP Servers
iPlanet Messaging Server stores a number of "extension" settings in the
same attribute of the user's entry on the LDAP server. Modifying this
type of setting will require you to read all existing values of the
attribute, to modify your specific setting and then to store the
attribute.
If you are using a master-slave LDAP server cluster, this approach will become a problem. For example, let's say you need to modify two setting (A and B) in a row and both settings are "extension" settings. Assume you have modify the setting A successfully. When you modify the setting B and read the existing values from the slave, the replication of the cluster may not have been completed. As a result, you may read the old value for A. In other words, modifying setting B will overwrite the changes you made to A.
To solve this problem, you invoke startTransaction() before your settings modification calls and then invoke commitTransaction() after the calls. Here is an example:
settingNugget.startTransaction(); settingNugget.setSignature( "My new signature" ); settingNugget.setReplyTo( "test-dummy@nitido.com" ); settingNugget.commitTransaction();
The follwoing is a list of methods that acts on the iPlanet Messaging server "extended" settings:
Flexible Attribute Access
For the sake of future extendability, the IPlanetSettingsNugget provides
a number of methods that allows the developer to specify the attributes
to access. The methods are
getSingleValue
setSingleValue
getMultiValues
setMultiValues
getExtendedPref
setExtendedPref
getExtendedMailPref
setExtendedMailPref
getExtendedCalendarPref
setExtendedCalendarPref
Field Summary |
---|
Fields inherited from class com.nitido.nim.Nugget |
---|
_entity, _nim, _nuggetName, _settings |
Fields inherited from interface com.nitido.nim.CredentialConstants |
---|
CRED_ADMIN, CRED_CONTAINER, CRED_HELPDESK, CRED_SYSTEM, CRED_USER, KEY_PASSWORD |
Constructor Summary | |
---|---|
IPlanetSettingsNugget(NuggetVisa visa)
Default Nugget constructor. |
Method Summary | |
---|---|
abstract void |
abortTransaction()
Abort a batch of settings change. |
void |
activate()
Used by NiM Nugget mechanism. |
void |
addFilter(Filter filter)
To add a message filter for the user. |
protected java.util.Vector |
arrayToVector(java.lang.String[] array)
Copies an array into a vector |
protected void |
checkInt(java.lang.String key)
|
protected void |
checkNonNull(java.lang.String key)
|
abstract void |
commitTransaction()
Commits a batch of settings change. |
boolean |
containsValue(java.lang.String attribute,
java.lang.String value)
Returns true if the attribute contains the specified value. |
protected java.lang.String[] |
createUniqueArray(java.lang.String[] array)
Constructs a new array based on the one passed in and makes sure that all values in the array are unique |
void |
deactivate()
Used by NiM Nugget mechanism. |
java.lang.String |
getCommonName()
To retrieve the common name of the mail user. |
int |
getComposeTextSize()
To retrieve an int value of the compose message text font size. |
int |
getComposeWidth()
To retrieve an int value of the compose window width. |
java.lang.String[] |
getCopyForward()
To retrieve the copy forward list of the mail user. |
boolean |
getCopyForwardEnabled()
To retrieve the copy forward enabled/disabled flag. |
boolean |
getCopySend()
To retrieve an indicator for the copysend field. |
java.lang.String |
getDescriptor()
Used by NiM Nugget mechanism. |
java.lang.String |
getExtendedCalendarPref(java.lang.String name)
Returns a single value from a set of iPlanet icsExtendedUserPrefs attributes. |
java.lang.String |
getExtendedMailPref(java.lang.String name)
Returns a single value from a set of iPlanet nswmExtendedUserPrefs attributes. |
java.lang.String |
getExtendedPref(java.lang.String extAttr,
java.lang.String name)
Returns a single value from a set of preferences in an extended attribute. |
java.util.Vector |
getExternalMailSetting()
Get the External Mail Setting. |
java.util.Vector |
getFilters()
To retrieve filters for this user. |
abstract java.lang.String[] |
getMultiValues(java.lang.String attribute)
Returns all values of the attribute in the user's entry. |
java.lang.String |
getNotificationEmailAddress()
Returns the E-mail address that notification messages are sent to. |
java.lang.String[] |
getNotificationFrom()
Returns an array of String objects each containing an e-mail address that can trigger a notification when mail is received from that address. |
boolean |
getNotificationListOption()
Gets the e-mail notifictaion list option. |
java.lang.String |
getNotificationOption()
Returns the current e-mail notification option setting. |
java.lang.String[] |
getNotificationPhoneFrom()
Returns an array of String objects each containing an e-mail address that triggers PCS phone based notification. |
boolean |
getNotificationPhoneListOption()
Gets the phone notifictaion list option. |
java.lang.String |
getNotificationPhoneNumber()
Returns the PCS phone number to send notification to. |
java.lang.String |
getNotificationPhoneOption()
Returns the current phone notification option setting. |
boolean |
getNotificationPhoneUrgentOption()
Returns whether the urgent option is set for phone notification. |
boolean |
getNotificationUrgentOption()
Returns whether the urgent option is set for e-mail notification. |
int |
getPaginationSize()
To retrieve an int value of the page size. |
boolean |
getReplyInclude()
To retrieve an indicator for the reply included flag. |
java.lang.String |
getReplyTo()
To retrieve the name of the reply to field. |
java.lang.String |
getSignature()
To retrieve the signature of the mail user. |
boolean |
getSignatureEnabled()
To retrieve the flag indicating whether the user signature is enabled or not. |
java.lang.String |
getSingleValue(java.lang.String attribute)
Returns a single value of the attribute in the user's entry. |
boolean |
getVacationMessageEnabled()
To retrieve an indicator whether the vacation message has been enabled. |
java.lang.String |
getVacationMessageEndDate()
Retrieves the effective end date of the vacation message. |
java.lang.String |
getVacationMessageExternal()
To retrieve the vacation message for external recipients. |
java.lang.String |
getVacationMessageInternal()
To retrieve the vacation message for internal recipients. |
int |
getVacationMessageRepeatDays()
Returns the number of days between sending a repeat of the vacation message to senders. |
java.lang.String |
getVacationMessageStartDate()
Retrieves the effective start date of the vacation message. |
java.lang.String |
getVacationMessageSubject()
To retrieve the vacation message subject line. |
java.lang.String |
getVCard()
To retrieve the vCard of the mail user. |
boolean |
getVCardEnabled()
To retrieve the vCard enabled flag of the mail user. |
protected boolean |
isExtendedMailPrefTrue(java.lang.String name)
Returns true if the extended pref is set to "true" |
protected boolean |
isLegalNotificationOption(java.lang.String value)
|
protected void |
removeExtendedPref(java.lang.String extAttr,
java.lang.String name)
|
protected abstract void |
removeMultiValues(java.lang.String attribute)
Removes the specified attribute from the user's entry. |
protected java.lang.String[] |
removeStringFromArray(java.lang.String[] array,
java.lang.String value)
Constructs a new array based on the one passed in with the parameter value removed from it if it is there. |
protected java.lang.String[] |
replaceStringInArray(java.lang.String[] array,
java.lang.String value)
Constructs a new array based on the one passed in and an extra value. |
protected void |
setBooleanExtendedMailPref(java.lang.String name,
boolean enable)
|
void |
setCommonName(java.lang.String commonName)
To set the common name of the mail user. |
void |
setComposeTextSize(int composeTextSize)
To set the compose text font size. |
void |
setComposeWidth(int composeWidth)
To set the width of the compose window. |
void |
setCopyForward(java.lang.String[] copyForwardList)
To set the copy forward list for the mail user. |
void |
setCopyForwardEnabled(boolean enable)
To set the copy forward enabled/disabled flag. |
void |
setCopySend(boolean copySend)
To set the copy send flag. |
void |
setExtendedCalendarPref(java.lang.String prefName,
java.lang.String prefValue)
Sets an icsExtendedUserPrefs value. |
void |
setExtendedMailPref(java.lang.String name,
java.lang.String value)
Sets an nswmExtendedUserPrefs value. |
void |
setExtendedPref(java.lang.String extAttr,
java.lang.String name,
java.lang.String value)
Sets a value within a set of preferences in an extended attribute. |
void |
setExternalMailSetting(java.util.Vector extMailSettings)
Set the External Mail Setting. |
void |
setFilters(java.util.Vector filters)
To set the message filters for the user. |
abstract void |
setMultiValues(java.lang.String attribute,
java.lang.String[] values)
Sets the attribute/value for the user's entry in the Directory. |
void |
setNotificationEmailAddress(java.lang.String address)
Sets the E-mail address that notification messages are sent to. |
void |
setNotificationFrom(java.lang.String[] addresses)
Sets an array of String objects each containing an e-mail address that can trigger a notification when mail is received from that address. |
void |
setNotificationListOption(boolean option)
Sets the e-mail notifictaion list option. |
void |
setNotificationOption(java.lang.String option)
Sets the current e-mail notification option setting. |
void |
setNotificationPhoneFrom(java.lang.String[] addresses)
Sets an array of String objects each containing an e-mail address that triggers PCS phone based notification. |
void |
setNotificationPhoneListOption(boolean option)
Sets the phone notifictaion list option. |
void |
setNotificationPhoneOption(java.lang.String option)
Sets the current phone notification option setting. |
void |
setNotificationPhoneUrgentOption(boolean urgent)
Sets whether the urgent option is set for phone notification. |
void |
setNotificationUrgentOption(boolean urgent)
Sets whether the urgent option is set for e-mail notification. |
void |
setPaginationSize(int pageSize)
To set the page size.. |
void |
setReplyInclude(boolean replyInclude)
To set the reply included flag. |
void |
setReplyTo(java.lang.String replyTo)
To set the reply to field. |
void |
setSignature(java.lang.String signature)
To set the signature of the mail user. |
void |
setSignatureEnabled(boolean enable)
To set the signature enabled flag for the mail user. |
abstract void |
setSingleValue(java.lang.String attribute,
java.lang.String value)
Sets the attribute/value pair for the user's entry in the Directory. |
void |
setVacationMessageEnabled(boolean enable,
java.lang.String startDate,
java.lang.String endDate)
To set the indicator to enable or disable vacation message. |
void |
setVacationMessageExternal(java.lang.String vacationMessage)
To set the vacation message for external recipients. |
void |
setVacationMessageInternal(java.lang.String vacationMessage)
To set the vacation message for internal recipients. |
void |
setVacationMessageRepeatDays(int days)
Sets the number of days between sending a repeat of the vacation message to senders. |
void |
setVacationMessageSubject(java.lang.String vacationMessage)
To set the vacation message subject. |
void |
setVCard(java.lang.String vcard)
To set the vCard for the mail user. |
void |
setVCardEnabled(boolean enable)
To set the vCard enable/disable flag for the mail user. |
abstract void |
startTransaction()
Starts a batch of settings change. |
protected java.lang.String[] |
vectorToArray(java.util.Vector values)
Returns an array of strings from a vector of Strings |
Methods inherited from class com.nitido.nim.NonCachableNugget |
---|
isCachable |
Methods inherited from class com.nitido.nim.Nugget |
---|
destroy, destroyImpl, getEntity, getNuggetName, getSetting, getSettings, init, initImpl, requestBegin, requestEnd |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IPlanetSettingsNugget(NuggetVisa visa)
Method Detail |
---|
public void activate() throws ActivationException
activate
in class Nugget
ActivationException
- If unable to activate the Nuggetpublic void deactivate() throws ActivationException
deactivate
in class Nugget
ActivationException
- If unable to deactivate the Nuggetpublic java.lang.String getDescriptor()
getDescriptor
in class Nugget
public java.util.Vector getExternalMailSetting() throws IPlanetServerException
IPlanetServerException
public void setExternalMailSetting(java.util.Vector extMailSettings) throws IPlanetServerException
extMailSettings
- a vector of ExternalMailSetting object.
IPlanetServerException
public java.lang.String getVacationMessageSubject() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setVacationMessageSubject(java.lang.String vacationMessage) throws IPlanetServerException
vacationMessage
- String value for the vacation message.
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getVacationMessageInternal() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setVacationMessageInternal(java.lang.String vacationMessage) throws IPlanetServerException
vacationMessage
- String value for the vacation message.
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getVacationMessageExternal() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setVacationMessageExternal(java.lang.String vacationMessage) throws IPlanetServerException
vacationMessage
- String value for the vacation message.
IPlanetServerException
- error occurred when contacting the backend server.public int getVacationMessageRepeatDays() throws IPlanetServerException
If the user has not set this setting before, it will return the default value, which is 0.
IPlanetServerException
- error occurred when contacting the backend server.public void setVacationMessageRepeatDays(int days) throws IPlanetServerException
days
- The number of days
IPlanetServerException
- error occurred when contacting the backend server.public boolean getVacationMessageEnabled() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getVacationMessageStartDate() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getVacationMessageEndDate() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setVacationMessageEnabled(boolean enable, java.lang.String startDate, java.lang.String endDate) throws IPlanetServerException
enable
- boolean value enable or disable the vacation message
startDate
- The date that vacation settings begin to take effect. In format
YYYYMMDDhhmmssZ.
endDate
- The date that vacation settings cease to take effect. In format
YYYYMMDDhhmmssZ.
IPlanetServerException
- error occurred when contacting the backend server.public java.util.Vector getFilters() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setFilters(java.util.Vector filters) throws IPlanetServerException
filters
- a vector of the Filter objects that represent the new filter settings.
IPlanetServerException
- error occurred when contacting the backend server.public void addFilter(Filter filter) throws IPlanetServerException
filter
- The filter to be added.
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getSignature() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setSignature(java.lang.String signature) throws IPlanetServerException
signature
- String value of the signature file
IPlanetServerException
- error occurred when contacting the backend server.public boolean getSignatureEnabled() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setSignatureEnabled(boolean enable) throws IPlanetServerException
enable
- boolean value of the signature enabled flag.
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getVCard() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setVCard(java.lang.String vcard) throws IPlanetServerException
vcard
- String value of the vCard.
IPlanetServerException
- error occurred when contacting the backend server.public boolean getVCardEnabled() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setVCardEnabled(boolean enable) throws IPlanetServerException
enable
- boolean value of the vCard enable/disable flag.
IPlanetServerException
- error occurred when contacting the backend server.public boolean getCopyForwardEnabled() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setCopyForwardEnabled(boolean enable) throws IPlanetServerException
enable
- boolean value of the copy forward enable/disable flag.
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String[] getCopyForward() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setCopyForward(java.lang.String[] copyForwardList) throws IPlanetServerException
copyForwardList
- String[] array value of the copy forward list.
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getCommonName() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setCommonName(java.lang.String commonName) throws IPlanetServerException
commonName
- String value of the user common name.
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getReplyTo() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setReplyTo(java.lang.String replyTo) throws IPlanetServerException
replyTo
- String value of the reply to field.
IPlanetServerException
- error occurred when contacting the backend server.public boolean getCopySend() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setCopySend(boolean copySend) throws IPlanetServerException
copySend
- boolean value of the copy send flag.
IPlanetServerException
- error occurred when contacting the backend server.public boolean getReplyInclude() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setReplyInclude(boolean replyInclude) throws IPlanetServerException
replyInclude
- boolean value of the reply include flag
IPlanetServerException
- error occurred when contacting the backend server.public int getComposeWidth() throws IPlanetServerException
If the user has not set this setting before, it will return the default value, which is 80.
IPlanetServerException
- error occurred when contacting the backend server.public void setComposeWidth(int composeWidth) throws IPlanetServerException
composeWidth
- int value of the width of the compose window.
IPlanetServerException
- error occurred when contacting the backend server.public int getPaginationSize() throws IPlanetServerException
If the user has not set this setting before, it will return the default value, which is 10.
IPlanetServerException
- error occurred when contacting the backend server.public void setPaginationSize(int pageSize) throws IPlanetServerException
pageSize
- int value of the page size.
IPlanetServerException
- error occurred when contacting the backend server.public int getComposeTextSize() throws IPlanetServerException
If the user has not set this setting before, it will return the default value, which is 12.
IPlanetServerException
- error occurred when contacting the backend server.public void setComposeTextSize(int composeTextSize) throws IPlanetServerException
composeTextSize
- int value of the compose message text font size.
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getNotificationEmailAddress() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setNotificationEmailAddress(java.lang.String address) throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String[] getNotificationFrom() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setNotificationFrom(java.lang.String[] addresses) throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getNotificationOption() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setNotificationOption(java.lang.String option) throws IPlanetServerException, java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- If the option is not one of the permissable settings
IPlanetServerException
- error occurred when contacting the backend server.public boolean getNotificationUrgentOption() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setNotificationUrgentOption(boolean urgent) throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public boolean getNotificationListOption() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setNotificationListOption(boolean option) throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String[] getNotificationPhoneFrom() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setNotificationPhoneFrom(java.lang.String[] addresses) throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getNotificationPhoneNumber() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getNotificationPhoneOption() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setNotificationPhoneOption(java.lang.String option) throws IPlanetServerException, java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- If the option is not one of the permissable settings
IPlanetServerException
- error occurred when contacting the backend server.public boolean getNotificationPhoneUrgentOption() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setNotificationPhoneUrgentOption(boolean urgent) throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public boolean getNotificationPhoneListOption() throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public void setNotificationPhoneListOption(boolean option) throws IPlanetServerException
IPlanetServerException
- error occurred when contacting the backend server.public java.lang.String getExtendedMailPref(java.lang.String name) throws IPlanetServerException
The nswmExtendedUserPrefs is a multi-values attribute used by iPlanet messaging server to store customized user preference. Each attribute value is in the format of "prefName=prefValue". Each prefName has a maximum one prefValue associated.
If you need to get/set multiple settings in a roll, you MUST invoke startTranscation() before the calls and commitTransaction() after the calls. (Note, you can interlace other IPlanetSettingsNugget calls in between the start/commit invocation. The start/commit are designed for all IPlanetSettingsNugget methods.)
Example: If one of the value of the attribute "nswmExtendedUserPrefs" is "meInitialize=true", getExtendedMailPref("meInitialized") will return the String "true".
name
- The name of an nswmExtendUserPrefs attribute preference that is
going to be fetched.
IPlanetServerException
- If there is a connection problem with the Directory object.public void setExtendedMailPref(java.lang.String name, java.lang.String value) throws IPlanetServerException
The nswmExtendedUserPrefs is a multi-values attribute used by iPlanet messaging server to store customized user preference. Each attribute value is in the format of "prefName=prefValue". Each prefName has a maximum one prefValue associated.
If you need to get/set multiple settings in a roll, you MUST invoke startTranscation() before the calls and commitTransaction() after the calls. (Note, you can interlace other IPlanetSettingsNugget calls in between the start/commit invocation. The start/commit are designed for all IPlanetSettingsNugget methods.)
Example: setting "meInitialized" to "true" would result in the value "meInitialized=true" being added to the attribute "nswmExtendedUserPrefs". If the directory already contains another value starts with "meInitialized=", the old value will be removed before adding the new value.
Special Instruction for Creating Default Mail Folder If you are creating a new user for the messaging server via the directory, that use is not completely initialized for the iPlanet messaging server to use. That user does not has the default folders and the corresponding user preference attributes. Therefore, you may need to create the folders and set the attributes for a new user.
Once the default folders are created, you can set the required attributes with the following code:
// assuming you have got the SprintUser object assigned to variable // "user". try { IPlanetSettingsNugget nugget = user.getNugget( "IPSetNugget" ); nugget.startTransaction(); // You must invoke this first nugget.setExtendedMailPref( "meInitialized", "true" ); nugget.setExtendedMailPref( "meDraftFolder", "Drafts" ); nugget.setExtendedMailPref( "meSentFolder", "Sent" ); nugget.setExtendedMailPref( "meTrashFolder", "Trash" ); nugget.commitTransaction(); // You must invoke this after } catch( Exception e ) { // your error handling mechanism } // end catch
name
- The name of an nswmExtendUserPrefs attribute preference that is
going to be modified.value
- The String contents of the attribute or null if there is no match.
IPlanetServerException
- If there is a connection problem with the Directory object.public java.lang.String getExtendedCalendarPref(java.lang.String name) throws IPlanetServerException
The icsExtendedUserPrefs is a multi-values attribute used by iPlanet Calendar Server to store customized user preference. Each attribute value is in the format of "prefName=prefValue". Each prefName has a maximum one prefValue associated.
If you need to get/set multiple settings in a roll, you MUST invoke startTranscation() before the calls and commitTransaction() after the calls. (Note, you can interlace other IPlanetSettingsNugget calls in between the start/commit invocation. The start/commit are designed for all IPlanetSettingsNugget methods.)
Example: If one of the value of the attribute "icsExtendedUserPrefs" is "ceDateOrder=MDY", getExtendedCalendarPref("ceDateOrder") will return the String "MDY".
name
- The name of an icsExtendUserPrefs attribute preference that is
going to be fetched.
IPlanetServerException
- If there is a connection problem with the Directory object.public void setExtendedCalendarPref(java.lang.String prefName, java.lang.String prefValue) throws IPlanetServerException
The icsExtendedUserPrefs is a multi-values attribute used by iPlanet Calendar server to store customized user preference. Each attribute value is in the format of "prefName=prefValue". Each prefName has a maximum one prefValue associated.
If you need to get/set multiple settings in a roll, you MUST invoke startTranscation() before the calls and commitTransaction() after the calls. (Note, you can interlace other IPlanetSettingsNugget calls in between the start/commit invocation. The start/commit are designed for all IPlanetSettingsNugget methods.)
Example: setting "ceDateOrder" to "MDY" would result in the value "ceDateOrder=MDY" being added to the attribute "icsExtendedUserPrefs". If the directory already contains another value starts with "ceDateOrder=", the old value will be removed before adding the new value.
prefName
- The name of an icsExtendUserPrefs attribute preference that is
going to be modified.
prefValue
- The String contents of the attribute or null if there is no match.
IPlanetServerException
- If there is a connection problem with the Directory object.public java.lang.String getExtendedPref(java.lang.String extAttr, java.lang.String name) throws IPlanetServerException
This method is intended to be used by future extension. In most cases, you can use getExtendedMailPref() or getExtendedCalendarPref().
If you need to get/set multiple settings in a roll, you MUST invoke startTranscation() before the calls and commitTransaction() after the calls. (Note, you can interlace other IPlanetSettingsNugget calls in between the start/commit invocation. The start/commit are designed for all IPlanetSettingsNugget methods.)
Example: If one of the value of the attribute "nswmExtendedUserPrefs" is "meInitialize=true", the method call getExtendedPref("nswmExtendedUserPrefs", "meInitialized") will return the String "true".
extAttr
- The name of the extended attribute
name
- The name of "name-value" pair that is stored in the specified
extended attribute.
IPlanetServerException
- If there is a connection problem with the Directory object.public void setExtendedPref(java.lang.String extAttr, java.lang.String name, java.lang.String value) throws IPlanetServerException
This method is intended to be used by future extension. In most cases, you can use getExtendedMailPref() or getExtendedCalendarPref().
If the directory already contains a value for the specific extendedUserPref, the new value will replace the old one. You can remove an existing preference value by setting it to a null object or empty string.
If you need to get/set multiple settings in a roll, you MUST invoke startTranscation() before the calls and commitTransaction() after the calls. (Note, you can interlace other IPlanetSettingsNugget calls in between the start/commit invocation. The start/commit are designed for all IPlanetSettingsNugget methods.)
Example: setting attribute "nswExtendedUserPrefs"'s preference "meInitialized" to "true" would result in the value "meInitialized=true" being added to the attribute "nswmExtendedUserPrefs". If the attribute already contains another value starts with "meInitialized=", the old value will be removed before adding the new value.
extAttr
- The name of the extended attribute
name
- The name of "name-value" pair that is stored in the specified
extended attribute.
value
- The String contents of the attribute or null if there is no match.
IPlanetServerException
- If there is a connection problem with the Directory object.protected void removeExtendedPref(java.lang.String extAttr, java.lang.String name) throws IPlanetServerException
IPlanetServerException
public java.lang.String getSingleValue(java.lang.String attribute) throws IPlanetServerException
IPlanetServerException
- If there is a connection problem with the connectionpublic abstract void setSingleValue(java.lang.String attribute, java.lang.String value) throws IPlanetServerException
attribute
- The attribute name
value
- The new value.
IPlanetServerException
- If there is a connection problem with the Directory object.public boolean containsValue(java.lang.String attribute, java.lang.String value) throws IPlanetServerException
This method is usually used to check the existence of some value within multi-values attributes. For example, looking for "pabperson" in objectclass and "autoreply" in mailDeliveryOption and
IPlanetServerException
- If there is a connection problem with the Directory object.public abstract java.lang.String[] getMultiValues(java.lang.String attribute) throws IPlanetServerException
Note: if the attribute has only one value stored, it simply returns an array of size one no matter whether the underlying attribute is single-value or multi-values.
IPlanetServerException
- If there is a connection problem with the Directory object.public abstract void setMultiValues(java.lang.String attribute, java.lang.String[] values) throws IPlanetServerException
attribute
- The attribute name
values
- The new values.
IPlanetServerException
- If there is a connection problem with the Directory object.public abstract void startTransaction() throws IPlanetServerException
Please see the class description for more details on why and when to use these transaction methods.
IPlanetServerException
public abstract void commitTransaction() throws IPlanetServerException
Please see the class description for more details on why and when to use these transaction methods.
IPlanetServerException
public abstract void abortTransaction() throws IPlanetServerException
If no transaction was in process when this method is called, this method will not do anything and no exception will be thrown.
Please see the class description for more details on why and when to use these transaction methods.
IPlanetServerException
protected boolean isLegalNotificationOption(java.lang.String value)
protected java.lang.String[] createUniqueArray(java.lang.String[] array)
protected java.lang.String[] replaceStringInArray(java.lang.String[] array, java.lang.String value)
protected java.lang.String[] removeStringFromArray(java.lang.String[] array, java.lang.String value)
protected java.util.Vector arrayToVector(java.lang.String[] array)
protected java.lang.String[] vectorToArray(java.util.Vector values)
protected boolean isExtendedMailPrefTrue(java.lang.String name) throws IPlanetServerException
IPlanetServerException
- If there is a connection problem with the Directory object.protected void setBooleanExtendedMailPref(java.lang.String name, boolean enable) throws IPlanetServerException
IPlanetServerException
protected abstract void removeMultiValues(java.lang.String attribute) throws IPlanetServerException
IPlanetServerException
- If there is a connection problem with the Directory object.protected void checkNonNull(java.lang.String key) throws InvalidSettingException
InvalidSettingException
protected void checkInt(java.lang.String key) throws InvalidSettingException
InvalidSettingException
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.