Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKUserGroupDefICM

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractUserGroupDef
        |
        +--com.ibm.mm.sdk.common.DKUserGroupDefICM
All Implemented Interfaces:
DKConstant, DKMessageId, DKMessageIdICM, dkUserGroupDef, java.io.Serializable

public class DKUserGroupDefICM
extends dkAbstractUserGroupDef
implements DKConstant, DKMessageIdICM, java.io.Serializable

The DKUserGroupDefICM class is the implementation of the abstract class dkAbstractUserGroupDef. Use this class to represent a user group in your program. This class provides facilities to manage a user group in the datastore with actions such as adding, updating users and domains.

See Also:
dkUserGroupDef., 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.DKMessageIdICM
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKUserGroupDefICM()
          Constructs and initializes a user group class.
DKUserGroupDefICM(dkDatastore ds)
          Constructs and initializes a user group class associated with a given datastore.
DKUserGroupDefICM(java.lang.String userGrpName)
          Constructs and initializes a user group class associated with a specified user group name.
 
Method Summary
 void addUser(dkUserDef userDef)
          Adds a new user to this user group (memory-only)
 void clearCache()
          Clear user group cache
 java.lang.String getDescription()
          Gets user group's description
 java.lang.String getDomainName()
          Gets the administrative domain name that this user group belongs to
 java.lang.String getName()
          Gets user group name
 java.lang.String getNewName()
          Deprecated.  
 java.lang.String getOldName()
          Gets user group old name
 java.util.Vector getUsers()
          Gets a list of users who are assigned to this user group(memory only)
 boolean isNameChanged()
          Checks to see if the user group name have been changed
 boolean isRetrieved()
          Checks to see if the users of this group have been retrieved from the datastore.
 java.lang.String[] listUserNames()
          Gets a list of user names who are assigned to this user group from from datastore.
 dkCollection listUsers()
          Gets a list of users who are assigned to in this user group from the datastore.
 void removeUser(java.lang.String user_name)
          Removes a user from this user group (memory-only)
 void setDescription(java.lang.String desc)
          Sets the description for this user group.
 void setDomainName(java.lang.String name)
          Sets the administrative domain name that this user group belongs to
 void setName(java.lang.String name)
          Set user group name
 void setNewName(java.lang.String name)
          Deprecated.  
 void setRetrieved(boolean isRetrieved)
          Sets whether the users have been retrieved from the datastore.
 void setUsers(java.util.Vector vUsers)
          Adds a set of users to this user group.
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractUserGroupDef
datastoreType, getDatastore, setDatastore
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DKUserGroupDefICM

public DKUserGroupDefICM()
Constructs and initializes a user group class. Default constructor constructs and initializes a user group class. The datastore should be initialized and a connection should exits before persisting this object in the datastore. The setDatastore method can be used to set the datastore.

This class represents a user group in the Library Server.

  DKUserGroupDefICM userGroup = new DKUserGroupDefICM();  
  userGroup.setDatastore(ds);
  
See Also:
dkUserGroupDef, dkAbstractUserGroupDef

DKUserGroupDefICM

public DKUserGroupDefICM(dkDatastore ds)
Constructs and initializes a user group class associated with a given datastore. The datastore should be initialized and a connection should exits before persisting this object in the datastore. The setDatastore method can be used to set the datastore.

This class represents a user group in the Library Server.

  DKUserGroupDefICM userGroup = new DKUserGroupDefICM(ds);
  
Parameters:
ds - - dkDatastore reference
See Also:
dkUserGroupDef, dkAbstractUserGroupDef

DKUserGroupDefICM

public DKUserGroupDefICM(java.lang.String userGrpName)
Constructs and initializes a user group class associated with a specified user group name. This class represents a user group in the Library Server. DKUserGroupDefICM userGroup = new DKUserGroupDefICM(String userGrpName);

This class represents a user group in the Library Server.

  DKUserGroupDefICM userGroup = new DKUserGroupDefICM(String userGrpName);
  
Parameters:
userGrpName - string - name of a user group. It can be up to 32 characters long.
See Also:
dkUserGroupDef, dkAbstractUserGroupDef
Method Detail

getNewName

public java.lang.String getNewName()
Deprecated.  

Gets the new name of the user group
Returns:
new name of this user group If the new name is not available it will return the name.

setNewName

public void setNewName(java.lang.String name)
Deprecated.  

Sets the new name of the user group.
Parameters:
name - String - new name to be set to this user group object. The new name can be up to 32 characters long.

getDescription

public java.lang.String getDescription()
Gets user group's description
Overrides:
getDescription in class dkAbstractUserGroupDef
Returns:
description of this user group's

setDescription

public void setDescription(java.lang.String desc)
Sets the description for this user group.
Overrides:
setDescription in class dkAbstractUserGroupDef
Parameters:
desc - String - the description of this user group's. The description can be up to 254 characters.

setUsers

public void setUsers(java.util.Vector vUsers)
              throws DKException,
                     java.lang.Exception
Adds a set of users to this user group.
Parameters:
vUsers - - a vector containing DKUserDefICM object. All the users will be added to this user group.
Throws:
DKException - when error occurs, for example:if one or more users do not exist in the datastore
java.lang.Exception - when error occurs
See Also:
DKUserDefICM

getUsers

public java.util.Vector getUsers()
Gets a list of users who are assigned to this user group(memory only)
Returns:
_vList - a vector containing DKUserDefICM object

listUsers

public dkCollection listUsers()
                       throws DKException,
                              java.lang.Exception
Gets a list of users who are assigned to in this user group from 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 just the user names are required, listUserNames method can be used.
Overrides:
listUsers in class dkAbstractUserGroupDef
Returns:
a collection of DKUserDefICM objects
Throws:
DKException - when error occurs in the server
java.lang.Exception - when error occurs in the server
See Also:
getUsers, listUserNames

listUserNames

public java.lang.String[] listUserNames()
                                 throws DKException,
                                        java.lang.Exception
Gets a list of user names who are assigned to this user group from from datastore. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. If the user objects are required, listUsers method can be used.
Overrides:
listUserNames in class dkAbstractUserGroupDef
Returns:
a string array of user names
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs
See Also:

addUser

public void addUser(dkUserDef userDef)
             throws DKAlreadyExistException,
                    DKException,
                    java.lang.Exception
Adds a new user to this user group (memory-only)
Overrides:
addUser in class dkAbstractUserGroupDef
Parameters:
userDef - a DKUserDefICM object who is to be added to this user group
Throws:
DKAlreadyExitsException - if the userDef already exists in this DKUserGroupICM object
DKException - when error occurs
java.lang.Exception - when error occurs
See Also:
DKUserDefICM, dkUserDef

removeUser

public void removeUser(java.lang.String user_name)
                throws DKNotExistException,
                       DKException
Removes a user from this user group (memory-only)
Overrides:
removeUser in class dkAbstractUserGroupDef
Parameters:
user_name - name of the user to be deleted
Throws:
DKNotExistException - if the user name does not exist in this user group.
DKException - when error occurs

getDomainName

public java.lang.String getDomainName()
Gets the administrative domain name that this user group belongs to
Returns:
_domainName that this user group belongs to

setDomainName

public void setDomainName(java.lang.String name)
Sets the administrative domain name that this user group belongs to
Parameters:
name - String - adminadministrative domain name to which this user group belongs to The domain name can be up to 32 characters.

isRetrieved

public boolean isRetrieved()
Checks to see if the users of this group have been retrieved from the datastore. have been retrieved for this user group. When the cache is cleared this will return false until the users are retrieved from the datastore again.
Returns:
true if already retrieved, false otherwise

setRetrieved

public void setRetrieved(boolean isRetrieved)
Sets whether the users have been retrieved from the datastore.
Parameters:
isRetrieved - - true if users are already retrieved from the datastore, false otherwise

clearCache

public void clearCache()
                throws DKException,
                       java.lang.Exception
Clear user group cache
Overrides:
clearCache in class dkAbstractUserGroupDef

setName

public void setName(java.lang.String name)
Set user group name
Overrides:
setName in class dkAbstractUserGroupDef
Parameters:
name - String - name of this user group

getName

public java.lang.String getName()
Gets user group name
Overrides:
getName in class dkAbstractUserGroupDef
Returns:
name of this user group

isNameChanged

public boolean isNameChanged()
Checks to see if the user group name have been changed
Returns:
true if has been changed, false otherwise

getOldName

public java.lang.String getOldName()
Gets user group old name
Returns:
_oldName - old name of this user group

EIP Java APIs

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