OSB_LIB::Cgi Class Reference

Collaboration diagram for OSB_LIB::Cgi:

Collaboration graph
[legend]
List of all members.

Detailed Description

Cell Global Identity (GSM) connections.

This class stores the details of a CGI connection.

The Cgi::value_ has the format MCC-MNC-LAC-CI (without dashes):

Only the MCC is mandatory, the other parts are optional but may be present only if the previous (left) part is provided. E.g., 52501 is valid, whereas 228__1A34 is not legal.

Remarks:
Copy constructor, assignment and destructor by compiler.

Definition at line 93 of file cgi.h.

Database operations:

Public Types

Public Member Functions

Read access to members:
Parts of the CGI:

Static Public Member Functions

Parts of the CGI:

Static Public Attributes

Private Member Functions

Status changes:

Private Attributes

Friends


Member Typedef Documentation

typedef Id<ConnectionPt> OSB_LIB::Cgi::CpId

Type-safe, unique id of a connection point.

Definition at line 109 of file cgi.h.

typedef Id<Cgi> OSB_LIB::Cgi::Oid

Type-safe, unique id of CGI.

Definition at line 106 of file cgi.h.


Constructor & Destructor Documentation

OSB_LIB::Cgi::Cgi (  )  [inline]

Empty constructor, required in struct TzInfo in TzgVersionInfo.

Definition at line 112 of file cgi.h.

OSB_LIB::Cgi::Cgi ( const Oid oid,
const long  objVs,
const std::string &  name,
const std::string &  val,
const CpId cpId 
)

Constructor to initialise oid, objVs, name and value.

The name, value and connection point id of the CGI cannot be null.

Parameters:
oid Unique id of CGI.
objVs Object version.
name Name of CGI.
val Value of CGI.
cpId Id of the assigned connection point.
Exceptions:
OsbException if
  • Name is null.
  • Value is null.
  • Connection point id not set.


Member Function Documentation

bool OSB_LIB::Cgi::check ( const OSB_DB::Session session,
OsbErrors errors 
) [private]

Set the status from editable to standby.

In order to set the status from editable to standby, the following criteria must be fulfilled:

Parameters:
session Database session used.
errors Container for error messages if any.
Returns:
true if success else false.
Exceptions:
OsbException for any database errors.

std::string OSB_LIB::Cgi::ci (  )  const

Get the CI of a CGI, empty string if not available.

static std::string OSB_LIB::Cgi::ci ( const std::string &  valule  )  [static]

Get the CI of a CGI, empty string if not available.

const CpId& OSB_LIB::Cgi::cpId (  )  const [inline]

Get the unique conenction point id.

Definition at line 143 of file cgi.h.

References cpId_.

const Date& OSB_LIB::Cgi::endDate (  )  const [inline]

Get the ending date of status released.

Definition at line 161 of file cgi.h.

References endDate_.

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

Insert a CGI into database.

A new object 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.

std::string OSB_LIB::Cgi::lac (  )  const

Get the LAC of a CGI, empty string if not available.

static std::string OSB_LIB::Cgi::lac ( const std::string &  value  )  [static]

Get the LAC of a CGI, empty string if not available.

std::string OSB_LIB::Cgi::mcc (  )  const

Get the MCC of a CGI, empty string if not available.

static std::string OSB_LIB::Cgi::mcc ( const std::string &  value  )  [static]

Get the MCC of a CGI, empty string if not available.

std::string OSB_LIB::Cgi::mnc (  )  const

Get the MNC of a CGI, empty string if not available.

static std::string OSB_LIB::Cgi::mnc ( const std::string &  value  )  [static]

Get the MNC of a CGI, empty string if not available.

const std::string& OSB_LIB::Cgi::name (  )  const [inline]

Get name of CGI.

Definition at line 149 of file cgi.h.

References name_.

long OSB_LIB::Cgi::objVs (  )  const [inline]

Get value of object version.

Definition at line 146 of file cgi.h.

References objVs_.

const Oid& OSB_LIB::Cgi::oid (  )  const [inline]

Get the unique CGI id.

Definition at line 140 of file cgi.h.

References oid_.

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

Read a CGI from database.

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

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

bool OSB_LIB::Cgi::release ( const OSB_DB::Session session,
OsbErrors errors 
) [private]

Set the status from standby to release.

In order to set the status from standby to release, the following criteria must be fulfilled:

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

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

Remove a CGI from database.

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

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object is not editable.
  • Object not found.
  • Object has been modified.

bool OSB_LIB::Cgi::revoke ( const OSB_DB::Session session,
OsbErrors errors 
) [private]

Set the status from release to standby.

In order to set the status from release to standby, the following criteria must be fulfilled:

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

bool OSB_LIB::Cgi::setCpId ( const CpId id  ) 

Set connection point id of CGI connection.

This function set the connection point id of the CGI connection in the master list, the new id will only be updated in the database after updCgi in TariffCatalogue is called.

Parameters:
id Unique id of a connection point.
Returns:
true if id is not null.

void OSB_LIB::Cgi::setEndDate ( const Date eDate  ) 

Set the end date of a CGI.

Parameters:
eDate End date of the CGI.

bool OSB_LIB::Cgi::setName ( const std::string &  newName  ) 

Set the CGI's name.

Parameters:
newName New name of CGI, must not be empty.
Returns:
true if the new name was set, false is `newName' is empty.

void OSB_LIB::Cgi::setStartDate ( const Date sDate  ) 

Set the start date of a CGI.

Parameters:
sDate Start date of the CGI.

bool OSB_LIB::Cgi::setValue ( const std::string &  newValue  ) 

Set value of CGI connection.

This function set the value of the connection in the master list, the new value will only be updated in the database after updCgi in TariffCatalogue is called. Note that this is allowed only if the CGI is not already in production in a tarff zone configuration.

Parameters:
newValue New value of CGI.
Returns:
True if newValue is not null and CGI is not already in production.

const Date& OSB_LIB::Cgi::startDate (  )  const [inline]

Get the starting date of status released.

Definition at line 158 of file cgi.h.

References startDate_.

const CfgStatus& OSB_LIB::Cgi::status (  )  const [inline]

Get the status of CGI.

Definition at line 155 of file cgi.h.

References status_.

bool OSB_LIB::Cgi::unfreeze ( const OSB_DB::Session session,
OsbErrors errors 
) [private]

Set the status from standby to editable.

In order to set the status from standby to editable, the following criteria must be fulfilled:

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

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

Update a CGI in the database.

Old entry in the database indentify by the object id will be replaced with the new data from the passed in, upated object.

Parameters:
session Database session used.
Returns:
true if success else false.
Exceptions:
OsbException for the following erros:
  • Name too long.
  • Object not found.
  • Object has been modified.

bool OSB_LIB::Cgi::validate (  )  const

Validate the value of the CGI.

Refer to the class description for the rules (Cgi).

Returns:
true if the format of value_ is valid.

static bool OSB_LIB::Cgi::validate ( const std::string &  value  )  [static]

Validate a CGI.

Verify that a string is legal value for a CGI. For a detailed description refer to the class description (Cgi).

Parameters:
value String to validate.
Returns:
true if the format of `value' is valid.

const std::string& OSB_LIB::Cgi::value (  )  const [inline]

Get value of CGI.

Definition at line 152 of file cgi.h.

References value_.


Friends And Related Function Documentation

friend struct OSB_DB::CgiGw [friend]

Database gateway needs to populate data members.

Definition at line 97 of file cgi.h.

friend class TariffCatalogue [friend]

Tariff Catalogue is the only object that is allow to invoke the private functions of this class.

Definition at line 103 of file cgi.h.


Member Data Documentation

const std::string OSB_LIB::Cgi::catchall [static]

Value of Cgi if unknown: "*".

Definition at line 261 of file cgi.h.

CpId OSB_LIB::Cgi::cpId_ [private]

Unique id of a connection point.

Definition at line 403 of file cgi.h.

Referenced by cpId().

Date OSB_LIB::Cgi::endDate_ [private]

Released till.

Definition at line 406 of file cgi.h.

Referenced by endDate().

std::string OSB_LIB::Cgi::name_ [private]

Name of CGI.

Definition at line 401 of file cgi.h.

Referenced by name().

long OSB_LIB::Cgi::objVs_ [private]

Object version.

Definition at line 400 of file cgi.h.

Referenced by objVs().

Oid OSB_LIB::Cgi::oid_ [private]

Unique id of CGI.

Definition at line 399 of file cgi.h.

Referenced by oid().

Date OSB_LIB::Cgi::startDate_ [private]

Released from.

Definition at line 405 of file cgi.h.

Referenced by startDate().

CfgStatus OSB_LIB::Cgi::status_ [private]

Status of CGI.

Definition at line 404 of file cgi.h.

Referenced by status().

std::string OSB_LIB::Cgi::value_ [private]

Value of CGI.

Definition at line 402 of file cgi.h.

Referenced by value().


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