Purpose:
A privilege group is a logical grouping of privileges. Privilege groups can be used to combine privileges before being added as a whole into a privilege set. The DKPrivilegeGroupICM class represents privilege groups in Content Manager.
See Also: DKPrivilegetICM, DKPrivilegeSetICM
Since: Version 8
Class summary:
class DKEXPORT DKPrivilegeGroupICM : public dkPrivilegeGroup { public: DKPrivilegeGroupICM(); DKPrivilegeGroupICM(dkDatastore* ds); virtual ~DKPrivilegeGroupICM(); virtual void addPrivilege(dkPrivilege* privObj); virtual void clearCache (); long getID(); DKBoolean isRetrieved(); virtual DKString* listPrivilegeNames(long& arraySize); virtual dkCollection* listPrivileges(); void removePrivilege(long privId); virtual void removePrivilege(const char* privName); void setID(long id); void setRetrieved(DKBoolean isRetrieved); };
Members:
DKPrivilegeGroupICM()
Default constructor. Constructs and initializes a privilege group instance that is not currently associated with any datastore instance.
DKPrivilegeGroupICM(dkDatastore* ds)
Constructor that takes a datastore instance as a parameter. The created privilege group instance is associated with the datastore instance. Equivalent to calling the default constructor followed by the setDatastore method on the created privilege group instance.Parameters:ds - datastore reference. Should be an instance of DKDatastoreICM
virtual ~DKPrivilegeGroupICM()
Destructor for this object.
Parameters:privObj - a valid DKPriviligeICM instance
Throws:DKAlreadyExitsException - if the privObj already exists in this DKPrivilegeGroupICM object. DKException - when error occurs
virtual void addPrivilege(dkPrivilege* privObj);
virtual void clearCache ();
Returns:identifier for this privilege group object
long getID();
Returns:true if the privileges have already retrieved, false otherwise
DKBoolean isRetrieved();
Parameters:arraySize - array size of names of the privileges associated with this privilege group
Returns:an array of names for all the privileges associated with this privilege group
Throws:DKException - when error occurs in the server
virtual DKString* listPrivilegeNames(long& arraySize);
Returns:Each item in the returned collection is an instance of type DKPrivilegeICM
Throws:DKException - when error occurs in the server
virtual dkCollection* listPrivileges();
Parameters:privName - name of the privilege to be removed
Returns:Each item in the returned collection is an instance of type DKPrivilegeICM
Throws:DKNotExistException - if the privilege name does not exist in this privilege groupDKException - when error occurs in the server
virtual void removePrivilege(const char* privName);
Parameters:priv_id - identifier of the privilege to be removed
Returns:Each item in the returned collection is an instance of type DKPrivilegeICM
Throws:DKNotExistException - if the privilege does not exist in this privilege group. DKException - when error occurs in the serverDKException - when error occurs in the server
virtual void removePrivilege(long priv_id);
Parameters:id - new ID to be associated with this privilege group instance.
void setID(long id);
Parameters:isRetrieved - if true, indicates that this privilege group has already been retrieved; if false, indicates that the privilege group has not yet been retrieved.
void setRetrieved(DKBoolean isRetrieved);
(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.