OSB_LIB::GrpAccess Class Reference

Collaboration diagram for OSB_LIB::GrpAccess:

Collaboration graph
[legend]
List of all members.

Detailed Description

Access right for a user group.

For performance to search an access right, the class contains redundant data (tag(), parentId()) that could be derived from ModAccess.

The class itself is not protected against concurrent access:
This is done by UserMgmtCfg which uses the UserGroup to verify that the access data are up-to-date.

See also:
GrpAccessMap

Definition at line 309 of file osbaccess.h.

Public Types

Public Member Functions

Private Member Functions

Private Attributes

Friends


Member Typedef Documentation

typedef Id<UserGroup> OSB_LIB::GrpAccess::GrpId

Short-hand for a user group id.

Definition at line 318 of file osbaccess.h.

typedef Id<ModAccess> OSB_LIB::GrpAccess::MaId

Short-hand for a module access id.

Definition at line 320 of file osbaccess.h.

typedef Id<GrpAccess> OSB_LIB::GrpAccess::Oid

Unique object identifier.

Definition at line 316 of file osbaccess.h.


Constructor & Destructor Documentation

OSB_LIB::GrpAccess::GrpAccess ( const Oid oid = Oid()  )  [explicit]

Default constructor with optional object id.

OSB_LIB::GrpAccess::GrpAccess ( const GrpId grpId,
const Oid parent = Oid() 
)

Constructor with user group and optional parent.

Parameters:
grpId The id of the user group to which the access belongs to.
parent The parent of the access right,
not set for the user group's root access.


Member Function Documentation

const GrpId& OSB_LIB::GrpAccess::grpId (  )  const

User group of the access right.

const MaId& OSB_LIB::GrpAccess::maId (  )  const

Underlying module access right.

const Oid& OSB_LIB::GrpAccess::oid (  )  const

Object id.

const Oid& OSB_LIB::GrpAccess::parentId (  )  const

Parent of the access right.

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

Read the access right from the database.

Parameters:
session Database session to use.
Exceptions:
OsbException if the access right as identified by oid() does not exist.

void OSB_LIB::GrpAccess::remove ( const OSB_DB::Session session  )  [private]

Remove the access right from the database.

Parameters:
session Database session to use.
Exceptions:
OsbException if no row was removed.

void OSB_LIB::GrpAccess::save ( const OSB_DB::Session session  )  [private]

Save the access right to the database.

Parameters:
session Database session to use.
Exceptions:
OsbException if maId() is not set,
i.e., setModAccess() was never called.
OsbException if the insert fails.
Note:
Currently a group access right can not be updated because there's no relevant data.

void OSB_LIB::GrpAccess::setModAccess ( const ModAccess modAccess  ) 

Set the underlying module access.

const std::string& OSB_LIB::GrpAccess::tag (  )  const

The access identifier.


Friends And Related Function Documentation

friend class OSB_DB::GrpAccessGw [friend]

Allow to set data members.

Definition at line 311 of file osbaccess.h.

friend class UserMgmtCfg [friend]

Allow save() and remove().

Definition at line 313 of file osbaccess.h.


Member Data Documentation

GrpId OSB_LIB::GrpAccess::grpId_ [private]

User group of the access right.

Definition at line 401 of file osbaccess.h.

MaId OSB_LIB::GrpAccess::maId_ [private]

Module access right.

Definition at line 403 of file osbaccess.h.

Oid OSB_LIB::GrpAccess::oid_ [private]

The object id.

Definition at line 399 of file osbaccess.h.

Oid OSB_LIB::GrpAccess::parent_ [private]

The object id of the parent.

Definition at line 405 of file osbaccess.h.

std::string OSB_LIB::GrpAccess::tag_ [private]

The access right identifier.

For performance reasons this is redundant from the underlying module acess right.

Definition at line 412 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