OSB_LIB::ConnectionPt Class Reference

Inheritance diagram for OSB_LIB::ConnectionPt:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Connection points.

This class stores the details of a connection point. Each connection point has a parent which determines the next CGI or E.164 to search when matching a best matched CGI or E.164.

Definition at line 167 of file connectionpt.h.

Database functions.

Public Types

Public Member Functions

Read access to data members:
Modify data members:
Modify parent connection points.
Status changes:

Private Attributes

Friends


Member Typedef Documentation

typedef Id<ConnectionPt> OSB_LIB::ConnectionPt::Oid

Type-safe, unique id of connection point.

Definition at line 179 of file connectionpt.h.

typedef std::list<CpParent> OSB_LIB::ConnectionPt::Parents

STL container for connection point's parents.

Definition at line 181 of file connectionpt.h.


Constructor & Destructor Documentation

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

Constructor with only an object id.


Member Function Documentation

void OSB_LIB::ConnectionPt::addParent ( CpParent parent  ) 

Add parent connection point.

Parameters:
parent Parent connection point.
Exceptions:
OsbException for the following errors:
  • Parent connection point already exist.
  • Self assignment.
  • Cycle assignment.

void OSB_LIB::ConnectionPt::delParent ( const int  seq  ) 

Remove parent connection point relationship.

Parameters:
seq Sequence number of the parent relationship to be removed.
Exceptions:
OsbException if parent connection does not exist.

bool OSB_LIB::ConnectionPt::freeze ( const OSB_DB::Session session,
OsbErrors errors 
) [virtual]

Change status from 'editable' to 'standby'.

To freeze a connection point, the following criteria must be fulfilled:

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

Implements OSB_LIB::ToCfgBase.

const Oid OSB_LIB::ConnectionPt::getParent ( const DateTime ts  )  const

Get the parent at a given timestamp.

bool OSB_LIB::ConnectionPt::insert ( const OSB_DB::Session session  )  [private]

Connection point insert itself into database.

A new connection point is inserted. All attributes of the object has been set except object id. The object id will only be set by the function if the insertion is successful.

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

bool OSB_LIB::ConnectionPt::isRoot (  )  const

Return true if this is a root connection point else false.

const Oid& OSB_LIB::ConnectionPt::oid (  )  const

Get unique id of a connection point.

const CpParent* OSB_LIB::ConnectionPt::parent ( const int  seq  )  const

Get the parent relationship with a given sequence no.

Parameters:
seq Sequence number of the parent relationship.
Returns:
A pointer to the relationship found else return 0.

const Parents& OSB_LIB::ConnectionPt::parents (  )  const

Get the list of parents for this connection point.

bool OSB_LIB::ConnectionPt::read ( const OSB_DB::Session session  ) 

Connection point read itself from database.

The object id is used to gather other info from database and then populate the object's data members.

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

bool OSB_LIB::ConnectionPt::release ( const OSB_DB::Session session,
OsbErrors errors 
) [virtual]

Change status from 'standby' to 'released'.

To release a connection point, the following criteria must be fulfilled:

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

Implements OSB_LIB::ToCfgBase.

bool OSB_LIB::ConnectionPt::remove ( const OSB_DB::Session session  )  [private]

Connection point remove itself from database.

After the function call, oid of this object will be unset to indicate that there is no such entry anymore in the database.

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

bool OSB_LIB::ConnectionPt::revoke ( const OSB_DB::Session session,
OsbErrors errors 
) [virtual]

Change status from 'release' to 'standby'.

To revoke a connection point, the following criteria must be fulfilled:

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

Implements OSB_LIB::ToCfgBase.

void OSB_LIB::ConnectionPt::setReleaseTs ( const DateTime ts  )  [virtual]

Set the release time stamp.

Parameters:
ts Time stamp when the tariff object becomes active.
Exceptions:
OsbException if the object status is released.
Sets the own release timestamp and, if only one parent is configured, also the release timestamp of this parent.

Reimplemented from OSB_LIB::ToCfgTsBase.

void OSB_LIB::ConnectionPt::setRoot ( bool  isRoot  ) 

Define connection point as a root or not a root.

Parameters:
isRoot Set this parameter to true if going to change the connection point to a root connection point and vice-versa.

void OSB_LIB::ConnectionPt::sortParents (  ) 

Sort parent connection point by release date.

bool OSB_LIB::ConnectionPt::unfreeze ( const OSB_DB::Session session,
OsbErrors errors 
) [virtual]

Change status from 'standby' to 'editable'.

To unfreeze a connection point, the following criteria must be fulfilled:

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

Implements OSB_LIB::ToCfgBase.

bool OSB_LIB::ConnectionPt::update ( const OSB_DB::Session session  )  [private]

Connection point update itself into the database.

Old entry in the database identify by the object id will be replaced with the new data from this object.

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

void OSB_LIB::ConnectionPt::updParent ( const CpParent parent  ) 

Update parent connection point.

Parameters:
parent Parent connection point to update.
Exceptions:
OsbException if the parent does not exist.


Friends And Related Function Documentation

friend class OSB_DB::ConnectionPtGw [friend]

Allow create function at the gateway to assign unique id to newly created connection points.

Definition at line 174 of file connectionpt.h.

friend class TariffCatalogue [friend]

Allow the tariff catalogue to call the database functions.

Definition at line 176 of file connectionpt.h.


Member Data Documentation

bool OSB_LIB::ConnectionPt::isRoot_ [private]

Is a root connection pt or not.

Definition at line 400 of file connectionpt.h.

Oid OSB_LIB::ConnectionPt::oid_ [private]

Unique id of a connection pt.

Definition at line 398 of file connectionpt.h.

Parents OSB_LIB::ConnectionPt::parents_ [private]

List of parent connection points.

Definition at line 402 of file connectionpt.h.


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