This object will keep a list of service class versions that go under this service class system version. Whenever a used service comes into rating, the service class versions under this object will be used to perform the match process.
Definition at line 393 of file serviceclass.h.
typedef Id2<ScsVersion> OSB_LIB::ScsVersion::Oid |
Unique id of service class system and version number of service class system configuration are kept in template Id2.
Definition at line 409 of file serviceclass.h.
typedef std::map<Id<RatedService>, ServiceClass::Oid> OSB_LIB::ScsVersion::RsScMap |
typedef std::set<ServiceClass::Oid> OSB_LIB::ScsVersion::ScOids |
Default constructor with optional object id.
OSB_LIB::ScsVersion::ScsVersion | ( | const ScSystem::Oid & | scsId | ) | [explicit] |
Constructor for a new SCS version.
void OSB_LIB::ScsVersion::addService | ( | const RatedService::Oid & | rsId, | |
const ServiceClass::Oid & | scId | |||
) |
Add a service to configuration.
rsId | Rated service to add. | |
scId | Service class of rsId. |
OsbException | for the following errors:
|
const RsScMap& OSB_LIB::ScsVersion::config | ( | ) | const |
Get configuration.
void OSB_LIB::ScsVersion::delService | ( | const Id< RatedService > & | service | ) |
Remove a service from configuration.
service | Rated service to remove. |
OsbException | for the following errors:
|
bool OSB_LIB::ScsVersion::freeze | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Set the status from editable to standby.
In order to set the status from editable to standby, the following criteria must be fulfilled:
session | Database session to use. | |
errors | Container for error messages if any. |
Implements OSB_LIB::ToCfgBase.
ServiceClass::Oid OSB_LIB::ScsVersion::getSc | ( | Cdr & | cdr, | |
UsedService & | us | |||
) | const |
Determine the service class of a used service.
This function determines the applicable service class with the help of a matching tree. This function may seems constant, but it will repopulate the matching tree if needed. This function is not thread safe either.
cdr | CDR of us. | |
us | Used service to evaluate, the function sets its rated service. |
bool OSB_LIB::ScsVersion::insert | ( | const OSB_DB::Session & | session | ) | [private] |
Insert a service class system version into database.
A new object is inserted. All attribute of the object has been set except object id. The object id will only be set by the function if the insertion is successful.
session | Database session. |
OsbException | for the following errors:
|
const Oid& OSB_LIB::ScsVersion::oid | ( | ) | const |
Return the object id of this object.
bool OSB_LIB::ScsVersion::read | ( | const OSB_DB::Session & | session | ) |
Read a service class system version from database.
The object id is used to gather other info from database and then populate the object's service tuple list.
session | Database session. |
void OSB_LIB::ScsVersion::refreshMatchingTree | ( | ) | [private] |
Refresh or reconstruct the matching tree.
bool OSB_LIB::ScsVersion::release | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Set the status from standby to release.
In order to set the status from standby to release, the following criteria must be fulfilled:
session | Database session to use. | |
errors | Container for error messages if any. |
Implements OSB_LIB::ToCfgBase.
bool OSB_LIB::ScsVersion::remove | ( | const OSB_DB::Session & | session | ) | [private] |
Remove a service class system version from database.
The function will ensure that the object is in status editable before proceeding. After the function call, oid of this object will be unset to indicate that there is no such entry anymore in the database.
session | Database session. |
OsbException | for the following errors:
|
bool OSB_LIB::ScsVersion::revoke | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Set the status from release to standby.
In order to set the status from release to standby, the following criteria must be fulfilled:
session | Database session to use. | |
errors | Container for error messages if any. |
Implements OSB_LIB::ToCfgBase.
ScSystem::Oid OSB_LIB::ScsVersion::scsId | ( | ) | const |
Return the service class system id.
void OSB_LIB::ScsVersion::supportedSc | ( | ScOids & | scOids | ) | const |
Retrieve all service classes supported.
scOids | Container for the object id of the service classes supported. |
bool OSB_LIB::ScsVersion::unfreeze | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Set the status from standby to editable.
In order to set the status from standby to editable, the following criteria must be fulfilled:
session | Database session to use. | |
errors | Container for error messages if any. |
Implements OSB_LIB::ToCfgBase.
bool OSB_LIB::ScsVersion::update | ( | const OSB_DB::Session & | session | ) | [private] |
Update a service class system version in the database.
Old entry in the database identify by the object id will be replaced with the new data from this object. This function is used internally by other member functions.
session | Database session. |
OsbException | for the following errors:
|
friend struct OSB_DB::ScsVersionGw [friend] |
The database gateway needs to populate data members after construction.
Definition at line 398 of file serviceclass.h.
friend class TariffCatalogue [friend] |
Tariff Catalogue is the only object that is allow to invoke the private functions of this class.
Definition at line 403 of file serviceclass.h.
RsScMap OSB_LIB::ScsVersion::config_ [private] |
MatchingTree OSB_LIB::ScsVersion::mTree_ [private] |
Oid OSB_LIB::ScsVersion::oid_ [private] |