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.
Definition at line 93 of file cgi.h.
typedef Id<ConnectionPt> OSB_LIB::Cgi::CpId |
typedef Id<Cgi> OSB_LIB::Cgi::Oid |
OSB_LIB::Cgi::Cgi | ( | ) | [inline] |
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.
oid | Unique id of CGI. | |
objVs | Object version. | |
name | Name of CGI. | |
val | Value of CGI. | |
cpId | Id of the assigned connection point. |
OsbException | if
|
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:
session | Database session used. | |
errors | Container for error messages if any. |
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] |
const Date& OSB_LIB::Cgi::endDate | ( | ) | const [inline] |
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.
session | Database session. |
OsbException | for the following errors:
|
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] |
long OSB_LIB::Cgi::objVs | ( | ) | const [inline] |
const Oid& OSB_LIB::Cgi::oid | ( | ) | const [inline] |
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.
session | Database session. |
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:
session | Database session used. | |
errors | Container for error messages if any. |
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.
session | Database session. |
OsbException | for the following errors:
|
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:
session | Database session used. | |
errors | Container for error messages if any. |
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.
id | Unique id of a connection point. |
void OSB_LIB::Cgi::setEndDate | ( | const Date & | eDate | ) |
Set the end date of a CGI.
eDate | End date of the CGI. |
bool OSB_LIB::Cgi::setName | ( | const std::string & | newName | ) |
Set the CGI's name.
newName | New name of CGI, must not be empty. |
void OSB_LIB::Cgi::setStartDate | ( | const Date & | sDate | ) |
Set the start date of a CGI.
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.
newValue | New value of CGI. |
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] |
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:
session | Database session used. | |
errors | Container for error messages if any. |
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.
session | Database session used. |
OsbException | for the following erros:
|
bool OSB_LIB::Cgi::validate | ( | ) | const |
Validate the value of the CGI.
Refer to the class description for the rules (Cgi).
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).
value | String to validate. |
const std::string& OSB_LIB::Cgi::value | ( | ) | const [inline] |
friend struct OSB_DB::CgiGw [friend] |
friend class TariffCatalogue [friend] |
const std::string OSB_LIB::Cgi::catchall [static] |
CpId OSB_LIB::Cgi::cpId_ [private] |
Date OSB_LIB::Cgi::endDate_ [private] |
std::string OSB_LIB::Cgi::name_ [private] |
long OSB_LIB::Cgi::objVs_ [private] |
Oid OSB_LIB::Cgi::oid_ [private] |
Date OSB_LIB::Cgi::startDate_ [private] |
CfgStatus OSB_LIB::Cgi::status_ [private] |
std::string OSB_LIB::Cgi::value_ [private] |