This is user created, non-prepaid resource.
Definition at line 68 of file trunkresource.h.
typedef std::list<AssignedTrunk> OSB_LIB::TrunkResource::AssignedTrunks |
Constructor with optional object id.
Constructor with resource number and optional network id.
rn | The resource number. | |
nw | The id of the network that owns the trunk resource. |
bool OSB_LIB::TrunkResource::addTrkGroup | ( | const OSB_DB::Session & | session, | |
const Date & | start, | |||
const TrunkGroup & | tg | |||
) |
bool OSB_LIB::TrunkResource::assign | ( | const AssignedTrunk & | assignedTg | ) | [private] |
Add a trunk group to the resource.
assignedTg | Trunk group assignment to add. |
const AssignedTrunks& OSB_LIB::TrunkResource::assignedTrks | ( | ) | const |
List with all the assigned trunk groups.
bool OSB_LIB::TrunkResource::canSetExtNw | ( | ) | const |
Check if the external network can be set or not.
The external network can be set if the resource has no trunk group assigned and the status of the trunk resource is not rsAssigned.
const AssignedTrunks OSB_LIB::TrunkResource::curAssignedTrks | ( | ) | const |
List with current assigned trunk groups.
bool OSB_LIB::TrunkResource::deassign | ( | const Id< TrunkGroup > & | tgId | ) | [private] |
Remove a trunk group from the resource.
tgId | Id of the removed trunk group. |
bool OSB_LIB::TrunkResource::delTrkGroup | ( | const OSB_DB::Session & | session, | |
const Id< TrunkGroup > & | tgId | |||
) |
const std::string& OSB_LIB::TrunkResource::des | ( | ) | const |
Description.
const TrunkGroup& OSB_LIB::TrunkResource::getTrkGroup | ( | const Id< TrunkGroup > & | tgId | ) | const |
Get a trunk group by its id.
tgId | Id of the trunk group to search. |
OsbException | if the trunk group can not be found or if the trunk group is not assigned to the resource. |
bool OSB_LIB::TrunkResource::insert | ( | const OSB_DB::Session & | session | ) | [virtual] |
Insert the resource into the database.
session | Database session to use. |
Implements OSB_LIB::Resource.
bool OSB_LIB::TrunkResource::isCurAssigned | ( | const Id< TrunkGroup > & | tgId | ) | const |
Check whether the trunk group is currently assigned to this trunk resource.
bool OSB_LIB::TrunkResource::read | ( | const OSB_DB::Session & | session | ) | [virtual] |
Read the resource from the database.
session | Database session to use. |
Implements OSB_LIB::Resource.
bool OSB_LIB::TrunkResource::remove | ( | const OSB_DB::Session & | session | ) | [virtual] |
Delete the resource from the database.
session | Database session to use. |
Implements OSB_LIB::Resource.
void OSB_LIB::TrunkResource::setDes | ( | const std::string & | des | ) |
Set the description.
Set the partner network.
ext | The id of the external network. |
OsbException | in case of an error:
|
static void OSB_LIB::TrunkResource::sortTgsByName | ( | AssignedTrunks & | groups | ) | [static] |
Sort assigned trunk groups by name.
groups | List of assigned trunk groups to sort. |
static void OSB_LIB::TrunkResource::sortTgsByPriority | ( | AssignedTrunks & | groups | ) | [static] |
Ascending Sort assigned trunk groups by from date.
groups | List of assigned trunk groups to sort. |
Type OSB_LIB::TrunkResource::typeId | ( | ) | const [virtual] |
void OSB_LIB::TrunkResource::updData | ( | const OSB_DB::Session & | session | ) | [virtual] |
Update the resource in the database.
session | Database session to use. |
OsbException | from lock(). | |
OsbException | from incObjVs(). |
Implements OSB_LIB::Resource.
friend class OSB_DB::TrunkResourceGw [friend] |
std::string OSB_LIB::TrunkResource::des_ [private] |
Id<Network> OSB_LIB::TrunkResource::extNetworkId_ [private] |
const Type OSB_LIB::TrunkResource::typeId_ = rtTrunkResource [static, private] |