A user group defines access rights for one Module.
For an application several groups with different access rights may be defined.
A user can belong only to one group of a given application.
Definition at line 83 of file osbusrgrp.h.
typedef Id<UserGroup> OSB_LIB::UserGroup::Oid |
Constructor with optional object id.
OSB_LIB::UserGroup::UserGroup | ( | ModuleId | module | ) | [explicit] |
Constructor with the module of the group.
const GrpAccessMap& OSB_LIB::UserGroup::accessMap | ( | ) | const |
Map of access rights.
const std::string& OSB_LIB::UserGroup::des | ( | ) | const |
Description for the group.
static void OSB_LIB::UserGroup::handleObjectStatus | ( | ObjectStatus | os, | |
const Oid & | id | |||
) | [static, private] |
Evalute the object status of a user group.
os | Object status to evaluate. | |
id | The id of the user group for which os is valid. |
ObjectDeleted | ||
ObjectModified |
void OSB_LIB::UserGroup::incObjVs | ( | const OSB_DB::Session & | session | ) | [private] |
Increment the object version by 1.
session | Database session to use. |
OsbException | (internal error) if the update of the object version in the database fails. |
void OSB_LIB::UserGroup::lock | ( | const OSB_DB::Session & | session | ) | const [private] |
Lock a user group in the database.
session | Database session to use. |
OsbException | from handleObjectStatus(). |
static void OSB_LIB::UserGroup::lock | ( | const OSB_DB::Session & | session, | |
const Oid & | id | |||
) | [static, private] |
Lock a user group in the database.
session | Database session to use. | |
id | The object id of the user group to lock. |
OsbException | from handleObjectStatus(), (ObjectModified is not applicable). |
const ModuleId OSB_LIB::UserGroup::module | ( | ) | const |
The OSB module of the group.
const std::string& OSB_LIB::UserGroup::name | ( | ) | const |
Name of the group.
const Oid OSB_LIB::UserGroup::oid | ( | ) | const |
The object id of the group.
void OSB_LIB::UserGroup::read | ( | const OSB_DB::Session & | session | ) |
Read the user group from the database.
session | Database session to use. |
ObjectNotFound | if the user group does not exist in the database. |
void OSB_LIB::UserGroup::remove | ( | const OSB_DB::Session & | session | ) | [private] |
Remove the user group from the database.
session | Database session to use. |
OsbException | from incObjVs(). | |
OsbException | if user belong to the group. |
void OSB_LIB::UserGroup::save | ( | const OSB_DB::Session & | session | ) | [private] |
Save name and description to the database.
session | Database session to use. |
OsbException | if another group with name() exists. | |
OsbException | from lock(const OSB_DB::Session&) const, see there. |
void OSB_LIB::UserGroup::setDes | ( | const std::string & | des | ) |
Set the description.
des | Description for the group. |
OsbException | if des is too long. |
void OSB_LIB::UserGroup::setName | ( | const std::string & | name | ) |
Set the name.
name | Name of the group. |
OsbException | if name is empty. | |
OsbException | if name is too long. |
friend class OSB_DB::UserGroupGw [friend] |
friend class UserMgmtCfg [friend] |
GrpAccessMap OSB_LIB::UserGroup::accessMap_ [private] |
std::string OSB_LIB::UserGroup::des_ [private] |
ModuleId OSB_LIB::UserGroup::module_ [private] |
std::string OSB_LIB::UserGroup::name_ [private] |
long OSB_LIB::UserGroup::objVs_ [private] |
Object version: set by the gateway during database operations.
Definition at line 240 of file osbusrgrp.h.
Oid OSB_LIB::UserGroup::oid_ [private] |