OSB_LIB::GrpAccessMap Class Reference

Collaboration diagram for OSB_LIB::GrpAccessMap:

Collaboration graph
[legend]
List of all members.

Detailed Description

Map of group access rights.

The design goal of this class is:
a) provide efficient look-up of access rights,
b) keep similar list functionality out of GrpAccess and UserGroup.

Definition at line 422 of file osbaccess.h.

Public Types

Public Member Functions

Evaluation of access rights.

Private Member Functions

Configuration of access rights:

Private Attributes

Friends

Classes


Member Typedef Documentation

typedef std::map<Key, GrpAccess> OSB_LIB::GrpAccessMap::Entries

STL container used to store the access rights.

The definition implies that the access identifier (tag()) must be unique within a parent.

Definition at line 484 of file osbaccess.h.

typedef std::list<Key> OSB_LIB::GrpAccessMap::Path

The path to an access right.

Note:
The typedef merely exist for the convenience of the GUI application that configures access rights.

Definition at line 492 of file osbaccess.h.


Constructor & Destructor Documentation

OSB_LIB::GrpAccessMap::GrpAccessMap ( const Id< UserGroup grpId  )  [explicit]

Constructor with user group id.


Member Function Documentation

void OSB_LIB::GrpAccessMap::accessRights ( std::list< GrpAccess > &  dest,
const GrpAccess::Oid parId = GrpAccess::Oid() 
) const

Get child access rights.

Parameters:
dest STL-container to populate. It is empty if no childs for parId exist.
parId The parent of the access rights to retrieve,
if not set the 1st level (root) rights of the group are returned.

bool OSB_LIB::GrpAccessMap::allowed ( const std::string &  rootTag  )  const

Check access to a root window.

Parameters:
rootTag Identifier of the root access.
Returns:
true if access to rootTag is allowed, else false.

void OSB_LIB::GrpAccessMap::check ( const GrpAccess access  )  const [private]

Check a group access.

Parameters:
access Module group to verify.
Exceptions:
ObjectNotFound if the parent of access does not exist.
OsbException in case of duplicate access tags for the same parent.
OsbException (internal) if the group id's do not match.

GrpAccess* OSB_LIB::GrpAccessMap::find ( const GrpAccess::Oid gaId  )  [private]

Find a group access by object id.

GrpAccess* OSB_LIB::GrpAccessMap::find ( const Key key  )  [private]

Find a group access by key.

const GrpAccess* OSB_LIB::GrpAccessMap::find ( const Key key  )  const

Find a group access by its parent and access tag.

Parameters:
key The parent and the tag of the group access.
Returns:
Pointer to access right for key,
0 if the access right for key does not exist.

const GrpAccess& OSB_LIB::GrpAccessMap::get ( const Key key  )  const

Get a group access by its parent and access tag.

Parameters:
key The parent and the tag of the group access.
Exceptions:
ObjectNotFound if the access right for key does not exist.
Returns:
The group access right for key.

const GrpAccess& OSB_LIB::GrpAccessMap::get ( const GrpAccess::Oid gaId  )  const

Get a group access by its object id.

Parameters:
gaId The object id of the group access.
Exceptions:
ObjectNotFound if the access right for gaId does not exist.
Returns:
The group access right for gaId.

const Id<UserGroup>& OSB_LIB::GrpAccessMap::grpId (  )  const

Get the id of the user group.

void OSB_LIB::GrpAccessMap::insert ( GrpAccess access  )  [private]

Create or replace an existing access right.

Parameters:
access The access right to insert, it replaces an access right with the same object id.
For new access rights the function sets a temporary (negative) object id.
Exceptions:
OsbException if the parent of access does not exist.
OsbException if GrpAccess::tag() is duplicate within its parent.

void OSB_LIB::GrpAccessMap::read ( const OSB_DB::Session session  ) 

Read the access rights from the database.

Parameters:
session Database to use.
Reads all access rights for grpId() from the database.


Friends And Related Function Documentation

friend class OSB_DB::GrpAccessGw [friend]

Allow insert().

Definition at line 424 of file osbaccess.h.

friend class UserMgmtCfg [friend]

Allow insert().

Definition at line 426 of file osbaccess.h.


Member Data Documentation

Entries OSB_LIB::GrpAccessMap::entries_ [private]

Entries in the access map.

Definition at line 609 of file osbaccess.h.

Id<UserGroup> OSB_LIB::GrpAccessMap::grpId_ [private]

Object id of the user group.

Definition at line 607 of file osbaccess.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:11:52 2006 for OSB Library by  doxygen 1.4.7