Index

dkAuthorizationMgmt

Purpose:

The dkAuthorizationMgmt class provides a generic interface to authorization management functions. It must be subclassed for each datastore implementation, as in the following example:

DKAuthorizationMgmtICM and so forth.

Class summary:

class DKEXPORT dkAuthorizationMgmt
 {
 public:
     dkAuthorizationMgmt();
     virtual ~dkAuthorizationMgmt();
     virtual dkDatastore* getDatastore();
     virtual void setDatastore(dkDatastore* ds);
     virtual dkCollection* listPrivilegeSets();
     virtual DKString* listPrivilegeSetNames(long& arraySize);
     virtual dkPrivilegeSet* createPrivilegeSet();
     virtual void add(dkPrivilegeSet* privSetObj);
     virtual void del(dkPrivilegeSet* privSetObj);
     virtual void deletePrivilegeSet(const char* privSetName);
     virtual void update(dkPrivilegeSet* privSetObj);
     virtual dkPrivilegeSet* retrievePrivilegeSet(const char* privSetName);
     virtual dkCollection* listPrivileges();
     virtual DKString* listPrivilegeNames(long& arraySize);
     virtual dkPrivilege* createPrivilege();
     virtual void add(dkPrivilege* privObj);
     virtual void del(dkPrivilege* privObj);
     virtual void deletePrivilege(const char* privName);
     virtual void update(dkPrivilege* privObj);
     virtual dkPrivilege* retrievePrivilege(const char* privName);
     virtual dkCollection* listPrivilegeGroups();
     virtual DKString* listPrivilegeGroupNames(long& arraySize);
     virtual dkPrivilegeGroup* createPrivilegeGroup();
     virtual void add(dkPrivilegeGroup* privGroupObj);
     virtual void del(dkPrivilegeGroup* privGroupObj);
     virtual void deletePrivilegeGroup(const char* privGroupName);
     virtual void update(dkPrivilegeGroup* privGroupObj);
     virtual dkPrivilegeGroup* retrievePrivilegeGroup(const char* privGroupName);
     virtual dkCollection* listAccessControlLists();
     virtual DKString* listAccessControlListNames(long& arraySize);
     virtual dkAccessControlList* createAccessControlList();
     virtual void add(dkAccessControlList* aclObj);
     virtual void del(dkAccessControlList* aclObj);
     virtual void deleteAccessControlList(const char* aclName);
     virtual void update(dkAccessControlList* aclObj);
     virtual dkAccessControlList* retrieveAccessControlList(const char* aclName);
     virtual void clearCache();
 };

Members:

Constructors and destructor
dkAuthorizationMgmt();
virtual ~dkAuthorizationMgmt(); 

Member functions

setDatastore
Sets the datastore to which this Authorization Managment object is associated.
virtual void setDatastore (dkDatastore* ds);

getDatatstore
Gets the datastore to which this Authorization Managment object is associated.
virtual dkDatastore* getDatastore();

listPrivilegeSets
Gets a list of privilege sets from the persistent datastore.
virtual dkCollection* listPrivilegeSets(); 

Note:
DKUsageError exception thrown if function is not implemented..


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

listPrivilegeSetNames
Gets a list of privilege set names from the persistent datastore .
virtual DKString* listPrivilegeSetNames(long& arraySize);

Note:
DKUsageError exception thrown if functionis not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual:
virtual dkCollection* listPrivilegeSets() = 0;


It should not throw a DKUsageError exception indicating that the method is unimplemented.

createPrivilegeSet
Creates a privilege set object.
virtual dkPrivilegeSet* createPrivilegeSet(); 

add
Adds the given privilege set object from the persistent datastore .
virtual void add(dkPrivilegeSet* privSetObj);

Note:
DKUsageError exception thrown if function is not implemente.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

del
Deletes a privilege set from the persistent store.
virtual void del(dkPrivilegeSet* privSetObj);

deletePrivilegeSet
Deletes the given privilege set object from the persistent datastore.
virtual void deletePrivilegeSet(const char* privSetName); 

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

update
Updates the given privilege set object in persistent datastore.
virtual void update(dkPrivilegeSet* privSetObj);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

retrievePrivilegeSet
Retrieves the given privilege set object from the persistent datastore.
virtual dkPrivilegeSet* retrievePrivilegeSet(const char* privSetName);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

retrieveUserPrivilegeSet
Updates the given privilege set object in persistent datastore based on the specified user name.
virtual dkPrivilegeSet* retrieveUserPrivilegeSet(const char* userName);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

retrieveUserGroupPrivilegeSet
Updates the given privilege set object in persistent datastore based on the specified user group.
virtual dkPrivilegeSet* retrieveUserGroupPrivilegeSet(const char* userGroup);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

listPrivileges
Gets a list of privileges from the persistent datastore.
virtual dkCollection* listPrivileges();

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

listPrivilegeNames
Gets a list of privilege names from the persistent datastore.
virtual DKString* listPrivilegeNames(long& arraySize);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

createPrivilege
Creates a privilege object .
virtual dkPrivilege* createPrivilege();

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

add
Adds the given privilege object to persistent datastore.
virtual void add(dkPrivilege* privObj);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

del
Deletes the given privilege object from the persistent datastore.
virtual void del(dkPrivilegeSet* privSetObj);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

deletePrivilege
Deletes the given privilege object from the persistent datastore.
virtual void deletePrivilege(const char* privName); 

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

update
Updates the given privilege object in persistent datastore .
virtual void update(dkPrivilege* privObj);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

retrievePrivilege
Retrieves the given privilege object from the persistent datastore.

virtual dkPrivilege*

Note:
DKUsageError exception thrown if function is not implemented.
If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

listPrivilegeGroups
Gets a list of privilege group from the persistent datastore.
virtual dkCollection* listPrivilegeGroups(); 

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

listPrivilegeGroupNames
Gets a list of privilege group names from the persistent datastore.

virtual DKString* listPrivilegeGroupNames(long& arraySize);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

createPrivilegeGroup
Creates a privilege group object.
virtual dkPrivilegeGroup* createPrivilegeGroup();

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

add
Adds the given privilege group object to persistent datastore.
virtual void add(dkPrivilegeGroup* privGroupObj);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

del
Deletes the given privilege group object from the persistent datastore.
virtual void del(dkPrivilegeGroup* privGroupObj);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

deletePrivilegeGroup
Deletes the given privilege group object from the persistent datastore.
virtual void deletePrivilegeGroup(const char* privGroupName);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

retrievePrivilegeGroup
Retrieves the given privilege group object from the persistent datastore.
virtual dkPrivilegeGroup* retrievePrivilegeGroup(const char* privGroupName);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

listAccessControlLists
Gets a list of access control list names from the persistent datastore.
virtual dkCollection* listAccessControlLists(); 

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

listAccessControlListNames
Gets a list of access control list names from the persistent datastore.
virtual DKString* listAccessControlListNames(long& arraySize); 

Note:
DKUsageError exception thrown if function is notimplemented

createAccessControlList
Creates an access control list object.
virtual dkAccessControlList* createAccessControlList();

Note:
DKUsageError exception thrown if function is not implemented

add
Adds the given access controllist object from the persistent datastore.
virtual void add(dkAccessControlList* aclObj);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

del
Deletes the given access control list object from the persistent datastore.
virtual void del(dkAccessControlList* aclObj);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

deleteAccessControlList
Deletes the given access control list object from the persistent datastore.
virtual void deleteAccessControlList(const char* aclName);

Note:
DKUsageError exception thrown if function is not implemented.

update
Updates the given access control list object in persistent datastore.
virtual void update(dkAccessControlList* aclObj);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

retrieveAccessControlList
Retrieves the given access controllist object from the persistent datastore.
virtual dkAccessControlList* retrieveAccessControlList(const char* aclName);

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

clearCache
Clears the cache
virtual void clearCache();

Note:
DKUsageError exception thrown if function is not implemented.


If listPrivilegeSets() cannot be implemented in this (base) class, then it should be defined as pure virtual i.e. virtual dkCollection* listPrivilegeSets() = 0; It should not throw a DKUsageError exception indicating that the method is unimplemented.

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