OSB_LIB::ScsVersion Class Reference

Inheritance diagram for OSB_LIB::ScsVersion:

Inheritance graph
[legend]
Collaboration diagram for OSB_LIB::ScsVersion:

Collaboration graph
[legend]
List of all members.

Detailed Description

Service class system version is used to group service classes.

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.

Public Types

Public Member Functions

Read access to data member:
Configuration:

Private Member Functions

Modifying Database operations:
Status changes:

Private Attributes

Friends


Member Typedef Documentation

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

Configuration: map rated service to service class.

Definition at line 413 of file serviceclass.h.

typedef std::set<ServiceClass::Oid> OSB_LIB::ScsVersion::ScOids

List of used service classes.

Definition at line 411 of file serviceclass.h.


Constructor & Destructor Documentation

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

Default constructor with optional object id.

OSB_LIB::ScsVersion::ScsVersion ( const ScSystem::Oid scsId  )  [explicit]

Constructor for a new SCS version.


Member Function Documentation

void OSB_LIB::ScsVersion::addService ( const RatedService::Oid rsId,
const ServiceClass::Oid scId 
)

Add a service to configuration.

Parameters:
rsId Rated service to add.
scId Service class of rsId.
Exceptions:
OsbException for the following errors:
  • Object is not editable.
  • Rated service already configured.

const RsScMap& OSB_LIB::ScsVersion::config (  )  const

Get configuration.

void OSB_LIB::ScsVersion::delService ( const Id< RatedService > &  service  ) 

Remove a service from configuration.

Parameters:
service Rated service to remove.
Exceptions:
OsbException for the following errors:
  • Object is not editable.
  • Rated service to remove not found in configuration.

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:

Parameters:
session Database session to use.
errors Container for error messages if any.
Returns:
true if success else false.

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.

Parameters:
cdr CDR of us.
us Used service to evaluate, the function sets its rated service.
Returns:
The service class valid for us.
It is not set if the service class can not be determined.

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.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Duplicate name.

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.

Parameters:
session Database session.
Returns:
true if success else false.

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:

Parameters:
session Database session to use.
errors Container for error messages if any.
Returns:
true if success else false.

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.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object is not editable.
  • Object to be removed not found.

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:

Parameters:
session Database session to use.
errors Container for error messages if any.
Returns:
true if success else false.

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.

Parameters:
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:

Parameters:
session Database session to use.
errors Container for error messages if any.
Returns:
true if success else false.

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.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object does not exist.


Friends And Related Function Documentation

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.


Member Data Documentation

RsScMap OSB_LIB::ScsVersion::config_ [private]

List of service class version belong to this object.

Definition at line 626 of file serviceclass.h.

MatchingTree OSB_LIB::ScsVersion::mTree_ [private]

Matching tree used to determine the rated service.

Definition at line 628 of file serviceclass.h.

Oid OSB_LIB::ScsVersion::oid_ [private]

Database id of this object.

Definition at line 624 of file serviceclass.h.


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