Index

DKUserGroupDefICM

Purpose:

This class is used to specify the definition for a user group in Content Manager Version 8.

Since: Version 8

Hierarchy: dkUserGroupDef DKUserGroupDefICM

Class summary:

class DKUserGroupDefICM : public dkUserGroupDef
 {
   public:
 
    DKUserGroupDefICM();
    DKUserGroupDefICM(dkDatastore* ds);
    DKUserGroupDefICM(const char* userGrpName);
    virtual ~DKUserGroupDefICM();
 
    virtual dkCollection* listUsers();
    virtual DKString* listUserNames(long& arraySize);
    virtual void addUser(dkUserDef* userDefObj);
    virtual void removeUser(const char* userName);
    virtual void clearCache();
    DKString getNewName();
    void setNewName(const char* name);
    void setRetrieved(DKBoolean isRetrieved);
    DKString getDomainName();
    void setDomainName(const char* name);
    long getDomainId();
    void setDomainId(long id);
    DKBoolean isNameChanged();
    DKString getOldName();
    void setUsers(dkCollection* dkColl);
    dkCollection* getUsers();
 };
 
 

Members:

Constructors and destructor
DKUserGroupDefICM()

Default constructor. Creates a user group definition that is not associated with any datastore instance currently.

DKUserGroupDefICM(dkDatastore* ds)

Constructor that takes a datastore instance as a parameter. The returned user group definition instance is associated with the datastore instance. Equivalent to calling the default constructor followed by the setDatastore method on the created object.

Parameters:ds - valid instance of a datastore object, which should be an instance of

DKUserGroupDefICM(const char* userGrpName)

Constructs and initializes a user group class associated with a specified user group name.

Parameters:userGrpName - string - name of a user group. It can be up to 32 characters long.

virtual ~DKUserGroupDefICM()

Destructor for this object.

Member functions

listUsers()
Retrieves a list of the users in this user group from the persistent datastore.

Returns:Collection of user definitions as instances of DKUserDefICM

virtual dkCollection* listUsers();

listUserNames()
Retrieves a list of the names of the users in this user group from the persistent datastore.

Parameters:arraySize - size of the returned array

Returns:array of user names as DKString variable instances

Throws:DKException if error occurs on the server

virtual DKString* listUsernames(long& arraySize);

clearCache()
Removes all user definitions from the in-memory (cached) representation of this user group definition.
virtual void clearCache();

removeUser()
Removes a user from the in-memory (cached) representation of this user group.

Parameters:userName - name of user to be removed

virtual void removeUser(const char* userName);

addUser
Adds a new user definition to the in-memory (cached) representation of this user group.

Parameters:userDefObj - user definition object as an instance of DKUserDefICM

virtual void addUser(dkUserDef* userDefObj);

getNewName()
Returns the new name of the user group if the name was changed; otherwise, returns the original name.

Returns:New or original name as a DKString variable

DKString getNewName(); 

setNewName()
Sets the new name of the user group; writes the original name into the old name variable.

Parameters:name - new name for the user group

void setNewName(const char* name); 

getDomainName()
Retrieves the name of the administration domain associated with this user group.

Returns:Name of the administration domain as a DKString variable

DKString getDomainName();

setDomainName()
Sets the name of the administration domain associated with this user group.

Parameters:name - new name of the administration domain

void setDomainName(const char* name);

getDomainId()
Retrieves the ID of the administration domain associated with this user group.

Returns:ID of the administration domain

long getDomainId();

setDomainId()
Sets the ID of the administration domain associated with this user group.
void setDomainId(long id);

setRetrieved()
Sets whether user group is retrieved or not.

Parameters:isRetrieved - if TRUE, the user group is determined to have been retrieved; if FALSE, the user group is determined not to have been retrieved.

void setRetrieved(DKBoolean isRetrieved);

isNameChanged()
Determines whether the name of the user group was changed or not.

Returns:TRUE if the name was changed; FALSE otherwise.

DKBoolean isNameChanged();

getOldName()
Returns the old name of the user group if its name was changed; a blank string is returned otherwise.

Returns:Old name of the user group if the name was changed; Blank string returned otherwise.

DKString getOldName();

getUsers()
Retrieves the list of users for the in-memory (cached) representation of this user group.

Returns:Collection of user definitions as instances of DKUserDefICM

dkCollection* getUsers();

setUsers()
Sets the list of users in the in-memory (cached) representation of this user group.

Parameters:dkColl - collection of user definitions as instances of DKUserDefICM

void setUsers(dkCollection* dkColl);

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