|
![]() |
|||||||||
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
com.nitido.nimx.nuggets.iplanetset.real.IPlanetSettingsNuggetImpl
public class IPlanetSettingsNuggetImpl
The implementation of the IPlanetSettingsNugget using direct directory connection. This is the old implementation and is included for previous deployment. New applications should NOT use this implementation. This implementation has many methods for iPlanet Messaging Server (iMS). Most of these settings are all stored in a LDAP directory server that the iMS uses and they are impossible to be changed through the standard JavaMail API.
Settings The settings used by IPlanetSettingsNugget are:
Name | Constant | Type | Description |
---|---|---|---|
host | KEY_HOST | String | The host string can be an IP address or a host name. It must be provided when the nugget is created. |
port | KEY_PORT | int String | A string that specifies the port number. It must be provided when the nugget is created. |
directory.factory | KEY_DIRECTORY_FACTORY | String | The class name of the factory class of Nitido Directory library. If no value has been specified for this setting, this nugget will use the class "com.nitido.directory.jndi.DirectoryFactoryImpl" (i.e. the constant DEFAULT_DIRECTORY_FACTORY). |
dn.tokenkey | KEY_DN_PREFIX | String |
The key of the credential token that contains the DN of the user's
LDAP entry. This configuration allows the authentication service
to determine the user's LDAP entry DN first and stuff it into the
user's identifying credential. This feature is great for cases where the user's DN cannot be determined statically. (i.e. we must search for the entry first). If this setting is provided, the settings "dn.prefix" and "dn.postfix" will be ignored. |
dn.prefix | KEY_DN_PREFIX | String |
The prefix for the DN of the user's LDAP entry. For example,
If the user profile's LDAP entry is
"uid=userid,o=my.company,o=isp", the dn.prefix setting
should be "uid=". This setting must be specified if "dn.tokenkey" is not specified. |
dn.postfix | KEY_DN_PREFIX | String | The postfix for the DN of the user's LDAP entry. For example, If the user profile's LDAP entry is "uid=userid,o=my.company,o=isp", the dn.postfix setting should be ",o=my.company,o=isp". This setting must be specified if "dn.tokenkey" is not specified. |
bindas.dn | KEY_BIND_AS_DN | String |
The DN to be used for binding to the backend LDAP server.
If this setting is not specified, the nugget will bind to the backend
with the user's DN. The user's password will be the identyfing
credential's token "KEY_PASSWORD". Moreover, the "bindas.pwd" setting
will be ignored. |
bindas.pwd | KEY_BIND_AS_PWD | String | The password to be used for binding to the backend LDAP server. This setting is required if the "bindas.dn" is specified. Otherwise, it is ignored. |
Field Summary | |
---|---|
protected java.lang.String |
_bindDN
|
protected java.lang.String |
_bindPwd
|
protected OpenHash |
_modifyAttr
|
protected java.util.HashSet |
_removeAttr
|
protected int |
_transactionLevel
|
protected java.lang.String |
_userDN
|
static java.lang.String |
DEFAULT_DIRECTORY_FACTORY
|
static java.lang.String |
KEY_BIND_AS_DN
|
static java.lang.String |
KEY_BIND_AS_PWD
|
static java.lang.String |
KEY_DIRECTORY_FACTORY
|
static java.lang.String |
KEY_DN_POSTFIX
|
static java.lang.String |
KEY_DN_PREFIX
|
static java.lang.String |
KEY_DN_TOKEN_KEY
|
static java.lang.String |
KEY_HOST
|
static java.lang.String |
KEY_PORT
|
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 | |
---|---|
IPlanetSettingsNuggetImpl(NuggetVisa visa)
Default Nugget constructor. |
Method Summary | |
---|---|
void |
abortTransaction()
Abort a batch of settings change. |
void |
activate()
Used by NiM Nugget mechanism. |
protected void |
checkInt(java.lang.String key)
|
protected void |
checkNonNull(java.lang.String key)
|
void |
commitTransaction()
Commits a batch of settings change. |
protected void |
connect()
|
void |
deactivate()
Used by NiM Nugget mechnanism. |
protected void |
disconnect()
|
java.lang.String |
getDescriptor()
Used by NiM Nugget mechnanism. |
java.lang.String[] |
getMultiValues(java.lang.String attribute)
Returns all values of the attribute in the user's entry. |
protected void |
initImpl()
This method is called by the init() method after the member variables _nuggetName, _entity and _settings are assigned. |
protected void |
removeMultiValues(java.lang.String attribute)
Removes the specified attribute from the user's entry. |
void |
setMultiValues(java.lang.String attribute,
java.lang.String[] values)
Sets the attribute/value for the user's entry in the Directory. |
void |
setSingleValue(java.lang.String attribute,
java.lang.String value)
Sets the attribute/value pair for the user's entry in the Directory. |
void |
startTransaction()
Starts a batch of settings change. |
Methods inherited from class com.nitido.nim.NonCachableNugget |
---|
isCachable |
Methods inherited from class com.nitido.nim.Nugget |
---|
destroy, destroyImpl, getEntity, getNuggetName, getSetting, getSettings, init, requestBegin, requestEnd |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient java.lang.String _bindDN
protected transient java.lang.String _bindPwd
protected transient java.lang.String _userDN
protected transient OpenHash _modifyAttr
protected transient java.util.HashSet _removeAttr
protected transient int _transactionLevel
public static final java.lang.String KEY_HOST
public static final java.lang.String KEY_PORT
public static final java.lang.String KEY_DIRECTORY_FACTORY
public static final java.lang.String KEY_DN_PREFIX
public static final java.lang.String KEY_DN_POSTFIX
public static final java.lang.String KEY_DN_TOKEN_KEY
public static final java.lang.String KEY_BIND_AS_DN
public static final java.lang.String KEY_BIND_AS_PWD
public static final java.lang.String DEFAULT_DIRECTORY_FACTORY
Constructor Detail |
---|
public IPlanetSettingsNuggetImpl(NuggetVisa visa)
Method Detail |
---|
public void activate() throws ActivationException
activate
in class IPlanetSettingsNugget
ActivationException
- If unable to activate the Nuggetpublic void deactivate() throws ActivationException
deactivate
in class IPlanetSettingsNugget
ActivationException
- If unable to deactivate the Nuggetprotected void initImpl() throws InitializationFailedException, InvalidSettingException
Nugget
initImpl
in class Nugget
InitializationFailedException
- If unable to initialize the nugget with the given parameters.
InvalidSettingException
- If any of the expected initialization settings are null.public java.lang.String getDescriptor()
getDescriptor
in class IPlanetSettingsNugget
protected void connect() throws java.lang.Exception
java.lang.Exception
protected void disconnect() throws java.lang.Exception
java.lang.Exception
public void setSingleValue(java.lang.String attribute, java.lang.String value) throws IPlanetServerException
IPlanetSettingsNugget
setSingleValue
in class IPlanetSettingsNugget
attribute
- The attribute name
value
- The new value.
IPlanetServerException
- If there is a connection problem with the Directory object.public java.lang.String[] getMultiValues(java.lang.String attribute) throws IPlanetServerException
IPlanetSettingsNugget
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.
getMultiValues
in class IPlanetSettingsNugget
IPlanetServerException
- If there is a connection problem with the Directory object.public void setMultiValues(java.lang.String attribute, java.lang.String[] values) throws IPlanetServerException
IPlanetSettingsNugget
setMultiValues
in class IPlanetSettingsNugget
attribute
- The attribute name
values
- The new values.
IPlanetServerException
- If there is a connection problem with the Directory object.protected void removeMultiValues(java.lang.String attribute) throws IPlanetServerException
IPlanetSettingsNugget
removeMultiValues
in class IPlanetSettingsNugget
IPlanetServerException
- If there is a connection problem with the Directory object.public void startTransaction() throws IPlanetServerException
IPlanetSettingsNugget
Please see the class description for more details on why and when to use these transaction methods.
startTransaction
in class IPlanetSettingsNugget
IPlanetServerException
public void commitTransaction() throws IPlanetServerException
IPlanetSettingsNugget
Please see the class description for more details on why and when to use these transaction methods.
commitTransaction
in class IPlanetSettingsNugget
IPlanetServerException
public void abortTransaction() throws IPlanetServerException
IPlanetSettingsNugget
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.
abortTransaction
in class IPlanetSettingsNugget
IPlanetServerException
protected void checkNonNull(java.lang.String key) throws InvalidSettingException
checkNonNull
in class IPlanetSettingsNugget
InvalidSettingException
protected void checkInt(java.lang.String key) throws InvalidSettingException
checkInt
in class IPlanetSettingsNugget
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.