Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKUserMgmtICM

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractUserMgmt
        |
        +--com.ibm.mm.sdk.common.DKUserMgmtICM
All Implemented Interfaces:
DKConstant, DKConstantICM, DKMessageId, DKMessageIdICM, dkUserManagement, java.io.Serializable

public class DKUserMgmtICM
extends dkAbstractUserMgmt
implements DKConstant, DKMessageId, DKMessageIdICM, DKConstantICM, java.io.Serializable

DKUserMgmtICM class is the implementation of the abstract class dkUserMgmt. It represents and processes management functions for user and user group. The class provides facilities to query, retrieve, update, store, and manage objects associated with user and user group

See Also:
com.ibm.mm.sdk.common.dkUserMgmt, Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageIdICM
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstantICM
    For details, see the class or interface
 
Method Summary
 void add(dkUserDef userDef)
          Adds a user object into the datastore.
 void add(dkUserGroupDef userGroupDef)
          Adds a user group object into the datastore.
 void changePassword(java.lang.String newPwd)
          Changes the password of the currently logged on user.
 void changePassword(java.lang.String userId, java.lang.String newPwd)
          Changes the password of a given user-id.
 void changePassword(java.lang.String userId, java.lang.String oldPwd, java.lang.String newPwd)
          Changes the password of a given user name(user id).
 void clearCache()
          Clears all cache data The lists: user list, user group List, user name List, user group name List, will be cleared.
 dkUserDef createUserDef()
          Create a DKUserDefICM instance
 dkUserGroupDef createUserGroupDef()
          Create a DKUserGroupDefICM instance
 void del(dkUserDef userDef)
          Deletes an user object from the datastore.
 void del(dkUserGroupDef userGroupDef)
          Deletes an user group object from the datastore.
 void delUser(java.lang.String name)
          Deletes an user of the specified name from datastore
 void delUserGroup(java.lang.String name)
          deletes an user group object of the specified name from the datastore
 int getAccessLevel()
          Deprecated.  
 dkDatastore getDatastore()
          Gets the reference to the associated datastore object whose users and user groups are managed by this object.
 dkUserDef getUserDef(java.lang.String name)
          Gets a user object from a cache.
 java.lang.String getUserDomain(java.lang.String name)
          adminDomain sshi Gets the user's administrative domain
 dkUserGroupDef getUserGroupDef(java.lang.String name)
          Gets a user group object from a cache.
 long getUserPrivilege(java.lang.String name)
          Gets the user's privilege set code
 boolean isAdminUser(java.lang.String userName)
          Check if userName is a system administrative userid
 java.lang.String[] listActiveUserNames()
          Gets a list of active user object names who are currently logged on to the datastore.
 java.lang.String[] listActiveUserNames(java.lang.String domainName)
          Gets a list of users name who are currently logged on to the specified domain.
 dkCollection listGroupsForUser(java.lang.String name)
          Get a list of user group objects from the datastore to which this user belongs to
 dkCollection listUserDefs()
          gets a list of user objects defined in the datastore.
 dkCollection listUserGroupDefs()
          gets a list of user group objects defined in the datastore.
 dkCollection listUserGroupDefs(java.lang.String domainName)
          Gets a list of user group object who are assigned to the specified administrative domain.
 java.lang.String[] listUserGroupNames()
          Gets a list of user group names defined in the datastore.
 java.lang.String[] listUserGroupNames(java.lang.String domainName)
          Gets a list of user group object names who are assigned to the specified administrative domain.
 java.lang.String[] listUserGroups()
          Gets a list of user group names defined in the datastore.
 java.lang.String[] listUserGroups(java.lang.String domainName)
          Gets a list of user group names who are assigned to the specified administrative domain.
 java.lang.String[] listUserNames()
          Gets a list of user names defined in the datastore.
 java.lang.String[] listUserNames(java.lang.String domainName)
          Gets a list of user object names who are assigned to the specified administrative domain.
 java.lang.String[] listUsers()
          Gets a list of user names defined in the datastore.
 java.lang.String[] listUsers(java.lang.String domainName)
          Gets a list of user names who are assigned to the specified administrative domain.
 dkCollection listUsersInGroup(java.lang.String name)
          Get a list of user object in the specified user group from the datastore
 void removeUserDef(java.lang.String name)
          Removes the specified user from cache.(memory only)
 dkUserDef retrieveUserDef(java.lang.String name)
          Retrieves an user object from the datastore
 dkUserGroupDef retrieveUserGroupDef(java.lang.String name)
          Retrieves an user group object from the datastore
 void setDatastore(dkDatastore ds)
          Sets the datastore object whose users and user groups are managed by this object.
 void update(dkUserDef userDef)
          Updates an user object in the datastore.If cache is enabled, it also updated in the cache.
 void update(dkUserGroupDef userGroupDef)
          Updates an user group object in the datastore.If cache is enabled, it also updated in the cache.
 void validateUser(java.lang.String userName, java.lang.String pwd)
          Deprecated.  
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractUserMgmt
addToGroup, addUser, addUser, addUserGroup, addUserGroup, deleteUserDef, deleteUserGroupDef, removeFromGroup
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setDatastore

public void setDatastore(dkDatastore ds)
Sets the datastore object whose users and user groups are managed by this object.
Overrides:
setDatastore in class dkAbstractUserMgmt
Parameters:
ds - dkDatastore - datastore object

getDatastore

public dkDatastore getDatastore()
Gets the reference to the associated datastore object whose users and user groups are managed by this object.
Overrides:
getDatastore in class dkAbstractUserMgmt
Returns:
objecttarget datastore object whose users and user groups are managed by this obect.

listUserDefs

public dkCollection listUserDefs()
                          throws DKException,
                                 java.lang.Exception
gets a list of user objects defined in the datastore. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. If not the list is queried from the datastore and cached.. Note: If just the user names are required, listUserNames method can be used
Overrides:
listUserDefs in class dkAbstractUserMgmt
Returns:
a collection of DKUserDefICM objects.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs
See Also:
listUserNames.

listActiveUserNames

public java.lang.String[] listActiveUserNames()
                                       throws DKException,
                                              java.lang.Exception
Gets a list of active user object names who are currently logged on to the datastore.
Returns:
A string array of user names who are currently logged on to the datastore.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listActiveUserNames

public java.lang.String[] listActiveUserNames(java.lang.String domainName)
                                       throws DKException,
                                              java.lang.Exception
Gets a list of users name who are currently logged on to the specified domain.
Parameters:
domainName - domain name whose active users are to be listed.
Returns:
A string array of user names who are currently logged on to the specified domain.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listUserNames

public java.lang.String[] listUserNames()
                                 throws DKException,
                                        java.lang.Exception
Gets a list of user names defined in the datastore. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. If not the list is queried from the datastore and cached.
Returns:
a list of user object names
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listUserNames

public java.lang.String[] listUserNames(java.lang.String domainName)
                                 throws DKException,
                                        java.lang.Exception
Gets a list of user object names who are assigned to the specified administrative domain. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. If not the list is queried from the datastore and cached.
Parameters:
domainName - Adminstrative domain name from which the user names are to be listed.
Returns:
A string array of list of user object names who are assigned to the specified administrative domain.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listUsers

public java.lang.String[] listUsers()
                             throws DKException,
                                    java.lang.Exception
Gets a list of user names defined in the datastore. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. If not the list is queried from the datastore and cached

this method turns around and calls listUserNames(). These two methodes, listUsers and listUserNames are the same

Overrides:
listUsers in class dkAbstractUserMgmt
Returns:
A string array of user's name
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listUsers

public java.lang.String[] listUsers(java.lang.String domainName)
                             throws DKException,
                                    java.lang.Exception
Gets a list of user names who are assigned to the specified administrative domain. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. If not the list is queried from the datastore and cached.

this method turns around and calls listUserNames(String domainName). These two methods, listUsers(String domainName) and listUserNames(String domainName) are the same

Parameters:
domainName - Administrative domain name from which the user names are to be listed.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

add

public void add(dkUserDef userDef)
         throws DKAlreadyExistException,
                DKException,
                java.lang.Exception
Adds a user object into the datastore. If cache is enabled, it added to the cache. Note: The user name will be uppercased.
Overrides:
add in class dkAbstractUserMgmt
Parameters:
userDef - -- an user object to be added to the datastore.
Throws:
DKAlreadyExistException - if user object already exists
DKException - if error occurs
java.lang.Exception - if error occurs

update

public void update(dkUserDef userDef)
            throws DKNotExistException,
                   DKException,
                   java.lang.Exception
Updates an user object in the datastore.If cache is enabled, it also updated in the cache. Note: The user name cannot be updated. Note: Password can not updated if the user use system define password.
Overrides:
update in class dkAbstractUserMgmt
Parameters:
userDef - -- an user object to be updated in the datastore
Throws:
DKNotExistException - if the specified user does not exist.
DKException - if error occurs
java.lang.Exception - if error occurs

retrieveUserDef

public dkUserDef retrieveUserDef(java.lang.String name)
                          throws DKException,
                                 java.lang.Exception
Retrieves an user object from the datastore
Overrides:
retrieveUserDef in class dkAbstractUserMgmt
Parameters:
name - the name of user to be retrieved
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

getUserDef

public dkUserDef getUserDef(java.lang.String name)
                     throws DKException,
                            java.lang.Exception
Gets a user object from a cache. (memory only) Note: the case of the user name is ignored.
Parameters:
name - - the name of the user to be retrieved
Throws:
DKException - if error occurs

del

public void del(dkUserDef userDef)
         throws DKNotExistException,
                DKException,
                java.lang.Exception
Deletes an user object from the datastore. If cache is enabled, it deleted from the cache.
Overrides:
del in class dkAbstractUserMgmt
Parameters:
userDef - -- an user object to be deleted from the datastore.
Throws:
DKNotExistException - if the specified user does not exist
DKException - if error occurs
java.lang.Exception - if error occurs

delUser

public void delUser(java.lang.String name)
             throws DKNotExistException,
                    DKException,
                    java.lang.Exception
Deletes an user of the specified name from datastore
Overrides:
delUser in class dkAbstractUserMgmt
Parameters:
name - -- the name of user to be deleted from datastore
Throws:
DKNotExistException - if user object does not exists
DKException - if error occurs
java.lang.Exception - if error occurs

removeUserDef

public void removeUserDef(java.lang.String name)
                   throws DKNotExistException,
                          DKException,
                          java.lang.Exception
Removes the specified user from cache.(memory only)
Parameters:
name - - the name of user
Throws:
DKNotExistException - if user object does not exists
DKException - if error occurs
java.lang.Exception - if error occurs

getUserPrivilege

public long getUserPrivilege(java.lang.String name)
                      throws DKException,
                             java.lang.Exception
Gets the user's privilege set code
Parameters:
name - the user's name whose privilege set code is requested.
Returns:
the user's privilege set code
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

getUserDomain

public java.lang.String getUserDomain(java.lang.String name)
                               throws DKException,
                                      java.lang.Exception
adminDomain sshi Gets the user's administrative domain
Parameters:
name - the user's name whose administrative domain is requested.
Returns:
an administrative domain name to which the specified belongs to.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listUserGroupDefs

public dkCollection listUserGroupDefs()
                               throws DKException,
                                      java.lang.Exception
gets a list of user group objects defined in the datastore. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. If not the list is queried from the datastore and cached.. Note: If just the user group names are required, listUserGroupNames method can be used
Overrides:
listUserGroupDefs in class dkAbstractUserMgmt
Returns:
a collection of DKUserGroupDefICM objects.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs
See Also:
listUserGroupNames.

listUserGroupDefs

public dkCollection listUserGroupDefs(java.lang.String domainName)
                               throws DKException,
                                      java.lang.Exception
Gets a list of user group object who are assigned to the specified administrative domain. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. If not the list is queried from the datastore and cached.
Parameters:
domainName - Adminstrative domain name from which the user groups are to be listed.
Returns:
A collection of DKUserGroupDefICM objects who belong to the specified domain.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listUserGroupNames

public java.lang.String[] listUserGroupNames()
                                      throws DKException,
                                             java.lang.Exception
Gets a list of user group names defined in the datastore. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. If not the list is queried from the datastore and cached.
Returns:
A string array of user group object names
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listUserGroupNames

public java.lang.String[] listUserGroupNames(java.lang.String domainName)
                                      throws DKException,
                                             java.lang.Exception
Gets a list of user group object names who are assigned to the specified administrative domain. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. If not the list is queried from the datastore and cached.
Parameters:
domainName - Adminstrative domain name from which the user group names are to be listed.
Returns:
A string array of list of user group object names who are assigned to the specified administrative domain.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listUserGroups

public java.lang.String[] listUserGroups()
                                  throws DKException,
                                         java.lang.Exception
Gets a list of user group names defined in the datastore. If the cache is enabled and if the list is avail nable in the memory then the list is returned from the memory. If not the list is queried from the datastore and cached

this method turns around and calls listUserGroupNames(). These two methods, listUserGroups and listUserGroupNames are the same

Overrides:
listUserGroups in class dkAbstractUserMgmt
Returns:
A string array of user's name
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listUserGroups

public java.lang.String[] listUserGroups(java.lang.String domainName)
                                  throws DKException,
                                         java.lang.Exception
Gets a list of user group names who are assigned to the specified administrative domain. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. If not the list is queried from the datastore and cached.

this method turns around and calls listUserGroupNames(String domainName). These two methods, listUserGroups(String domainName) and listUserGroupNames(String domainName) are the same

Parameters:
domainName - Administrative domain name from which the user names are to be listed.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

add

public void add(dkUserGroupDef userGroupDef)
         throws DKAlreadyExistException,
                DKException,
                java.lang.Exception
Adds a user group object into the datastore. If cache is enabled, it added to the cache. Note: The user group name will be uppercased.
Overrides:
add in class dkAbstractUserMgmt
Parameters:
userGroupDef - -- an user group object to be added to the datastore.
Throws:
DKAlreadyExistException - if user group object already exists
DKException - if error occurs
java.lang.Exception - if error occurs

del

public void del(dkUserGroupDef userGroupDef)
         throws DKNotExistException,
                DKException,
                java.lang.Exception
Deletes an user group object from the datastore. If cache is enabled, it deleted from the cache.
Overrides:
del in class dkAbstractUserMgmt
Parameters:
userGroupDef - -- an user group object to be deleted from the datastore.
Throws:
DKNotExistException - if the specified user group object does not exist
DKException - if error occurs
java.lang.Exception - if error occurs

retrieveUserGroupDef

public dkUserGroupDef retrieveUserGroupDef(java.lang.String name)
                                    throws DKException,
                                           java.lang.Exception
Retrieves an user group object from the datastore
Overrides:
retrieveUserGroupDef in class dkAbstractUserMgmt
Parameters:
name - the name of user group to be retrieved
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

update

public void update(dkUserGroupDef userGroupDef)
            throws DKNotExistException,
                   DKException,
                   java.lang.Exception
Updates an user group object in the datastore.If cache is enabled, it also updated in the cache. Note: The user group name cannot be updated.
Overrides:
update in class dkAbstractUserMgmt
Parameters:
userGroupDef - -- an user group object to be updated in the datastore
Throws:
DKNotExistException - if the specified user group object does not exist
DKException - if error occurs
java.lang.Exception - if error occurs

delUserGroup

public void delUserGroup(java.lang.String name)
                  throws DKNotExistException,
                         DKException,
                         java.lang.Exception
deletes an user group object of the specified name from the datastore
Overrides:
delUserGroup in class dkAbstractUserMgmt
Parameters:
name - -- user group object name to be deleted
Throws:
DKNotExistException - if the specified user group object does not exist
DKException - if error occurs
java.lang.Exception - if error occurs

getUserGroupDef

public dkUserGroupDef getUserGroupDef(java.lang.String name)
                               throws DKException,
                                      java.lang.Exception
Gets a user group object from a cache. (memory only) Note: the case of the user group name is ignored.
Parameters:
name - - the name of the user group to be retrieved
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listUsersInGroup

public dkCollection listUsersInGroup(java.lang.String name)
                              throws DKException,
                                     java.lang.Exception
Get a list of user object in the specified user group from the datastore
Parameters:
name - the name of the usre group
Returns:
A collection of DKUserDefICM object
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listGroupsForUser

public dkCollection listGroupsForUser(java.lang.String name)
                               throws DKException,
                                      java.lang.Exception
Get a list of user group objects from the datastore to which this user belongs to
Parameters:
name - -- the name of the user whose groups are to be retrieved from the datastore
Returns:
A collection of DKUserGroupDefICM object which this user belongs to
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

changePassword

public void changePassword(java.lang.String userId,
                           java.lang.String oldPwd,
                           java.lang.String newPwd)
                    throws DKException,
                           java.lang.Exception
Changes the password of a given user name(user id). The password string can be 31 characters long Note: the old password is ignored.
Overrides:
changePassword in class dkAbstractUserMgmt
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

changePassword

public void changePassword(java.lang.String userId,
                           java.lang.String newPwd)
                    throws DKException,
                           java.lang.Exception
Changes the password of a given user-id. Administrator only function The password string can be 31 characters long
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

changePassword

public void changePassword(java.lang.String newPwd)
                    throws DKException,
                           java.lang.Exception
Changes the password of the currently logged on user. Note: This methods is similar to the changePassword(String userId, String newPwd) method
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

validateUser

public void validateUser(java.lang.String userName,
                         java.lang.String pwd)
                  throws DKNotExistException,
                         DKException,
                         java.lang.Exception
Deprecated.  

Check whether the user exist or not in the datastore.
Throws:
DKNotExistException - if the specified user does not exist
DKException - if error occurs
java.lang.Exception - if error occurs

getAccessLevel

public int getAccessLevel()
                   throws java.lang.Exception
Deprecated.  

Get user's access level Regular User : 0 Administrative User : 1

isAdminUser

public boolean isAdminUser(java.lang.String userName)
                    throws DKNotExistException,
                           DKException,
                           java.lang.Exception
Check if userName is a system administrative userid
Overrides:
isAdminUser in class dkAbstractUserMgmt
Parameters:
userName - user name
Returns:
true if user is administrative user, false otherwise
Throws:
DKNotExistException - if the user name is not exist in the system
DKException - if internal error occurs in EIP server
java.lang.Exception - if there is an error occurs on the serser and this method is called from client via RMI.

clearCache

public void clearCache()
Clears all cache data The lists: user list, user group List, user name List, user group name List, will be cleared.
Overrides:
clearCache in class dkAbstractUserMgmt

createUserDef

public dkUserDef createUserDef()
Create a DKUserDefICM instance
Overrides:
createUserDef in class dkAbstractUserMgmt
Following copied from class: com.ibm.mm.sdk.common.dkAbstractUserMgmt
Returns:
userDef object

createUserGroupDef

public dkUserGroupDef createUserGroupDef()
Create a DKUserGroupDefICM instance
Overrides:
createUserGroupDef in class dkAbstractUserMgmt
Following copied from class: com.ibm.mm.sdk.common.dkAbstractUserMgmt
Returns:
userGroupDef object

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.