OSB_LIB::TariffCatalogue Class Reference

Collaboration diagram for OSB_LIB::TariffCatalogue:

Collaboration graph
[legend]
List of all members.

Detailed Description

OSB_LIB::TariffCatalogue: manager of all tariff objects.

The tariff catalogue is the manager of all tariff objects which are divided into 5 groups:

The catalogue supports and controls the maintenance, i.e., creation, configuration and deletion of all tariff objects.

Definition at line 126 of file tariffcatalogue.h.

Special Date related functions:

Connection point related functions:

Service Class related functions:

Service Class System related functions:

Service Class System Version related functions:

Tariff Classification System Version related functions:

Tariff related functions:

Tariff Version related functions:

Service related functions:

Public Member Functions

Day Class related functions:
Tariff Period related functions:
Tariff Period System Version related functions:
Tariff Period System related functions:
CGI related functions:
E164 related functions:
Tariff Class related functions:
Tariff Zone related functions:
Tariff Classification System related functions:
Tariff Zone Configuration related functions:
Tariff System related functions:
Tariff System Version related functions:
Rating Function related functions:
Service Element related functions:

Private Member Functions

Prevent copying and assignment: not implemented.

Private Attributes

Tariff period objects
Tariff classification objects
Tariff system objects
Service class objects
Tariff objects
Service elements

Friends


Constructor & Destructor Documentation

OSB_LIB::TariffCatalogue::TariffCatalogue (  ) 

Default constructor.

OSB_LIB::TariffCatalogue::~TariffCatalogue (  ) 

Destructor: delete pointer members.

OSB_LIB::TariffCatalogue::TariffCatalogue ( const TariffCatalogue rhs  )  [private]


Member Function Documentation

bool OSB_LIB::TariffCatalogue::canRevokeTfVersion ( OSB_DB::Session session,
const TfVersion::Oid oid 
)

Check if a tariff version can be revoke.

Parameters:
session Database session.
oid Object if of the tariff version object to be revoked.
Returns:
Number of error messages generated.

Cgi* OSB_LIB::TariffCatalogue::cgi ( const Cgi::Oid oid  ) 

Get a CGI from the master list of CGIs.

Parameters:
oid Unique id of CGI.
Returns:
Pointer to a CGI in the list of CGIs.

const CgiMap& OSB_LIB::TariffCatalogue::cgiMap (  )  const

Read access to the CGI map.

If needed, the function rebuilds the map before returning a reference to the data member: In multithreaded applications the caller must hold a read lock to the map (see TcatLockManager::readLockCgiMap). The tariff catalogue itself uses the internal mutex (provided by the lock manager) to lock the map during the rebuild. This logic avoids deadlocks that would arise, if client was to hold a read lock while the tariff catalogue requests a write lock on the same mutex.

Attention:
Do not cut&paste rsp. copy the implementation of this member function unless you REALLY understand how the locking works and what you are doing!

const Cgis& OSB_LIB::TariffCatalogue::cgis (  )  const [inline]

Read access to the list of CGIs.

Definition at line 1337 of file tariffcatalogue.h.

References cgis_.

bool OSB_LIB::TariffCatalogue::cgiTzConfigEditable ( const Cgi::Oid oid  ) 

Check that all tariff zone configurations that consist of the connection point are in editable mode.

Cgi entries are not allowed to be modified if it is in a tariff zone configuration that is not in editable mode.

Parameters:
oid Unique Cgi id.
Returns:
true if all TzConfigs that consists the Cgi are editable.

bool OSB_LIB::TariffCatalogue::changeCpStatus ( OSB_DB::Session session,
const Id< ConnectionPt > &  cpId,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a connection point.

Parameters:
session Database session to use.
cpId Object id to the connection point to change.
reqStatus Requested status of the connection point.
errors Container for error messages.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeDcStatus ( OSB_DB::Session session,
const DayClass::Oid dcId,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a day class.

Parameters:
session Database session to use.
dcId Object id to the day class to change.
reqStatus Requested status of the day class.
errors Container for error messages.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeE164Status ( OSB_DB::Session session,
const E164::Oid e164Id,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a E.164 number.

Parameters:
session Database session to use.
e164Id Object id to the E164 to change.
reqStatus Requested status of the connection point.
errors Container for error messages.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeRfStatus ( OSB_DB::Session session,
const RatingFn::Oid rfId,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a rating function.

Parameters:
session Database session to use.
rfId Object id to the rating function to change.
reqStatus Requested status of the rating function.
errors Container for warnings and errors.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeRsStatus ( OSB_DB::Session session,
const RatedService::Oid rsId,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a rated service.

Parameters:
session Database session to use.
rsId Object id to the rated service to change.
reqStatus Requested status of the rated service.
errors Container for warnings and errors.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeScsVsStatus ( OSB_DB::Session session,
const ScsVersion::Oid scsVs,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a SCS version.

Parameters:
session Database session to use.
scsVs Object id to the SCS version to change.
reqStatus Requested status of the SCS version.
errors Container for warnings and errors.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeSdStatus ( OSB_DB::Session session,
SpecialDate sd,
CfgStatus  reqStatus,
OsbErrors errors,
bool  noWait 
) [private]

Change the configuration status of a special date.

Parameters:
session Database session to use.
sd Special date to change.
reqStatus Requested status of the special date.
errors Container for error messages.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeSdStatus ( OSB_DB::Session session,
const SpecialDate::Oid sdId,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a special date.

Parameters:
session Database session to use.
sdId Object id to the special date to change.
reqStatus Requested status of the special date.
errors Container for error messages.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeTcsVsStatus ( OSB_DB::Session session,
const TcsVersion::Oid tcsVsId,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a TcsVersion.

Parameters:
session Database session to use.
tcsVsId Object id to the TCS version to change.
reqStatus Requested status of the TCS version.
errors Container for warnings and errors.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeTfVsStatus ( OSB_DB::Session session,
const TfVersion::Oid tfVsId,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a tariff version.

Parameters:
session Database session to use.
tfVsId Object id to the tariff version to change.
reqStatus Requested status of the tariff version.
errors Container for warnings and errors.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeToCfgStatus ( OSB_DB::Session session,
ToCfgBase toCfg,
CfgStatus  reqStatus,
OsbErrors errors 
) [private]

Change configuration status of a tariff object version.

Parameters:
session Database session to use.
toCfg Tariff object to change.
reqStatus Requested status of the version.
errors Container for warnings and errors.
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeTpsVsStatus ( OSB_DB::Session session,
const TpsVersion::Oid tpsVsId,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a TPS version.

Parameters:
session Database session to use.
tpsVsId Object id to the TPS version to change.
reqStatus Requested status of the TPS version.
errors Container for warnings and errors.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeTsVsStatus ( OSB_DB::Session session,
const TsVersion::Oid tsVsId,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a tariff system version.

Parameters:
session Database session to use.
tsVsId Object id to the tariff version to change.
reqStatus Requested status of the tariff version.
errors Container for warnings and errors.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

bool OSB_LIB::TariffCatalogue::changeTzCfgStatus ( OSB_DB::Session session,
const TzConfig::Oid tzConfigId,
CfgStatus  reqStatus,
OsbErrors errors,
const bool  noWait 
)

Change the configuration status of a tariff zone configuration.

Parameters:
session Database session to use.
tzConfigId Object id to the tariff zone configuration to change.
reqStatus Requested status of the connection point.
errors Container for error messages.
noWait Wait if locked by another session?
Returns:
true if the requested status is set, else false.

size_t OSB_LIB::TariffCatalogue::checkCgi ( OSB_DB::Session session,
const Cgi::Oid oid,
OsbErrors errors,
const bool  noWait 
)

Change the object status from 'editable' to 'standby'.

Parameters:
session Database session.
oid Object id of the CGI that is to be checked.
errors Container for error messages.
noWait Wait if locked by another session?
Returns:
Number of error messages generated.

ConnectionPt* OSB_LIB::TariffCatalogue::connectionPt ( const Id< ConnectionPt > &  oid  )  [private]

Get a connection point from the master list of connection points.

Parameters:
oid Unique id of connection points.
Returns:
Pointer to a connection point in the list of connection points.

const CpMapperList& OSB_LIB::TariffCatalogue::cpMapperList (  )  const [inline]

Read access to info on connection point mapping classes.

Definition at line 1131 of file tariffcatalogue.h.

References cpMapperList_.

const CpTree& OSB_LIB::TariffCatalogue::cpTree (  )  const

Read access to connection point tree.

Cgi::Oid OSB_LIB::TariffCatalogue::creCgi ( OSB_DB::Session session,
const Id< ConnectionPt > &  cpId,
const std::string &  name,
const std::string &  val,
bool  noWait 
)

Create a new CGI in the database.

Name of CGI must not clash with existing CGIs. The session is only commited after a successful creation without any exception being thrown. The session will be rolled back to release the lock upon an OsbException. The list of Cgis will be sorted by name in ascending order after creation.

Parameters:
session Database session.
cpId Unique id of a connection point.
name Name of CGI to be created.
val Value of CGI to be created.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • name clash with any CGIs.
  • lock is already acquired by others.
Returns:
Unique id of newly created CGI.

Id<ConnectionPt> OSB_LIB::TariffCatalogue::creConnectionPt ( OSB_DB::Session session,
ConnectionPt cp,
bool  noWait 
)

Create a new connection point in the database.

Name of connection point must not clash with existing connection points. The session is only commited after a successful creation without any exception thrown. The session will be rolled back to release the lock upon an OsbException. The list of connection points will be sorted by name in ascending order after insertion.

Parameters:
session Database session.
cp Connection point to create.
noWait Wait if locked by another session?
Returns:
The object id of the connection point.
Exceptions:
OsbException if
  • name clashes with any connection points.
  • lock is already acquired by others.

DayClass::Oid OSB_LIB::TariffCatalogue::creDayClass ( OSB_DB::Session session,
DayClass dc,
bool  noWait 
)

Create Day Class.

This function will use the input name and description to create a new day class and get a new day class unique id from DB. A const pointer will point to the new created object. Then, those week days classfication will be done by changing object and calling updating founcation to modify database. The list of day classes will be sorted by name after insertion.

Parameters:
session Database session.
dc Day class to create.
noWait Wait if locked by another session?
Returns:
Unique id of new day class.
Exceptions:
OsbException When the given name is not unique, error message will be given, or those related tariff period systems tables are locked by someone else.

E164::Oid OSB_LIB::TariffCatalogue::creE164 ( OSB_DB::Session session,
E164 e164,
bool  noWait 
)

Create a new E164 in the database.

Name of the new E164 also must not be the same as any existing E164s. The session will only be commited after a successful creation without any OsbException being thrown. The session will be rolled back upon an OsbException. The list of E164s will be sorted by name in ascending order after creation.

Parameters:
session Database session to use.
e164 E164 to create. If the function is successful, its object id is set.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • Duplicate name.
  • lock is already acquired by others.
Returns:
Unique id of newly created E164.

RatedService::Oid OSB_LIB::TariffCatalogue::creRatedService ( OSB_DB::Session session,
RatedService service,
bool  noWait 
)

Create a new rated service.

Parameters:
session Database session.
service Rated service to create.
noWait Wait if locked by another session?
Returns:
The object id of the created service.

bool OSB_LIB::TariffCatalogue::creRatingFn ( OSB_DB::Session session,
RatingFn rf,
const bool  noWait 
)

Create a new rating function.

The list of rating functions will be sorted by name in ascending order after creation.

The function creates a new rating function if the configurations of the rating function cannot be found. Else it returns the rating function with the same cofigurations.

Parameters:
session Database session.
rf Reference to rating function to add.
noWait Wait if locked by another session?
Returns:
True if new rating function created, else return false if same configuration of a rating function is found.
Exceptions:
OsbException for the following errors:
  • Tariffs are currently being configured (lock has been aquired by others)
  • Duplicate name.

ScsVersion::Oid OSB_LIB::TariffCatalogue::creScsVersion ( OSB_DB::Session session,
ScsVersion scsVs,
bool  noWait 
)

Create a new service class system version.

The list of service class system version will sorted by released date in descending order after creation.

Parameters:
session Database session.
scsVs SCS version to create. If the function is successful its object id is set.
noWait Wait if locked by another session?
Returns:
The object id of the created SCS version.
Exceptions:
OsbException if service objects are currently locked and noWait is true.

ScSystem::Oid OSB_LIB::TariffCatalogue::creScSystem ( OSB_DB::Session session,
ScSystem scs,
const bool  noWait 
)

Create a new service class system.

The list of service class system will be sorted by name in ascending order after creation.

Parameters:
session Database session.
scs Service class system to create.
noWait Wait if locked by another session?
Returns:
Unique id of the newly created object.
Exceptions:
OsbException for the following errors:
  • Services are currently being configured (lock has been aquired by others)

ServiceClass::Oid OSB_LIB::TariffCatalogue::creServiceClass ( OSB_DB::Session session,
ServiceClass sc,
const bool  noWait 
)

Create a new service class.

The list of service classes will be sorted by name in ascending order after creation.

Parameters:
session Database session.
sc Service class to create.
noWait Wait if locked by another session?
Returns:
Unique id of the newly created object.
Exceptions:
OsbException for the following errors:
  • Services are currently being configured (lock has been aquired by others)

bool OSB_LIB::TariffCatalogue::creSpecialDate ( OSB_DB::Session session,
SpecialDate sd,
bool  noWait 
)

Create SpecialDate Class.

First, this function will match the given date with all previous defined ones, find out that whether the given day class id is already defined, and find whether the given name for this special date is unique, then the new record will be created. The list of special dates will be sorted by name upon successful insertion.

Parameters:
session Database session.
sd Special date to create.
noWait Wait if locked by another session?
Returns:
true in case of success, else false.
Exceptions:
OsbException When the given date is made conflict with previous designed records, error message will be given, or those related tariff period systems tables are locked by someone else..

Tariff::Oid OSB_LIB::TariffCatalogue::creTariff ( OSB_DB::Session session,
Tariff tf,
bool  noWait 
)

Create a new tariff.

The list of tariffs will be sorted by name in ascending order after creation.

Parameters:
session Database session.
tf Tariff to create.
noWait Wait if locked by another session?
Returns:
Unique id of the newly created tariff object.

TariffClass::Oid OSB_LIB::TariffCatalogue::creTariffClass ( OSB_DB::Session session,
TariffClass tc,
bool  noWait 
)

Create a new tariff class in the database.

Name of tariff class must not clash with existing tarif clases. The session will only be commited after a successful creation without any OsbException being thrown. The session will be rolled back to release the lock upon an OsbException. The list of tariff classes will be sorted by name in ascending order after creation.

Parameters:
session Database session.
tc Tariff class to create.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • name is the same as existing tariff classes.
  • lock is already acquired by others.
Returns:
Unique id of newly created tariff class.

TariffPeriod::Oid OSB_LIB::TariffCatalogue::creTariffPeriod ( OSB_DB::Session session,
TariffPeriod tp,
bool  noWait 
)

Create a new tariff period.

This fucniton will create a new tariff period with name and and description, for the id, it will created by database auto, based on the id available. And, before creating a new one, it has to search available tariff periods with name comparsion. The list of tariff period will be sorted by name in ascending order after insertion.

Parameters:
session Database session.
tp Tariff period to create.
noWait Wait if locked by another session?
Returns:
Unique id of newly created tariff period.
Exceptions:
OsbException When the input name is same with others, an error message will be thrown, or those tariff period systems related tables are locked by someone else.

TariffSystem::Oid OSB_LIB::TariffCatalogue::creTariffSystem ( OSB_DB::Session session,
TariffSystem ts,
bool  noWait 
)

Create a new tariff system in the database.

Name of tariff system must not clash with existing tariff systems. The session is only commited after a successful creation without any OsbException. The session will be rolled back upon an OsbException. The list of tariff systems will be sorted by name in ascending order after creation.

Parameters:
session Database session.
ts Tariff system to create.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • name clashes with any tariff systems.
  • lock is already acquired by others.
Returns:
Unique id of the newly created tariff system.

TariffZone::Oid OSB_LIB::TariffCatalogue::creTariffZone ( OSB_DB::Session session,
TariffZone tz,
bool  noWait 
)

Create a new tariff zone in the database.

Name of tariff zone must not clash with existing tarif zones. The session is only commited after a successful creation without any OsbException being thrown. The session will be rolled back to release the lock upon an OsbException. The list of tariff zones will be sorted by name in ascending order after creation.

Parameters:
session Database session to use.
tz The tariff zone to create. If the function is successful, its object id is set.
noWait Wait if locked by another session?
Returns:
The object id of the created tariff zone.
Exceptions:
OsbException if
  • name is the same as existing tariff zones.
  • lock is already acquired by others.

TcsVersion::Oid OSB_LIB::TariffCatalogue::creTcsVersion ( OSB_DB::Session session,
TcsVersion tcsVs,
const bool  noWait 
)

Create a new tariff classification system version.

The list of tariff classification system will be sorted by name in ascending order after creation.

Parameters:
session Database session to use.
tcsVs TCS version to create.
noWait Wait if locked by another session?
Returns:
Object id of the newly created TCS version.
Exceptions:
OsbException for the following error:
  • Tariff classification systems are currently being configured.
  • Duplicate name.

TcSystem::Oid OSB_LIB::TariffCatalogue::creTcSystem ( OSB_DB::Session session,
TcSystem tcs,
bool  noWait 
)

Create a new tariff classification system in database.

Name of tariff classification system must not clash with existing tariff classification systems. The session is only commited after a successful creation without any OsbException. The session will be rolled back to release the lock upon an OsbException. The list of tariff classification system will be sorted by name in ascending order after creation.

Parameters:
session Database session.
tcs Tariff classification system to create.
noWait Wait if locked by another session?
Returns:
The object id of the created TCS.
Exceptions:
OsbException if
  • Duplicate name.
  • Lock is already acquired by others.

TfVersion::Oid OSB_LIB::TariffCatalogue::creTfVersion ( OSB_DB::Session session,
TfVersion tfVs,
const bool  noWait 
)

Create a new tariff version object.

The list of tariff versions will be sorted by released date in descending order after creation.

Parameters:
session Database session.
tfVs Tariff version to create. If the function is successful, its object id is set.
noWait Wait if locked by another session?
Returns:
The object id of new tariff version.
Exceptions:
OsbException for the following errors:
  • Tariffs are currently being configured (lock has been aquired by others)

TpsVersion::Oid OSB_LIB::TariffCatalogue::creTpsVersion ( OSB_DB::Session session,
TpsVersion tpsVs,
bool  noWait 
)

Add a new version to the tariff period system.

This function will create a new tariff period system version, in gateway it will automatically get a newest version and a default revision as 1, the default value of status for a new version is "editable" and release_date can be null. The list of tariff period system versions will be sorted by released date in descending order after insertion.

Parameters:
session Database session to use.
tpsVs TPS version to create. If the function is successful its object id is set.
noWait Wait if locked by another session?
Returns:
The object id of the TPS version.
Exceptions:
OsbException if tariff period objects are currently locked and noWait is true.

TpSystem::Oid OSB_LIB::TariffCatalogue::creTpSystem ( OSB_DB::Session session,
TpSystem tps,
bool  noWait 
)

Create a new tariff period system.

This fucniton will create a new tariff period system with name and and description, for the id, it will created by database auto, based on the ids available. And, before creating a new one, it has to search available tariff period systems with name comparsion. The list of tariff period systems will be sorted by name in ascending order after insertion.

Parameters:
session Database session.
tps Tariff period system to create.
noWait Wait if locked by another session?
Returns:
Unique id of new tariff period system.
Exceptions:
OsbException When the input name is same with others, an error message will be thrown, or those tariff period systems related tables are locked by someone else.

TsVersion::Oid OSB_LIB::TariffCatalogue::creTsVersion ( OSB_DB::Session session,
TsVersion tsVs,
bool  noWait 
)

Create a new tariff system version in the database.

This function adds the new version into the master list and database after all configurations for the tariff system have been done. The session is only commited after a successful creation without any OsbException. The session will be rolled back to release the lock upon an OsbException. The function supports copy creation from existing tariff system versions. If no tariff system version id is supplied, a new tariff system version with emtpy configurations will be created. The list of tariff system version will be sorted by released date in descending order after creation.

Parameters:
session Database session.
tsVs Tariff system version to create.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • lock is already acquired by others.
Returns:
Id of Tariff system version. Consist of tariff system id and the version number.

bool OSB_LIB::TariffCatalogue::creTzConfig ( OSB_DB::Session session,
TzConfig tzCfg,
bool  noWait 
)

Create a new tariff zone configuration in the database.

The configuration of an origin-destination pair of a tariff zone must be unique. Also check that for a tariff zone, the valid period of different configurations cannot overlap. The list of tariff zone configuration will be sorted by start date after creation.

Parameters:
session Database session to use.
tzCfg The tariff zone configuration to create.
noWait Wait if locked by another session?
Exceptions:
OsbException if the pair origin - destination is already configured for the tariff zone.
Returns:
true if successful, else false.

DayClass* OSB_LIB::TariffCatalogue::dayClass ( const DayClass::Oid oid  ) 

Get a day class from the master list of dayClasses.

Parameters:
oid The day class object id.
Returns:
Pointer to a day class in the list of dayClasses.

const DayClasses& OSB_LIB::TariffCatalogue::dayClasses (  )  const [inline]

Read access to the list of day classes.

Definition at line 574 of file tariffcatalogue.h.

References dayClasses_.

void OSB_LIB::TariffCatalogue::delCgi ( OSB_DB::Session session,
Cgi::Oid oid,
bool  noWait 
)

Delete an CGI from the database and the master list.

The CGI to be deleted must not be used in the tariff zone configuration. The session is commited after a successful deletion without any exception being thrown. The session will be rolled back to release the lock upon an OsbException.

Parameters:
session Database session.
oid Unique id of an CGI object.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • CGI is used in any configuration.
  • CGI does not exist.
  • lock is already acquired by others.

void OSB_LIB::TariffCatalogue::delConnectionPt ( OSB_DB::Session session,
Id< ConnectionPt > &  oid,
bool  noWait 
)

Delete a connection point from the database and the master list.

The connection point to be deleted must not be used in any CGI or E.164. The session is commited after a successful deletion without any exception thrown. The session will be rolled back to release the lock upon an OsbException.

Parameters:
session Database session.
oid Unique id of a connection point object.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • connection point is used in any CGI or E.164.
  • lock is already acquired by others.
  • connection point does not exist.

void OSB_LIB::TariffCatalogue::delDayClass ( OSB_DB::Session session,
DayClass::Oid oid,
bool  noWait 
)

Delete Day Class.

This function will match the id with previous defined ones, then delete all the info about that, due to the day class id in SpecialDate is foreign key to id in day class, so the related records in special dates will also need to be remove.

Parameters:
session Database session.
oid DayClass object id.
noWait Wait if locked by another session?
Exceptions:
OsbException When the key was not matched with any records, then an error maeeage will be given, or those related tariff period systems tables are locked by someone else.

void OSB_LIB::TariffCatalogue::delE164 ( OSB_DB::Session session,
E164::Oid oid,
bool  noWait 
)

Delete an E164 from the database and the master list.

The E164 to be deleted must not be used in the tariff zone configuration. The session will only be commited after a successful deletion without any exception being thrown. The session will be rolled back to release the lock upon an OsbException.

Parameters:
session Database session to access data.
oid Unique id of a E164 object.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • E164 is used in any configuration.
  • E164 does not exist.
  • lock is already acquired by others.

void OSB_LIB::TariffCatalogue::delRatedService ( OSB_DB::Session session,
const RatedService::Oid rsId,
bool  noWait 
)

void OSB_LIB::TariffCatalogue::delRatingFn ( OSB_DB::Session session,
const RatingFn::Oid oid,
const bool  noWait 
)

Delete a rating function object.

This function will delete a rating function object from the system.

Parameters:
session Database session.
oid Object id of the rating function to be deleted.
noWait Wait if locked by another session?
Exceptions:
OsbException for the following errors:
  • Tariffs are currently being configured (lock has been aquired by others)
  • Object does not exist.

void OSB_LIB::TariffCatalogue::delScsVersion ( OSB_DB::Session session,
const ScsVersion::Oid oid,
const bool  noWait 
)

Delete a service class system version.

This function will delete a service class system version from the system.

Parameters:
session Database session.
oid Object id of the service class system version to be deleted.
noWait Wait if locked by another session?
Exceptions:
OsbException for the following errors:
  • Services are currently being configured
    (lock has been aquired by others)

void OSB_LIB::TariffCatalogue::delScSystem ( OSB_DB::Session session,
const ScSystem::Oid oid,
const bool  noWait 
)

Delete a service class system.

This function will delete a service class system from the system.

Parameters:
session Database session.
oid Object id of the service class system to be deleted.
noWait Wait if locked by another session?
Exceptions:
OsbException for the following errors:
  • Services are currently being configured
    (lock has been aquired by others)

void OSB_LIB::TariffCatalogue::delServiceClass ( OSB_DB::Session session,
const ServiceClass::Oid oid,
const bool  noWait 
)

Delete a service class.

This function will delete a service class from the system.

Parameters:
session Database session.
oid Id of the object to be deleted.
noWait Wait if locked by another session?
Exceptions:
OsbException for the following errors:
  • Services are currently being configured (lock has been aquired by others)

void OSB_LIB::TariffCatalogue::delSpecialDate ( OSB_DB::Session session,
const SpecialDate::Oid sdId,
bool  noWait 
)

Delete SpecialDate Class.

This function will match the given date with previous defined ones, then delete related info about that, but we need to think about the issues below:

Parameters:
session Database session.
sdId Object id of the special date to delete.
noWait Wait if locked by another session?
Exceptions:
OsbException 
  • object not found
  • locking failed
  • special date not up-to-date
  • special date not editable

void OSB_LIB::TariffCatalogue::delTariff ( OSB_DB::Session session,
const Tariff::Oid oid,
const bool  noWait 
)

Delete a tariff object.

This function will delete a tariff object from the system.

Parameters:
session Database session.
oid Object id of the tariff object to be deleted.
noWait Wait if locked by another session?

void OSB_LIB::TariffCatalogue::delTariffClass ( OSB_DB::Session session,
TariffClass::Oid oid,
bool  noWait 
)

Delete a tariff class from the database and the master list.

The session will only be commited after a successful deletion without any OsbException being thrown. The session will be rolled back to release the lock upon an OsbException.

Parameters:
session Database session.
oid Unique id of tariff class to be deleted.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • tariff class is used in any zone configuration and version configuration.
  • lock is already acquired by others.
  • tariff class does not exist.

void OSB_LIB::TariffCatalogue::delTariffPeriod ( OSB_DB::Session session,
const TariffPeriod::Oid oid,
bool  noWait 
)

Delete a tariff period.

This function will delete the tariff period for a given id, before doing this we have to make sure the version attributes and configuratons are also no need for further actions, becuase after doing this, those related info in TpVersion will also be removed from database.

Parameters:
session Database session.
oid The object id of tariff period.
noWait Wait if locked by another session?
Exceptions:
OsbException When encounter the case that the versions info is still need to be used, a exception will be thrown, or those tariff period systems related tables are locked by someone else.

void OSB_LIB::TariffCatalogue::delTariffSystem ( OSB_DB::Session session,
TariffSystem::Oid oid,
bool  noWait 
)

Delete a Tariff system from the database and the master list.

The Tariff system to be deleted must not have any version configurations. The session is only commited after a successful delete without any OsbException. The session will be rolled back to release the lock upon an OsbException.

Parameters:
session Database session.
oid Unique id of an tariff system object.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • Tariff system version exist (i.e. Configurations exist in tariff system).
  • lock is already acquired by others.
  • tariff system does not exist.

void OSB_LIB::TariffCatalogue::delTariffZone ( OSB_DB::Session session,
TariffZone::Oid oid,
bool  force,
bool  noWait 
)

Delete a tariff zone from the database and the master list.

The tariff zone to be deleted must not be used by any tariff zone configuration.
The session will only be commited upon a successful deletion without any OsbException being thrown. The session will be rolled back to release the lock upon an OsbException.

Parameters:
session Database session.
oid Unique id of tariff zone to be deleted.
force Flag to indicate the removal of tarff zone configuration by force (without any configuration exist error message). Set to true if removal by force is desired else set to false.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • tariff zone is used in a tariff zone configuration.
  • tariff zone not found.
  • lock is already acquired by others.

void OSB_LIB::TariffCatalogue::delTcsVersion ( OSB_DB::Session session,
const TcsVersion::Oid oid,
const bool  noWait 
)

Delete a Tariff classification system version object from the system.

Parameters:
session Database session.
oid Object id of the TCS version to be deleted.
noWait Wait if locked by another session?
Exceptions:
OsbException for the following errors:
  • Tariff classification systems are currently being configured.
  • Object does not exist.

void OSB_LIB::TariffCatalogue::delTcSystem ( OSB_DB::Session session,
TcSystem::Oid oid,
bool  noWait 
)

Delete a tariff classification system from database and the master list.

This function will ensure the to-be-deleted object is not being used before proceeding. The session is only commited after a successful delete without any OsbException. The session will be rolled back upon an OsbException.

Parameters:
session Database session.
oid Unique id of tariff classification system to be deleted.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • Tariff classification system is used.
  • Tariff classification system is not found.
  • Lock is already acquired by others.

void OSB_LIB::TariffCatalogue::delTfVersion ( OSB_DB::Session session,
const TfVersion::Oid oid,
bool  noWait 
)

Delete a tariff version.

This function will delete a tariff version object from the system.

Parameters:
session Database session.
oid Object id of the tariff version to be deleted.
noWait Wait if locked by another session?
Exceptions:
OsbException for the following errors:
  • Tariffs are currently being configured (lock has been aquired by others)

void OSB_LIB::TariffCatalogue::delTpsVersion ( OSB_DB::Session session,
const TpsVersion::Oid oid,
bool  noWait 
)

Delete a version of tariff period system.

In this function, it can delete the tariff period system version with same object id and the value of status set as "editable", or OsbException will be thrown.

Parameters:
session Database session.
oid The object id of tariff period system version.
noWait Wait if locked by another session?
Exceptions:
OsbException If the oid can not match any defined tariff period system version ids, or those tariff period systems related tables are locked by someone else.

void OSB_LIB::TariffCatalogue::delTpSystem ( OSB_DB::Session session,
const TpSystem::Oid oid,
bool  noWait 
)

Delete a tariff period system.

This function will delete the tariff period system for a given id, but before doing this we have to make sure the version attributes and configuratons are also no need for further actions, becuase after doing this, those related info in TpsVersion will also be removed from database.

Parameters:
session Database session.
oid The object id of tariff period system.
noWait Wait if locked by another session?
Exceptions:
OsbException When encounter the case that the versions info is still need to be used, a exception will be thrown, or those tariff period systems related tables are locked by someone else.

void OSB_LIB::TariffCatalogue::delTsVersion ( OSB_DB::Session session,
const TsVersion::Oid  oid,
bool  noWait 
)

Delete a tariff system version from the database and the master list.

The tariff system version configuration can only be deleted if it is in editable mode. The session is only committed after a successful delete without any OsbException. The session will be rolled back upon an OsbException.

Parameters:
session Database session.
oid Unique id of tariff system version to be deleted.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • status of version is not in editable mode.
  • lock is already acquired by others.
  • tariff system version does not exist.

void OSB_LIB::TariffCatalogue::delTzConfig ( OSB_DB::Session session,
const TzConfig::Oid oid,
bool  noWait 
)

Delete a tariff zone configuration from the database and the master list.

The configuration can only be deleted if the status is in editable mode.
The session is only commited after a successful delete without any OsbException. The session will be rolled back upon an OsbException.

Parameters:
session Database session.
oid Object id of tariff zone configuration to be deleted. Consist of tariff zone id and a pair of connection points id.
noWait Wait if locked by another session?
Exceptions:
OsbException if
  • status of configuration does not allow removal of the configuration.
  • lock is already acquired by others.
  • tariff zone configuration not found.

E164* OSB_LIB::TariffCatalogue::e164 ( const E164::Oid oid  ) 

Get a E164 from the E164 master list.

Parameters:
oid Unique id of E164.
Returns:
Pointer to a E164 in the master list.

const E164Map& OSB_LIB::TariffCatalogue::e164Map (  )  const

Read access to the E.164 map.

If needed, the function rebuilds the map before returning a reference to the data member: In multithreaded applications the caller must hold a read lock to the map (see TcatLockManager::readLockE164Map). The tariff catalogue itself uses the internal mutex (provided by the lock manager) to lock the map during the rebuild. This logic avoids deadlocks that would arise, if client was to hold a read lock while the tariff catalogue requests a write lock on the same mutex.

Attention:
Do not cut&paste rsp. copy the implementation of this member function unless you REALLY understand how the locking works and what you are doing!

const E164s& OSB_LIB::TariffCatalogue::e164s (  )  const [inline]

Read access to the list of E164s.

Definition at line 1501 of file tariffcatalogue.h.

References e164s_.

bool OSB_LIB::TariffCatalogue::e164TzConfigEditable ( const E164::Oid oid  ) 

Check that all tariff zone configurations that consist of the E.164 are in editable mode.

E.164 entries are not allowed to be modified if it is in a tariff zone configuration that is not in editable mode.

Parameters:
oid Unique E.164 id.
Returns:
true if all TzConfigs that consists the E.164 are editable.

const Cgi* OSB_LIB::TariffCatalogue::findCgi ( const Cgi::Oid oid  )  const

Find a CGI.

This function is different from getCgi in that it does not throw an exception if no such CGI is found.

Parameters:
oid Unique id of CGI.
Returns:
Pointer to a Cgi.

const ConnectionPt* OSB_LIB::TariffCatalogue::findConnectionPt ( const Id< ConnectionPt > &  oid  )  const

Find a connection point.

This function is different from getConnectionPt in that it does not throw an exception if no such connection point is found.

Parameters:
oid Unique id of connection point.
Returns:
Pointer to a connection point.

const DayClass* OSB_LIB::TariffCatalogue::findDayClass ( const DayClass::Oid dcId  )  const

Getting info related to the given object id.

This function will be used to determine whether the given object id can match any available id define.

Parameters:
dcId Day class object id.
Returns:
A pointer point to the record matched to the oid.

const E164* OSB_LIB::TariffCatalogue::findE164 ( const E164::Oid oid  )  const

Find a E164.

This function is different from getE164 in that it does not throw an exception if no such E164 is found.

Parameters:
oid Unique id of E164.
Returns:
Pointer to a E164

RatedService::Oid OSB_LIB::TariffCatalogue::findRatedService ( const ServiceTuple st  )  const

Find an identical service tuple from the master list.

This function searches the rateable services for an identical service tuple (containing the same service elements).

Parameters:
st Service tuple to be searched.
Returns:
Object id of the first matching rated service. If is not set if no rated service containes st.

const RatedService* OSB_LIB::TariffCatalogue::findRatedService ( const RatedService::Oid oid  )  const

Find a rated service.

Parameters:
oid Object id of the rated service.
Returns:
Pointer to the rated service in the master list, 0 if not found.

const RatingFn* OSB_LIB::TariffCatalogue::findRatingFn ( const RatingFn::Oid oid  )  const

Find a rating function with a given oid.

Parameters:
oid Unique rating function id.
Returns:
A pointer to the rating function object in the master list, return 0 if not found.

const TcsVersion* OSB_LIB::TariffCatalogue::findReleasedTcsVersion ( const TcSystem::Oid tcsId,
const DateTime ts 
) const

Get TCS version released at a specific date and time.

Parameters:
tcsId Id of the TCS to search.
ts Timestamp to search for.
Returns:
A pointer to the TCS version that was released at time `ts'. It is 0 if no released version for `ts' exists.

const ScsVersion* OSB_LIB::TariffCatalogue::findScsVersion ( const ScsVersion::Oid oid  )  const

Find the details of a service class system version with a given oid.

Parameters:
oid Unique object id.
Returns:
A pointer to the service class system version found in the master list, return 0 if not found.

const ScSystem* OSB_LIB::TariffCatalogue::findScSystem ( const ScSystem::Oid oid  )  const

Find a service class system with a given oid.

Parameters:
oid Unique object id.
Returns:
A pointer to the object in the master list, return 0 if not found.

const ServiceClass* OSB_LIB::TariffCatalogue::findServiceClass ( const ServiceClass::Oid oid  )  const

Find a service class with a given oid.

Parameters:
oid Unique object id.
Returns:
A pointer to the object in the master list, return 0 if not found.

const ServiceElement* OSB_LIB::TariffCatalogue::findServiceElement ( const ServiceElement se  )  const

Find a service element by its type and code.

Parameters:
se Service element to find.
Returns:
A pointer to the service element in seTree_, 0 if not found.

const ServiceElement* OSB_LIB::TariffCatalogue::findServiceElement ( const ServiceElement::Oid seId  )  const

Find a service element with a given oid.

Parameters:
seId Unique object id.
Returns:
A pointer to the service element in seTree_, 0 if not found.

const SpecialDate* OSB_LIB::TariffCatalogue::findSpecialDate ( const SpecialDate::Oid sdId  )  const

Determine day class id for a given date.

Parameters:
sdId Object id of the special date to find.
Returns:
A pointer to that special date satisfied the matching.

const Tariff* OSB_LIB::TariffCatalogue::findTariff ( const Tariff::Oid oid  )  const

Find a tariff with a given oid.

Parameters:
oid Unique tariff id.
Returns:
A pointer to the tariff in the master list, return 0 if not found.

const TariffClass* OSB_LIB::TariffCatalogue::findTariffClass ( const TariffClass::Oid oid  )  const

Find a tariff class.

This function is different from getTariffClass in that it does not throw an OsbException if tariff class is not found.

Parameters:
oid Unique id of tariff class.
Returns:
Pointer to tariff class.

const TariffPeriod* OSB_LIB::TariffCatalogue::findTariffPeriod ( const TariffPeriod::Oid oid  )  const

Getting info related to the given object id.

This function will be used to determine whether the given object id can match any available id define.

Parameters:
oid TariffPeriod object id.
Returns:
A pointer point to the record matched to the oid.

const TariffSystem* OSB_LIB::TariffCatalogue::findTariffSystem ( const TariffSystem::Oid oid  )  const

Find a tariff system.

This function is different from getTariffSystem in that it does not throw an exception if no such TariffSystem is found.

Parameters:
oid Unique id of tariff system.
Returns:
Pointer to an tariff system.

const TariffZone* OSB_LIB::TariffCatalogue::findTariffZone ( const TariffZone::Oid oid  )  const

Find a tariff zone.

This function is different from getTariffZone in that it does not throw an OsbException if tariff zone is not found.

Parameters:
oid Unique id of tariff zone.
Returns:
Pointer to tariff zone.

const TcsVersion* OSB_LIB::TariffCatalogue::findTcsVersion ( const TcsVersion::Oid oid  )  const

Find a tariff classification system version.

Parameters:
oid Object id of the TCS version.
Returns:
A pointer to the TCS version in the master list, return 0 if not found.

const TcSystem* OSB_LIB::TariffCatalogue::findTcSystem ( const TcSystem::Oid oid  )  const

Find a tariff classification system.

This function is different from getTcSystem in that it does not throw an OsbException if tariff classification system is not found.

Parameters:
oid Unique id of tariff classification system.
Returns:
Pointer to tariff classification system.

const TfVersion* OSB_LIB::TariffCatalogue::findTfVersion ( const TfVersion::Oid oid  )  const

Find a tariff version with a given oid.

Parameters:
oid Unique tariff version id.
Returns:
A pointer to the tariff version object in the master list, return 0 if not found.

const TpsVersion* OSB_LIB::TariffCatalogue::findTpsVersion ( const TpsVersion::Oid oid  )  const

Getting info about TpsVersion related to the object id.

Parameters:
oid Tariff period system version object id.
Returns:
A pointer to the version that matches `Oid' or a NULL pointer.

const TpSystem* OSB_LIB::TariffCatalogue::findTpSystem ( const TpSystem::Oid oid  )  const

Getting info related to the given object id.

This function will be used to determine whether the given object id can match any available id define.

Parameters:
oid TpSystem object id.
Returns:
A pointer point to the record matched to the oid.

const TsVersion* OSB_LIB::TariffCatalogue::findTsVersion ( const TsVersion::Oid oid  )  const

Find version of a tariff system.

This function is different from getTsVersion in that it does not throw an OsbException if a tariff system version is not found.

Parameters:
oid Unique id of TariffSystem and version number.
Returns:
Pointer to tariff system version.

const TzConfig* OSB_LIB::TariffCatalogue::findTzConfig ( const TzConfig::Oid oid  )  const

Find configuration of a tariff zone.

This function is different from getTzConfig in that it does not throw an OsbException if a tariff zone configuration is not found.

Parameters:
oid Unique id of tariff zone configuration.
Returns:
Pointer to tariff zone configuration.

const Cgi& OSB_LIB::TariffCatalogue::getCgi ( const Cgi::Oid oid  )  const

Get a CGI.

Parameters:
oid Unique id of CGI.
Exceptions:
OsbException if CGI is not found.
Returns:
Reference to Cgi if found.

const ConnectionPt& OSB_LIB::TariffCatalogue::getConnectionPt ( const Id< ConnectionPt > &  oid  )  const

Get a connection point.

Parameters:
oid Unique id of connection point.
Exceptions:
OsbException if connection point is not found.
Returns:
Reference to connection point if found.

const DayClass* OSB_LIB::TariffCatalogue::getDayClass ( const DayClass::Oid oid,
const Weekday weekday 
) const

Match the given week day and day class id within day class.

This function can match a given week day and a given day class id with records in day class, and return the pointer to that record.

Parameters:
oid The given day class id.
weekday The given week day for matching.
Returns:
A pointer to the day class satisfy the matching.

const DayClass& OSB_LIB::TariffCatalogue::getDayClass ( const DayClass::Oid oid  )  const

Get a day class with the object id.

Parameters:
oid The given day class id.
Returns:
Day class found.
Exceptions:
OsbException if no day class with the given object id exists.

const E164& OSB_LIB::TariffCatalogue::getE164 ( const E164::Oid oid  )  const

Get a E164.

Parameters:
oid Unique id of E164.
Exceptions:
OsbException if no such E164 is found.
Returns:
Reference to E164.

const RatedService& OSB_LIB::TariffCatalogue::getRatedService ( const RatedService::Oid oid  )  const

Find a rated service.

Parameters:
oid Object id of the rated service.
Returns:
Reference to the rated service in the master list.
Exceptions:
OsbException if the rated service can not be found.

const RatingFn& OSB_LIB::TariffCatalogue::getRatingFn ( const RatingFn::Oid oid  )  const

Get a rating function object with a given oid.

Parameters:
oid Unique rating function id.
Returns:
A reference to the rating function object in the master list.
Exceptions:
OsbException for the following errors:
  • Object does not exist.

const ScsVersion& OSB_LIB::TariffCatalogue::getReleasedScsVersion ( const ScSystem::Oid oid,
const DateTime startDateTime 
) const

Get the service class system version object which is in status released at the given time.

This function will retrieve the latest service class system version object that is in status released at the given time. On the other hand, the retrieved object is the one that rates a call at the given time.

Parameters:
oid Object id of the service class system where the service class system version is to be retrieved.
startDateTime The time that the service class system version is in released state.
Returns:
The service class system version object that fulfilled the requirement.
Exceptions:
OsbException for the following errors:
  • Object does not exist.

const TcsVersion& OSB_LIB::TariffCatalogue::getReleasedTcsVersion ( const TcSystem::Oid tcsId,
const DateTime ts 
) const

Get released TCS version at a specific date and time.

Parameters:
tcsId Object id of te TCS to search.
ts Timestamp to search for.
Returns:
Reference of the TCS version found.
Exceptions:
OsbException if TCS version not found.

const TfVersion& OSB_LIB::TariffCatalogue::getReleasedTfVersion ( const Tariff::Oid tf,
const DateTime ts 
) const

Get a tariff version by time stamp.

Parameters:
tf Object id of the tariff.
ts Time stamp for which to search.
Returns:
A reference to the tariff version object in the master list.
Exceptions:
OsbException if no release version of tf exists at ts.

const TpsVersion& OSB_LIB::TariffCatalogue::getReleasedTpsVersion ( const TpSystem::Oid tpsOid,
const DateTime startDateTime 
) const

Get the released tariff period system version based on the timestamp passed in.

Parameters:
tpsOid the object id of tariff period system which the version of it will be retrieved.
startDateTime the time when the tariff period system is in released status.
Returns:
the tariff period system version object that fulfilled the requirement.
Exceptions:
OsbException if no released version found.

const TsVersion& OSB_LIB::TariffCatalogue::getReleasedTsVersion ( const TariffSystem::Oid tsId,
const DateTime startDt 
) const

Get released TS version at a given time.

Return the tariff system version that is in released state at a given time.

Parameters:
tsId The tariff system to search.
startDt Timestamp to search.
Returns:
The TS version that is released at startDt.

const ScsVersion& OSB_LIB::TariffCatalogue::getScsVersion ( const ScsVersion::Oid oid  )  const

Get a service class system version with a given oid.

Parameters:
oid Unique object id.
Returns:
A reference to the service class system version in the master list.
Exceptions:
OsbException for the following errors:
  • Object does not exist.

const ScSystem& OSB_LIB::TariffCatalogue::getScSystem ( const ScSystem::Oid oid  )  const

Get a service class system with a given oid.

Parameters:
oid Unique object id.
Returns:
A reference to the object in the master list.
Exceptions:
OsbException for the following errors:
  • Object does not exist.

const ServiceClass& OSB_LIB::TariffCatalogue::getServiceClass ( const ServiceClass::Oid oid  )  const

Get a service class with a given oid.

Parameters:
oid Unique object id.
Returns:
A reference to the object in the master list.
Exceptions:
OsbException for the following errors:
  • Object does not exist.

const ServiceElement& OSB_LIB::TariffCatalogue::getServiceElement ( const ServiceElement::Oid seId  )  const

Get a service element with a given oid.

Parameters:
seId Unique object id.
Returns:
A reference to the service element in seTree_.
Exceptions:
ObjectNotFound if no service element for seId exists.

const SpecialDate& OSB_LIB::TariffCatalogue::getSpecialDate ( const SpecialDate::Oid sdId  )  const

Getting info related to the given date.

Parameters:
sdId Object id of the special date to find.
Returns:
Reference to the related records.
Exceptions:
OsbException 
  • special date not found.

const Tariff& OSB_LIB::TariffCatalogue::getTariff ( const Tariff::Oid oid  )  const

Get a tariff object with a given oid.

Parameters:
oid Unique tariff id.
Returns:
A reference to the tariff in the master list.

const TariffClass& OSB_LIB::TariffCatalogue::getTariffClass ( const TariffClass::Oid oid  )  const

Get a tariff class.

Parameters:
oid Unique id of tariff class.
Returns:
Reference to a tariff class object.
Exceptions:
OsbException if tariff class is not found.

const TariffPeriod::Oid& OSB_LIB::TariffCatalogue::getTariffPeriod ( const DayClass::Oid dcId,
const Time time 
)

Determine the tariff period for a given day class id and time.

This fucniton is for rating, which is main function to determine the tariff period based on a day class id from search in special dates and day class, and do further searching in switchtime to determine the tariff period in used.

Parameters:
dcId Day class id.
time A given time for purpose of search in switchtimes.

const TariffPeriod& OSB_LIB::TariffCatalogue::getTariffPeriod ( const TariffPeriod::Oid oid  )  const

Getting info related to the given object id.

Parameters:
oid The given id for collecting info from Tariff Period.
Returns:
Reference to the related records.
Exceptions:
OsbException If the tariff period for the oid does not exists

const TariffSystem& OSB_LIB::TariffCatalogue::getTariffSystem ( const TariffSystem::Oid oid  )  const

Get an tariff system.

Parameters:
oid Unique id of tariff system.
Exceptions:
OsbException if tariff system is not found.
Returns:
Reference to tariff system if found.

const TariffZone& OSB_LIB::TariffCatalogue::getTariffZone ( const TariffZone::Oid oid  )  const

Get a tariff zone.

Parameters:
oid Unique id of tariff zone.
Returns:
Reference to a tariff zone object.
Exceptions:
OsbException if tariff zone is not found.

const TcsVersion& OSB_LIB::TariffCatalogue::getTcsVersion ( const TcsVersion::Oid oid  )  const

Get a tariff classification system version.

Parameters:
oid Object id of the TCS version.
Returns:
Reference to the TCS version object in the master list.
Exceptions:
OsbException for the following errors:
  • Object does not exist.

const TcSystem& OSB_LIB::TariffCatalogue::getTcSystem ( const TcSystem::Oid oid  )  const

Get a tariff classification system.

Parameters:
oid Unique id of tariff classification system.
Returns:
Reference to a tariff classification system object.
Exceptions:
OsbException if tariff classification system is not found.

const TfVersion& OSB_LIB::TariffCatalogue::getTfVersion ( const TfVersion::Oid oid  )  const

Get a tariff version object with a given oid.

Parameters:
oid Unique tariff version id.
Returns:
A reference to the tariff version object in the master list.
Exceptions:
OsbException for the following errors:
  • Object does not exist.

const TpsVersion& OSB_LIB::TariffCatalogue::getTpsVersion ( const TpsVersion::Oid oid  ) 

Getting the TpsVersion related to the object id.

Parameters:
oid Tariff period system version object id.
Exceptions:
OsbException If `oid' does not match any `oid'.

const TpSystem& OSB_LIB::TariffCatalogue::getTpSystem ( const TpSystem::Oid oid  )  const

Getting info related to the given object id.

Parameters:
oid The given id for collecting info from tariff period system.
Returns:
Reference to the related records.
Exceptions:
OsbException When the tariff period system for the oid already exists

const TsVersion& OSB_LIB::TariffCatalogue::getTsVersion ( const TsVersion::Oid oid  )  const

Get version of a tariff system by id.

Parameters:
oid Unique id of TariffSystem and version number.
Returns:
Reference to a tariff system version object.
Exceptions:
OsbException if tariff system version is not found.

const TzConfig& OSB_LIB::TariffCatalogue::getTzConfig ( const TzConfig::Oid oid  )  const

Get tariff zone configuration of a tariff zone.

Parameters:
oid Unique id of tariff zone configuration.
Returns:
Reference to a tariff zone configuration object.
Exceptions:
OsbException if tariff zone configuration is not found.

const TzConfigs OSB_LIB::TariffCatalogue::getTzConfigs ( const TariffZone::Oid oid  )  const

Get all configurations for a tariff zone.

Parameters:
oid Object id of the tariff zone.
Returns:
A list of configurations retrived.

long OSB_LIB::TariffCatalogue::gracePeriod (  )  const [inline]

Get the grace period for the whole system.

Definition at line 276 of file tariffcatalogue.h.

References gracePeriod_.

size_t OSB_LIB::TariffCatalogue::info ( std::string &  st  ) 

Tariff catalogue summary information.

Parameters:
st String for the output.
Returns:
Total number of objects in the tariff catalogue.

bool OSB_LIB::TariffCatalogue::isTariffUsed ( const Tariff::Oid oid  ) 

Check whether the tariff object has been assigned to any tariff system version object.

Parameters:
oid Object id of the tariff object.
Returns:
true if in used else false.

bool OSB_LIB::TariffCatalogue::isTzInConfig ( const TariffZone::Oid oid  ) 

Return true if tariff zone is used in any zone config.

TariffCatalogue& OSB_LIB::TariffCatalogue::operator= ( const TariffCatalogue rhs  )  [private]

bool OSB_LIB::TariffCatalogue::patchTfVersion ( OSB_DB::Session session,
const TfVersion::Oid oid,
const TfVersion::Oid replacing,
std::vector< OsbError > &  err,
const bool  noWait 
)

Patch an existing released tariff version object.

This function is used typically when a tariff version needs to be backdated or have its rating function reconfigured. An existing tariff version in status standby can be used to replace this released tariff version. Upon successful operation, the names between the two versions will be switched and the tariff version to be replaced will be put to standby whereas the replacing tariff version will be put from standby to released. The rules for a successful operation is as follows:- 1) Only tariff version with status standby can be used to patch(or replace) an existing tariff version. 2) A replacing tariff version cannot have a released date later than the version to be replaced. 3) Revoking the version to be replaced is not possible. 4) No other version exist later than the replacing version.

Parameters:
session Database session.
oid Unique id of the tariff version to be replaced.
replacing Unique id of the replacing tariff version.
err Container to hold list of possible error.
noWait Wait if locked by another session?
Returns:
True if operation is successful.
Exceptions:
OsbException for the following errors:
  • Tariffs are currently being configured (lock has been aquired by others)

RatedServices::iterator OSB_LIB::TariffCatalogue::ratedService ( const RatedService::Oid oid  )  [private]

Find a rated service.

Parameters:
oid Object id of the rated service.
Returns:
Iterator to the rated service in the master list, it is services_.end() if the rated service can not be found.

const RatedServices& OSB_LIB::TariffCatalogue::ratedServices (  )  const

Read access to the list of rated services.

RatingFn* OSB_LIB::TariffCatalogue::ratingFn ( const RatingFn::Oid oid  )  const

Get a rating function from the master list of rating functions.

Parameters:
oid Object id of the rating function.
Returns:
An iterator to a rating function in the master list.

const RatingFns& OSB_LIB::TariffCatalogue::ratingFns (  ) 

Read access to the list of rating functions.

void OSB_LIB::TariffCatalogue::read ( OSB_DB::Session session,
bool  noWait = false,
TcatReadMonitor monitor = 0 
)

Intially load TariffCatalogue from database.

Parameters:
session Database session to use. The session is used to lock all tariff objects in the database and rolled back at the end of the function.
noWait Wait if locked by another session?
monitor Optional monitor of the progress.
Exceptions:
OsbException for all errors during the construction of the internal structures.
All the lists kept in the catalogue are sorted after data are read from the database.

void OSB_LIB::TariffCatalogue::readGracePeriod ( const OSB_DB::Session session  )  [private]

Read in grace period of the whole system.

Parameters:
session The database session.

void OSB_LIB::TariffCatalogue::readServiceClass ( const OSB_DB::Session session  )  [private]

Read service class related objects.

The service class related objects are sorted after data are read in from the database.

Parameters:
session The database session.

void OSB_LIB::TariffCatalogue::readTariff ( const OSB_DB::Session session  )  [private]

Read tariff related objects.

The tariff related objects are sorted after database are read in from the database.

Parameters:
session The database session.

void OSB_LIB::TariffCatalogue::readTariffSystem ( const OSB_DB::Session session  )  [private]

Read tariff system related objects.

The tariff system related objects are sorted after data are read in from the database.

Parameters:
session The database session.

void OSB_LIB::TariffCatalogue::readTcSystem ( const OSB_DB::Session session  )  [private]

Read tariff classification system related objects.

The tariff classification system related objects are sorted after data are read in from the database.

Parameters:
session The database session.

void OSB_LIB::TariffCatalogue::readTpSystem ( const OSB_DB::Session session  )  [private]

Read tariff period system related objects.

The tariff period system related objects are sorted after data are read in from the database.

Parameters:
session The database session.

void OSB_LIB::TariffCatalogue::readUsageTypes ( const OSB_DB::Session session  )  [private]

Get list of usage types.

Parameters:
session Database session to use.

size_t OSB_LIB::TariffCatalogue::releaseCgi ( OSB_DB::Session session,
const Cgi::Oid oid,
OsbErrors errors,
const bool  noWait 
)

Change the object status from 'standby' to 'release'.

Parameters:
session Database session.
oid Object id of the CGI that is to be released.
errors Container for error messages.
noWait Wait if locked by another session?
Returns:
Number of error messages generated.

size_t OSB_LIB::TariffCatalogue::revokeCgi ( OSB_DB::Session session,
const Cgi::Oid oid,
OsbErrors errors,
const bool  noWait 
)

Change the object status from 'release' to 'standby'.

Parameters:
session Database session.
oid Object id of the CGI that is to be revoked.
errors Container for error messages.
noWait Wait if locked by another session?
Returns:
Number of error messages generated.

ScsVersion* OSB_LIB::TariffCatalogue::scsVersion ( const ScsVersion::Oid oid  )  [private]

Get a service class system version from the master list of service class systems.

Parameters:
oid Object id of the service class system version.
Returns:
Pointer to a service class system version in the master list.

const ScsVersions& OSB_LIB::TariffCatalogue::scsVersions (  )  const [inline]

Read access to the list of service class system versions.

Definition at line 2649 of file tariffcatalogue.h.

References scsVersions_.

ScSystem* OSB_LIB::TariffCatalogue::scSystem ( const ScSystem::Oid oid  )  [private]

Get a service class system from the master list of service class systems.

Parameters:
oid Object id of the service class system.
Returns:
Pointer to a service class system in the master list.

const ScSystems& OSB_LIB::TariffCatalogue::scSystems (  )  const [inline]

Read access to the list of service class systems.

Definition at line 2522 of file tariffcatalogue.h.

References scSystems_.

const SpecialDate* OSB_LIB::TariffCatalogue::searchActiveSpecialDate ( const Date date  )  const

Get an active special date from the master list of special dates. It is means that first of all the system current date should be later than than the start dates of special dates, so this special date is active and legal for further search for rating purpose.

Parameters:
date A given date.
Returns:
A pointer to the matching special date.

const TpsVersion* OSB_LIB::TariffCatalogue::searchTpsVersion ( const TpSystem::Oid oid,
const DateTime ts 
) const

Search the active version for a given tariff period system id.

This is a rating function to support the requirement that for a given tariff period system, tariff period system has to determine the active version at the given date.

Parameters:
oid The given tariff period system id.
ts The given date and time.
Returns:
A pointer to the tariff period system version.
Exceptions:
OsbException When there is no active version found.

ServiceClass* OSB_LIB::TariffCatalogue::serviceClass ( const ServiceClass::Oid oid  )  [private]

Get a service class from the master list of service classes.

Parameters:
oid Object id of the service class.
Returns:
Pointer to a service class in the master list.

const ServiceClasses& OSB_LIB::TariffCatalogue::serviceClasses (  )  [inline]

Read access to the list of service classes.

Definition at line 2418 of file tariffcatalogue.h.

References serviceClasses_.

void OSB_LIB::TariffCatalogue::setLock ( TcatLockManager tcatlm  )  [inline]

Set the lock manager to use.

Parameters:
tcatlm The TcatLcokManager.
If an application does not call this function, acess to the tariff catalogue will not use locks.

Definition at line 238 of file tariffcatalogue.h.

References tcatlm_.

const SeTree& OSB_LIB::TariffCatalogue::seTree (  )  const

Get the service element tree.

void OSB_LIB::TariffCatalogue::sortCfgOfTcsVersion ( const TariffZone::Oid oid  ) 

Sort tariff zone list in distance Tcs.

void OSB_LIB::TariffCatalogue::sortCgis (  ) 

Sort CGIs by name.

void OSB_LIB::TariffCatalogue::sortDayClasses (  ) 

Sort day classes by name.

void OSB_LIB::TariffCatalogue::sortE164s (  ) 

Sort E164s by name.

void OSB_LIB::TariffCatalogue::sortRatingFns (  ) 

Sort rating functions by name.

void OSB_LIB::TariffCatalogue::sortScLists (  )  [private]

Sort service class related objects.

void OSB_LIB::TariffCatalogue::sortScOfTsVersion ( const ServiceClass::Oid oid  ) 

Sort service class list in tariff system versions.

void OSB_LIB::TariffCatalogue::sortScsVersions (  ) 

Sort service class system versions by release date.

void OSB_LIB::TariffCatalogue::sortScSystems (  ) 

Sort service class systems by name.

void OSB_LIB::TariffCatalogue::sortServiceClasses (  ) 

Sort service classes by name.

void OSB_LIB::TariffCatalogue::sortSpecialDates (  ) 

Sort special dates by name.

void OSB_LIB::TariffCatalogue::sortTariffClasses (  ) 

Sort tariff classes by name.

void OSB_LIB::TariffCatalogue::sortTariffPeriods (  ) 

Sort tariff periods by name.

void OSB_LIB::TariffCatalogue::sortTariffs (  ) 

Sort tariffs by name.

void OSB_LIB::TariffCatalogue::sortTariffSystems (  ) 

Sort tariff systems by name.

void OSB_LIB::TariffCatalogue::sortTariffZones (  ) 

Sort tariff zones by name.

void OSB_LIB::TariffCatalogue::sortTcOfTsVersion ( const TariffClass::Oid oid  ) 

Sort tariff class list in tariff system versions.

void OSB_LIB::TariffCatalogue::sortTcsLists (  )  [private]

Sort tariff classification system related objects.

void OSB_LIB::TariffCatalogue::sortTcsVersions (  ) 

Sort tariff classification system versions by release date.

void OSB_LIB::TariffCatalogue::sortTcSystems (  ) 

Sort tariff classification systems by name.

void OSB_LIB::TariffCatalogue::sortTfLists (  )  [private]

Sort tariff related objects.

void OSB_LIB::TariffCatalogue::sortTfVersions (  ) 

Sort tariff versions by release date.

void OSB_LIB::TariffCatalogue::sortTpsLists (  )  [private]

Sort tariff period system related objects.

void OSB_LIB::TariffCatalogue::sortTpsVersions (  ) 

Sort tariff period system versions by name.

void OSB_LIB::TariffCatalogue::sortTpSystems (  ) 

Sort tariff period systems by name.

void OSB_LIB::TariffCatalogue::sortTsLists (  )  [private]

Sort tariff system related objects.

void OSB_LIB::TariffCatalogue::sortTsVersions (  ) 

Sort tariff system versions by release date.

void OSB_LIB::TariffCatalogue::sortTzCfgByStartDate (  ) 

Sort tariff zone configs by start date.

SpecialDate* OSB_LIB::TariffCatalogue::specialDate ( const SpecialDate::Oid sdId  ) 

Get an special date from the master list of specialDates.

Parameters:
sdId Object id of the special date to find.
Returns:
Pointer to a special date in the list of specialDates.

const SpecialDates& OSB_LIB::TariffCatalogue::specialDates (  )  const [inline]

Read access to the list of special dates.

Definition at line 407 of file tariffcatalogue.h.

References specialDates_.

Tariff* OSB_LIB::TariffCatalogue::tariff ( const Tariff::Oid oid  )  [private]

Get a tariff from the master list of tariffs.

Parameters:
oid Object id of the tariff.
Returns:
Pointer to a tariff in the master list.

TariffClass* OSB_LIB::TariffCatalogue::tariffClass ( const TariffClass::Oid oid  ) 

Get a tariff class from the master list.

Parameters:
oid Unique id of tariff class.
Returns:
Pointer to tariff class in the master list.

const TariffClasses& OSB_LIB::TariffCatalogue::tariffClasses (  )  const [inline]

Read access to the list of tariff classes.

Definition at line 1636 of file tariffcatalogue.h.

References tariffClasses_.

std::ostream& OSB_LIB::TariffCatalogue::tariffInfo ( std::ostream &   ) 

Print the catalogue (for testing only).

TariffPeriod* OSB_LIB::TariffCatalogue::tariffPeriod ( const TariffPeriod::Oid oid  ) 

Get a tariff period from the master list of tariff periods.

Parameters:
oid Unique id of tariff period.
Returns:
Pointer to a tariff period in the list of tariffperiods.

TariffPeriods& OSB_LIB::TariffCatalogue::tariffPeriods (  )  [inline]

Read access to the list of tariff periods.

Definition at line 727 of file tariffcatalogue.h.

References tariffPeriods_.

Tariffs& OSB_LIB::TariffCatalogue::tariffs (  )  [inline]

Read access to the list of tariffs.

Definition at line 2916 of file tariffcatalogue.h.

References tariffs_.

TariffSystem* OSB_LIB::TariffCatalogue::tariffSystem ( const TariffSystem::Oid oid  ) 

Get tariff system from the master list of tariff systems.

Parameters:
oid Unique id of tariff system.
Returns:
Pointer to an tariff system in the list.

const TariffSystems& OSB_LIB::TariffCatalogue::tariffSystems (  )  const [inline]

Read access to the list of tariff systems.

Definition at line 2153 of file tariffcatalogue.h.

References tariffSystems_.

TariffZone* OSB_LIB::TariffCatalogue::tariffZone ( const TariffZone::Oid oid  ) 

Get a tariff zone from the master list.

Parameters:
oid Unique id of tariff zone.
Returns:
Pointer to tariff zone in the master list.

const TariffZones& OSB_LIB::TariffCatalogue::tariffZones (  )  const [inline]

Read access to the list of tariff zones.

Definition at line 1768 of file tariffcatalogue.h.

References tariffZones_.

TcsVersion* OSB_LIB::TariffCatalogue::tcsVersion ( const TcsVersion::Oid oid  )  [private]

Get a tariff classification system version.

Parameters:
oid Object id of the TCS version.
Returns:
A pointer to the TCS version in the master list, return 0 if not found.

const TcsVersions& OSB_LIB::TariffCatalogue::tcsVersions (  )  const

Read access to all tariff classification system versions.

TcSystem* OSB_LIB::TariffCatalogue::tcSystem ( const TcSystem::Oid oid  ) 

Get a tariff classification system from the master list.

Parameters:
oid Unique id of tariff classification system.
Returns:
Pointer to tariff classification system in the master list.

const TcSystems& OSB_LIB::TariffCatalogue::tcSystems (  )  const [inline]

Read access to the list of tariff classification systems.

Definition at line 1883 of file tariffcatalogue.h.

References tcSystems_.

TfVersion* OSB_LIB::TariffCatalogue::tfVersion ( const TfVersion::Oid oid  )  [private]

Get a tariff version object from the master list of tariff versions.

Parameters:
oid Object id of the tariff version.
Returns:
Pointer to a tariff version object in the master list.

const TfVersions& OSB_LIB::TariffCatalogue::tfVersions (  )  const

Read access to the list of tariff versions.

TpsVersion* OSB_LIB::TariffCatalogue::tpsVersion ( const TpsVersion::Oid oid  ) 

Point to a tariff period system version from the master list of tariff period system versions.

Parameters:
oid Tariff period system version object id.
Returns:
Pointer to a tariff period system version in the list of tariff period system versions.

const TpsVersions& OSB_LIB::TariffCatalogue::tpsVersions (  )  const [inline]

Read access to the list of tariff period system versions.

Definition at line 738 of file tariffcatalogue.h.

References tpsVersions_.

TpSystem* OSB_LIB::TariffCatalogue::tpSystem ( const TpSystem::Oid oid  ) 

Get a tariff period system from the master list of tariff period systems.

Parameters:
oid Unique id of tariff period system.
Returns:
Pointer to a tariff period system in the list of TPS.

TpSystems& OSB_LIB::TariffCatalogue::tpSystems (  )  [inline]

Read access to the list of tariff period systems.

Definition at line 901 of file tariffcatalogue.h.

References tpSystems_.

TsVersion* OSB_LIB::TariffCatalogue::tsVersion ( const TsVersion::Oid oid  ) 

Get a tariff system version from the master list.

This function locates a version using the tariff system id and version number.

Parameters:
oid Unique id of TariffSystem and version number.
Returns:
Pointer to a tariff system version.

const TsVersions& OSB_LIB::TariffCatalogue::tsVersions (  )  const [inline]

Read access to the list of tariff system versions.

Definition at line 2286 of file tariffcatalogue.h.

References tsVersions_.

TzConfig* OSB_LIB::TariffCatalogue::tzConfig ( const TzConfig::Oid oid  ) 

Get a tariff zone configuration from the master list.

This function matches a zone configuration with the tariff zone id and time period in the oid.

Parameters:
oid Unique id of tariff zone configuration.
Returns:
Pointer to a tariff zone configuration.

const TzConfigs& OSB_LIB::TariffCatalogue::tzConfigs (  )  const [inline]

Read access to the list of tariff zone configurations.

Definition at line 2013 of file tariffcatalogue.h.

References tzConfigs_.

size_t OSB_LIB::TariffCatalogue::unfreezeCgi ( OSB_DB::Session session,
const Cgi::Oid oid,
OsbErrors errors,
const bool  noWait 
)

Change the object status from 'standby' to 'editable'.

Parameters:
session Database session.
oid Object id of the CGI that is to be unfreezed.
errors Container for error messages.
noWait Wait if locked by another session?
Returns:
Number of error messages generated.

OsbError OSB_LIB::TariffCatalogue::updCgi ( OSB_DB::Session session,
Cgi cgi,
bool  noWait 
)

Update CGI.

Check that name of CGI does not already exist. If condition above fulfills, update changes into database. Note that the parameter uses a copy of the object, instead of the original object. The session is only commited if no OsbErrors occur else it will be rolled back to release the lock. The list of Cgis will be sorted by name in ascending order after updating.

Parameters:
session Database session.
cgi Reference to a copy of CGI object to be updated.
noWait Wait if locked by another session?
Exceptions:
OsbException if encountered problems in database.
Returns:
OsbError to indicate type of error.

OsbError OSB_LIB::TariffCatalogue::updConnectionPt ( OSB_DB::Session session,
ConnectionPt cp,
bool  noWait 
)

Update connection point.

Check that name in connection point does not already exist. If condition above fulfills, update changes into database. Note that the parameter uses a copy of the object, instead of the original object. The session is commited if no OsbError occurs else it will be rolled back to release the lock upon an OsbError. The list of connection points will be sorted by name in ascending order after updating.

Parameters:
session Database session.
cp Reference to a copy of connection point object to be updated.
noWait Wait if locked by another session?
Returns:
OsbError to indicate type of error.
Exceptions:
OsbException if encountered problems in database.

OsbError OSB_LIB::TariffCatalogue::updDayClass ( OSB_DB::Session session,
DayClass dc,
bool  noWait 
)

Modify the day class definition.

This function will update the database and day class. It will first make sure there is such object id existing; second, it will compare the new object with the original one; then, doing check whether the new object is legal; then, update database; at last, the original object will be updated with the input object. The list of day classes will be sorted by name after updating.

Parameters:
session Database session.
dc DayClass object.
noWait Wait if locked by another session?
Returns:
OsbError. If error num is 0, it means that the whole process is successful. If not, OsbError provides function to get the error message.
Exceptions:
OsbException for any database errors.

OsbError OSB_LIB::TariffCatalogue::updE164 ( OSB_DB::Session session,
E164 e164,
bool  noWait 
)

Update E164.

Check that name is not used in any E164s. Update changes into database if the above condition fulfills. Note that the parameter uses a copy of the object, instead of the original object. The session will be commited if no OsbErrors occur else it will be rolled back to release the lock. The list of E164s will be sorted by name in ascending order after updating.

Parameters:
session Database session.
e164 Reference to a copy of E164 object to be updated.
noWait Wait if locked by another session?
Exceptions:
OsbException if encountered problems in database.
Returns:
OsbError to indicate type of error.

void OSB_LIB::TariffCatalogue::updRatedService ( OSB_DB::Session session,
RatedService service,
bool  noWait 
)

Update a rated service.

Parameters:
session Database session.
service Rated service to update.
noWait Wait if locked by another session?
Exceptions:
OsbException if the update fails.

OsbError OSB_LIB::TariffCatalogue::updRatingFn ( OSB_DB::Session session,
RatingFn rf,
const bool  noWait 
)

Update a rating function object.

This fucniton will update a rating function. The list of rating function will be sorted by name in ascending order after updating.

Parameters:
session Database session.
rf Rating function object to be updated.
noWait Wait if locked by another session?
Returns:
OsbError to indicate the result of this operation.

OsbError OSB_LIB::TariffCatalogue::updScsVersion ( OSB_DB::Session session,
ScsVersion scsVs,
const bool  noWait 
)

Update a service class system version.

This fucniton will update a service class system version. The list of service class system version will be sorted by released date in descending order after updating.

Parameters:
session Database session.
scsVs Service class system version to be updated.
noWait Wait if locked by another session?
Returns:
OsbError to indicate the result of this operation.

OsbError OSB_LIB::TariffCatalogue::updScSystem ( OSB_DB::Session session,
ScSystem scs,
const bool  noWait 
)

Update a service class system.

This fucniton will update a service class system. The list of service class system will be sorted by name in ascending order after updating.

Parameters:
session Database session.
scs Service class system to update.
noWait Wait if locked by another session?
Returns:
OsbError to indicate the result of this operation.

OsbError OSB_LIB::TariffCatalogue::updServiceClass ( OSB_DB::Session session,
ServiceClass sc,
const bool  noWait 
)

Update a service class.

This fucniton will update a service class with name and description given based on oid. The list of service classes will be sorted by name in ascending order after updating.

Parameters:
session Database session.
sc Service class object to be updated.
noWait Wait if locked by another session?
Returns:
OsbError to indicate the result of this operation.

OsbError OSB_LIB::TariffCatalogue::updSpecialDate ( OSB_DB::Session session,
SpecialDate sd,
bool  noWait 
)

Modify the special date definitions.

This function will match the given date from the object with the previous defined ones, if yes, it will changed the original values with new one. The list of special dates will be sorted by name after updating in the database.

Parameters:
session Database session.
sd SpecialDate object.
noWait Wait if locked by another session?
Returns:
An OsbError: if the function is successful its error number is 0.

OsbError OSB_LIB::TariffCatalogue::updTariff ( OSB_DB::Session session,
Tariff tf,
bool  noWait 
)

Update a tariff object.

This function will update a tariff object. The list of tariffs will be sorted by name in ascending after updating.

Parameters:
session Database session.
tf Tariff object to be updated.
noWait Wait if locked by another session?
Returns:
OsbError to indicate the result of this operation.

OsbError OSB_LIB::TariffCatalogue::updTariffClass ( OSB_DB::Session session,
TariffClass tc,
bool  noWait 
)

Update Tariff class.

Check that name is not used in existing tariff class. Update changes into database if the above condition fulfills. Note that the parameter uses a copy of the object, instead of the original object. The session is only commited if no OsbErrors occur else it will be rolled back to release the lock. The list of tariff classes will be sorted by name in ascending order after updating.

Parameters:
session Database session.
tc Reference to a copy of tariff class object to be updated.
noWait Wait if locked by another session?
Exceptions:
OsbException if encountered problems in database.
Returns:
OsbError to indicate the type of error.

OsbError OSB_LIB::TariffCatalogue::updTariffPeriod ( OSB_DB::Session session,
TariffPeriod tp,
bool  noWait 
)

Update a tariff period.

This function will update a tariff period with name and description, for a given id. And, before updating, it has to search available tariff periods with name and desc comparsion. Then, it will update database with new update values. Finally it will update the object. The list of tariff periods will be sorted by name in ascending order after updating.

Parameters:
session Database session.
tp A object reference of tariff period.
noWait Wait if locked by another session?
Returns:
OsbError. If error num is 0, it means that the whole process is successful. If not, OsbError provides function to get the error message.
Exceptions:
OsbException for any database errors.

OsbError OSB_LIB::TariffCatalogue::updTariffSystem ( OSB_DB::Session session,
TariffSystem ts,
bool  noWait 
)

Update tariff system in the database.

Check that name of tariff system does not already exist. If condition above fulfills, update changes into database. Note that the parameter uses a copy of the object, instead of the original object. The session is only committed if no OsbErrors occur else it will be rolled back to release the lock. The list of tariff systems will be sorted by name in ascending order after updating.

Parameters:
session Database session.
ts Reference to a copy of tariff system object to be updated.
noWait Wait if locked by another session?
Exceptions:
OsbException if encountered problems in database.
Returns:
OsbError to indicate type of error.

OsbError OSB_LIB::TariffCatalogue::updTariffZone ( OSB_DB::Session session,
TariffZone tz,
bool  noWait 
)

Update tariff zone.

Check that name does not exist in tariff zone. Update changes to the name into database if the above condition fulfills. Note that the parameter uses a copy of the object, instead of the original object. The session is only commited if no OsbErrors occur else it will be rolled back to release the lock. The list of tariff zones will be sorted by name in ascending order after updating.

Parameters:
session Database session.
tz Reference to a copy of tariff zone object to be updated.
noWait Wait if locked by another session?
Exceptions:
OsbException if encountered problems in database.
Returns:
OsbError to indicate type of error.

OsbError OSB_LIB::TariffCatalogue::updTcsVersion ( OSB_DB::Session session,
TcsVersion tcsVs,
const bool  noWait 
)

Update a tariff classification system version object.

The list of tariff classification system version will be sorted by released date in descending order after updating.

Parameters:
session Database session to use.
tcsVs TCS version to update.
noWait Wait if locked by another session?
Returns:
OsbError to indicate the result of this operation.

OsbError OSB_LIB::TariffCatalogue::updTcSystem ( OSB_DB::Session session,
TcSystem tcs,
bool  noWait 
)

Update tariff classification system.

This function replace the entry in database with the updated tariff classification system object passed in. The list of tariff classification system will be sorted by name in ascending order after updating.

Parameters:
session Database session.
tcs Updated tariff classification system object.
noWait Wait if locked by another session?
Returns:
OsbError to indicate the type of error.
Exceptions:
OsbException if encountered problems in database.

OsbError OSB_LIB::TariffCatalogue::updTfVersion ( OSB_DB::Session session,
TfVersion tfVs,
const bool  noWait 
)

Update a tariff version.

This fucniton will update a tariff version. The list of tariff version will be sorted by released date in descending order after updating.

Parameters:
session Database session.
tfVs Tariff version to updated.
noWait Wait if locked by another session?
Returns:
OsbError to indicate the result of this operation.

OsbError OSB_LIB::TariffCatalogue::updTpsVersion ( OSB_DB::Session session,
TpsVersion tpsVs,
bool  noWait 
)

Modify a version of tariff period system.

This function will update a tariff period system version for a given id. Before updating, it has to make sure the object id exists; the new object is different from the original; checking the unique of name; then update database; at last, the original object will be updated with new one. The list of tariff period system versions will be sorted by released date in descending order after updating.

Parameters:
session Database session.
tpsVs A reference of tariff period system version.
noWait Wait if locked by another session?
Returns:
A object of OsbError. If error num is 0, it means that the whole process is successful. If not, OsbError provides function to get the error message.
Exceptions:
OsbException for database errors.

OsbError OSB_LIB::TariffCatalogue::updTpSystem ( OSB_DB::Session session,
TpSystem tps,
bool  noWait 
)

Update a tariff period system.

This fucniton will update a tariff period system with name and description, for a given id. Before updating, it has to make sure the object id exists; the new object is different from the original; checking the unique of name; then update database; at last, the original object will be updated with new one. The list of tariff period systems will be sorted by name in ascending order after updating.

Parameters:
session Database session.
tps A reference to the updated object of TpSystem.
noWait Wait if locked by another session?
Returns:
A object of OsbError. If error num is 0, it means that the whole process is successful. If not, OsbError provides function to get the error message.
Exceptions:
OsbException for any database errors.

OsbError OSB_LIB::TariffCatalogue::updTsVersion ( OSB_DB::Session session,
TsVersion tsv,
bool  noWait 
)

Update tariff system version.

Note that the parameter uses a copy of the object, instead of the original object. The session is only commited if no OsbErrors occur else it will be rolled back to release the lock. The list of tariff system versions will be sorted by released date in descending order after updating.

Parameters:
session Database session.
tsv Reference to a copy of tariff system version.
noWait Wait if locked by another session?
Exceptions:
OsbException if encountered problems in database.
Returns:
OsbError to indicate type of error.

OsbError OSB_LIB::TariffCatalogue::updTzConfig ( OSB_DB::Session session,
TzConfig tzcfg,
bool  noWait 
)

Update tariff zone configuration.

Update changes to the valid period into database if the above condition fulfills. Note that the parameter uses a copy of the object, instead of the original object. The session will be commited if no OsbErrors occur else it will be rolled back to release the lock. The list of tariff zone configuration will be sorted by start date after updating.

Parameters:
session Database session.
tzcfg Reference to a copy of tariff zone configuration object to be updated.
noWait Wait if locked by another session?
Exceptions:
OsbException if encountered problems in database.
Returns:
OsbError to indicate type of error.

const UsageTypeList& OSB_LIB::TariffCatalogue::usageTypeList (  )  const

Get list of CDR usage types.


Friends And Related Function Documentation

friend class TcatLockManager [friend]

For the implementation of the various write guards, the lock manager needs non-const access to the tariff objects.

Definition at line 132 of file tariffcatalogue.h.


Member Data Documentation

CgiMap OSB_LIB::TariffCatalogue::cgiMap_ [mutable, private]

Connection point map of CGI configurations.

Whenever a configuration related to Cgi changes, the flag CgiMap::needBuild_ is set to true.

Remarks:
The member is mutable because the CGI map will be rebuild if needed when CgiMap is called.

Definition at line 3434 of file tariffcatalogue.h.

Cgis OSB_LIB::TariffCatalogue::cgis_ [private]

Master list of CGI.

Definition at line 3424 of file tariffcatalogue.h.

Referenced by cgis().

CpMapperList OSB_LIB::TariffCatalogue::cpMapperList_ [private]

Info on connection point mapping classes.

Definition at line 3462 of file tariffcatalogue.h.

Referenced by cpMapperList().

CpTree* OSB_LIB::TariffCatalogue::cpTree_ [private]

Connection point tree.

Definition at line 3460 of file tariffcatalogue.h.

DayClasses OSB_LIB::TariffCatalogue::dayClasses_ [private]

Master list of day classes.

Definition at line 3412 of file tariffcatalogue.h.

Referenced by dayClasses().

E164Map* OSB_LIB::TariffCatalogue::e164Map_ [mutable, private]

Connection point map of E164 configurations.

Whenever the list with the E164 configuration changes, the flag E164Map::needBuild_ is set to true.

Remarks:
The member is mutable because the E.164 map will be rebuild if needed when e164Map is called.

Definition at line 3447 of file tariffcatalogue.h.

E164s OSB_LIB::TariffCatalogue::e164s_ [private]

Master list of E164.

Definition at line 3437 of file tariffcatalogue.h.

Referenced by e164s().

long OSB_LIB::TariffCatalogue::gracePeriod_ [private]

Grace period of the whole system.

Definition at line 3403 of file tariffcatalogue.h.

Referenced by gracePeriod().

RatedServices OSB_LIB::TariffCatalogue::ratedServices_ [private]

Master list of rated services.

Definition at line 3498 of file tariffcatalogue.h.

RatingFns OSB_LIB::TariffCatalogue::ratingFns_ [private]

Master list of rating function.

Definition at line 3488 of file tariffcatalogue.h.

ScsVersions OSB_LIB::TariffCatalogue::scsVersions_ [private]

Master list of service class system versions.

Definition at line 3478 of file tariffcatalogue.h.

Referenced by scsVersions().

ScSystems OSB_LIB::TariffCatalogue::scSystems_ [private]

Master list of service class systems.

Definition at line 3476 of file tariffcatalogue.h.

Referenced by scSystems().

ServiceClasses OSB_LIB::TariffCatalogue::serviceClasses_ [private]

Master list of service class.

Definition at line 3474 of file tariffcatalogue.h.

Referenced by serviceClasses().

SeTree* OSB_LIB::TariffCatalogue::seTree_ [private]

Service element tree.

Definition at line 3494 of file tariffcatalogue.h.

SpecialDates OSB_LIB::TariffCatalogue::specialDates_ [private]

Master list of special dates.

Definition at line 3410 of file tariffcatalogue.h.

Referenced by specialDates().

TariffClasses OSB_LIB::TariffCatalogue::tariffClasses_ [private]

Master list of tariff classes.

Definition at line 3450 of file tariffcatalogue.h.

Referenced by tariffClasses().

TariffPeriods OSB_LIB::TariffCatalogue::tariffPeriods_ [private]

Master list of tariff periods.

Definition at line 3414 of file tariffcatalogue.h.

Referenced by tariffPeriods().

Tariffs OSB_LIB::TariffCatalogue::tariffs_ [private]

Master list of tariff.

Definition at line 3484 of file tariffcatalogue.h.

Referenced by tariffs().

TariffSystems OSB_LIB::TariffCatalogue::tariffSystems_ [private]

Master list of tariff system.

Definition at line 3467 of file tariffcatalogue.h.

Referenced by tariffSystems().

TariffZones OSB_LIB::TariffCatalogue::tariffZones_ [private]

Master list of tariff zones.

Definition at line 3452 of file tariffcatalogue.h.

Referenced by tariffZones().

TcatLockManager* OSB_LIB::TariffCatalogue::tcatlm_ [private]

Lock manager to use.

Definition at line 148 of file tariffcatalogue.h.

Referenced by setLock().

TcsVersions OSB_LIB::TariffCatalogue::tcsVersions_ [private]

Master list of tariff classification system version.

Definition at line 3456 of file tariffcatalogue.h.

TcSystems OSB_LIB::TariffCatalogue::tcSystems_ [private]

Master list of tariff classification system.

Definition at line 3454 of file tariffcatalogue.h.

Referenced by tcSystems().

TfVersions OSB_LIB::TariffCatalogue::tfVersions_ [private]

Master list of tariff version.

Definition at line 3486 of file tariffcatalogue.h.

TpsVersions OSB_LIB::TariffCatalogue::tpsVersions_ [private]

The master list of tpVersions.

Definition at line 3418 of file tariffcatalogue.h.

Referenced by tpsVersions().

TpSystems OSB_LIB::TariffCatalogue::tpSystems_ [private]

Master list of tariff period systems.

Definition at line 3416 of file tariffcatalogue.h.

Referenced by tpSystems().

TsVersions OSB_LIB::TariffCatalogue::tsVersions_ [private]

Master list of TsVersion.

Definition at line 3468 of file tariffcatalogue.h.

Referenced by tsVersions().

TzConfigs OSB_LIB::TariffCatalogue::tzConfigs_ [private]

Master list of tariff zone configurations.

Definition at line 3458 of file tariffcatalogue.h.

Referenced by tzConfigs().

UsageTypeList* OSB_LIB::TariffCatalogue::usageTypeList_ [private]

Cdr usage types.

Definition at line 3405 of file tariffcatalogue.h.


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