|
![]() |
|||||||||
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.helpdesk.HelpDeskNugget
com.nitido.nimx.nuggets.helpdesk.real.HelpDeskNuggetImpl
public class HelpDeskNuggetImpl
The implementation of the HelpDeskNugget.
Field Summary | |
---|---|
protected java.lang.String |
_adminBase
|
protected java.lang.String |
_loginPwd
|
protected java.lang.String |
_loginUid
|
protected OpenHash |
_modifyAttr
|
protected java.util.HashSet |
_removeAttr
|
protected java.lang.String |
_selectedUser
|
protected int |
_transactionLevel
|
protected java.lang.String |
_userBase
|
protected java.lang.String |
_userDN
|
Fields inherited from class com.nitido.nimx.nuggets.helpdesk.HelpDeskNugget |
---|
DEFAULT_DIRECTORY_FACTORY, KEY_ADMINBASE, KEY_DIRECTORY_FACTORY, KEY_DM_PASSWORD, KEY_DM_USERID, KEY_HOST, KEY_PORT, KEY_USERBASE |
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 | |
---|---|
HelpDeskNuggetImpl(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. |
java.util.Vector |
search(java.lang.String filter)
Search for an entry and retrieve ALL attributes associated to the matched entry. |
java.util.Vector |
search(java.lang.String filter,
java.lang.String[] attributes)
Search for an entry and retrieve the specified attributes of the matched entry. |
void |
selectUser(java.lang.String uid)
Select the user id for the search. |
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 _loginUid
protected transient java.lang.String _loginPwd
protected transient java.lang.String _userBase
protected transient java.lang.String _adminBase
protected transient OpenHash _modifyAttr
protected transient java.util.HashSet _removeAttr
protected transient int _transactionLevel
protected transient java.lang.String _selectedUser
protected transient java.lang.String _userDN
Constructor Detail |
---|
public HelpDeskNuggetImpl(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 selectUser(java.lang.String uid)
HelpDeskNugget
This method is used to select the user to perform the action on. The user that create this Nugget must have been given the access privilege to the specified entries by the LDAP administrator. This Nugget will not attempt to manage the access privilege.
The default ldap configuration of iplanet allow the data to be readable by all valid user. Therefore, you will have no problem to access the user's information. You will only encounter the insufficient access rights problem when you tries to update it.
Due to performance concern, this method does not need to check if the LDAP server actually contains the specified user. This means that you can't guarantee the existence of uid until you access the attributes.
selectUser
in class HelpDeskNugget
uid
- The user id for the user to be selected.public java.util.Vector search(java.lang.String filter, java.lang.String[] attributes) throws IPlanetServerException
HelpDeskNugget
This method will return a single value for each attribute. If the attribute contains more than one value, this method will return the first one that it encounters
The search is performed against the base specified by helpdesk.userbase in the configuration setting.
search
in class HelpDeskNugget
filter
- the standard LDAP filter
attributes
- a String array that contains the name of the attribute you want
to fetch from the server. If this paramter is null or set to
a 0-size array, this method will assume it's the String array {"uid"}.
IPlanetServerException
public java.util.Vector search(java.lang.String filter) throws IPlanetServerException
HelpDeskNugget
This method will return a single value for each attribute. If the attribute contains more than one value, this method will return the first one that it encounters
The search is performed against the base specified by helpdesk.userbase in the configuration setting.
search
in class HelpDeskNugget
filter
- the standard LDAP filter
IPlanetServerException
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.