OSB_LIB::ModAccess Class Reference

Collaboration diagram for OSB_LIB::ModAccess:

Collaboration graph
[legend]
List of all members.

Detailed Description

Access right for a module.

The class defines one access right for an OSB module.
Developers use osbadmin to register the access rights that are verified by the application.

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

See also:
ModAccessMap which stores the access rights for one application.

Definition at line 97 of file osbaccess.h.

Public Types

Public Member Functions

Private Member Functions

Private Attributes

Friends


Member Typedef Documentation

typedef Id<ModAccess> OSB_LIB::ModAccess::Oid

Unique object identifier.

Definition at line 104 of file osbaccess.h.


Constructor & Destructor Documentation

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

Constructor with optional object id.

OSB_LIB::ModAccess::ModAccess ( const ModuleId  module,
const Oid parent = Oid() 
)

Constructor with module, access tag and optional parent id.

Parameters:
module The module of the access right.
parent The parent access right (not set for root access rights of the module).


Member Function Documentation

ModuleId OSB_LIB::ModAccess::module (  )  const

The module for which the acess right is valid.

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

The object id.

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

The object id of the parent.

The parent id is not set for root access rights.

void OSB_LIB::ModAccess::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::ModAccess::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::ModAccess::save ( const OSB_DB::Session session  )  [private]

Save the access right to the database.

Parameters:
session Database session to use.
Exceptions:
OsbException from setTag() (new access right).
OsbException if the insert fails.
OsbException if the update fails.

void OSB_LIB::ModAccess::setTag ( const std::string &  tag  ) 

Set the access identifier.

Exceptions:
OsbException if tag is empty.
OsbException if tag is too long.

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

The identifier of the access right.


Friends And Related Function Documentation

friend class OSB_DB::ModAccessGw [friend]

Allow to set the object id.

Definition at line 99 of file osbaccess.h.

friend class UserMgmtCfg [friend]

Allow save() and remove().

Definition at line 101 of file osbaccess.h.


Member Data Documentation

ModuleId OSB_LIB::ModAccess::module_ [private]

The module for which the acess right is valid.

Definition at line 185 of file osbaccess.h.

Oid OSB_LIB::ModAccess::oid_ [private]

The object id.

Definition at line 187 of file osbaccess.h.

Oid OSB_LIB::ModAccess::parent_ [private]

The object id of the parent.

Definition at line 189 of file osbaccess.h.

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

The access right element.

Definition at line 191 of file osbaccess.h.


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