OSB_LIB::FilterVersion Class Reference

Collaboration diagram for OSB_LIB::FilterVersion:

Collaboration graph
[legend]
List of all members.

Detailed Description

It holds all the filter expression configured to this filter version and the corresponding filter action to be performed if the filter expression matches.

Definition at line 1261 of file filter.h.

Database operations:

Public Types

Public Member Functions

Read access to data members:
Modify data members:

Private Member Functions

Status changes.

Private Attributes

Friends


Member Typedef Documentation

typedef std::pair<FilterExpr,FilterAction> OSB_LIB::FilterVersion::FeFaPair

This contains pointer to the filter expression and its corresponding filter action to be performed.

Definition at line 1282 of file filter.h.

typedef std::vector<FeFaPair> OSB_LIB::FilterVersion::FExprs

Container to the filter expression, filter action pair.

Definition at line 1285 of file filter.h.

typedef Id2<FilterVersion> OSB_LIB::FilterVersion::Oid

Unique object id for filter version.

Definition at line 1276 of file filter.h.


Constructor & Destructor Documentation

OSB_LIB::FilterVersion::FilterVersion ( const Oid oid = Oid(),
const std::string &  name = "" 
)

Constructor with object id and name.

This will be used as an default constructor as well as with object id and name to construct the filter version object.

Parameters:
oid Object identifier to identify the filter version.
name Name of the object.


Member Function Documentation

void OSB_LIB::FilterVersion::addFExpr ( const FilterExpr::Oid oid,
FilterAction  fa 
)

Add new filter expression.

This will add the filter expression to this filter version.

Parameters:
oid Unique object identifier for the filter expression.
fa filteraction to be performed.
Returns:
True if the filter expression object added successfully else false.

void OSB_LIB::FilterVersion::build (  )  [private]

Build all filter expressions for this object.

If their is any change on any filter expression or filter condition this will get called to re buils the local objects again.

FilterAction OSB_LIB::FilterVersion::eval ( Cdr cdr,
UsedService us 
)

Evaluation of UsedService.

This will evaluate the given Cdr and UsedService with the configured filter expression and returns the filter action to be performed.

Parameters:
cdr Cdr object to use.
us UsedService object to use.
Returns:
Returns the filter action to be performed.

const FExprs& OSB_LIB::FilterVersion::filterExprs (  )  const

Return the vector of filter expression and filter action pair.

bool OSB_LIB::FilterVersion::freeze ( const OSB_DB::Session session,
std::vector< OsbError > &  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 to use.
errors Container of error messages if any.
Exceptions:
OsbException for any database errors.
Returns:
True if status changed to standby else false.

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

Insert the filter version object into the database.

This will insert the filter version object into the database using filter version gateway. The object version and filter version will be assigned after the insertion.

Parameters:
session Database session to use.
Exceptions:
Exception for the following errors:
  • Unique key violation,
  • Name field is empty,
  • Name field exceeds maximum size
Returns:
True if the filter version object inserted successfully else false.

const std::string& OSB_LIB::FilterVersion::name (  )  const

Return the name of this filter version object.

long OSB_LIB::FilterVersion::objVs (  )  const

Return the object version of the filter version object.

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

Return the unique object id of the filter version object.

void OSB_LIB::FilterVersion::print (  ) 

This is for debugging purpose.

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

Read the filter version object from database.

This will read the filter version object from the database using filter version gateway. The filter id and filter version are used to identify the object in the database.

Parameters:
session Database session to use.
Exceptions:
Exception if object not found.
Returns:
True if filter version object read successfully else false.

bool OSB_LIB::FilterVersion::release ( const OSB_DB::Session session,
std::vector< OsbError > &  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 to use.
errors Container of error messages if any.
Exceptions:
OsbException for the following errors:
  • Object is not in status standby
  • Release date is not in future
  • All filter expressions are not released.
Returns:
True if status changed to release else false.

const Date& OSB_LIB::FilterVersion::releaseDate (  )  const

Return the release date of this filter version object.

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

Remove the filter version object from database.

This will remove the filter version object from the database using filter version gateway. Filter id and filter version are used to identify the filter version object for deletion.

Parameters:
session Database session to use.
Exceptions:
Exception for the following error:
  • Object not found,
  • Foreign key constraint
Returns:
True if the filter version object deleted successfully else false.

void OSB_LIB::FilterVersion::removeFExpr ( const FilterExpr::Oid oid  ) 

Remove the filter expression.

This will remove the filter expression from this filter version object.

Parameters:
oid Unique object identifier for the filter expression.
Returns:
True if the filter expression is removed successfully from the list else false.

bool OSB_LIB::FilterVersion::revoke ( const OSB_DB::Session session,
std::vector< OsbError > &  errors 
) [private]

Set the status from release to standby.

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

Parameters:
session Database session to use.
errors Container of error messages is any.
Exceptions:
OsbException for any database errors.
Returns:
True if status changed to standby else false.

bool OSB_LIB::FilterVersion::setName ( const std::string &  name  ) 

Set the name of the filter version object.

Parameters:
name Name of the filter version object.
Exceptions:
Exception for the following errors:
  • Object is not editable,
  • Name is too long,
  • Name is empty
Returns:
True if the name is set successfully else false.

bool OSB_LIB::FilterVersion::setReleaseDate ( const Date date  ) 

Set the release date for the filter version object.

Parameters:
date Release date to be set.
Exceptions:
Exception if Object has been released.
Returns:
True if the release date is set successfully else false.

CfgStatus OSB_LIB::FilterVersion::status (  )  const

Return the status of this filter version object.

bool OSB_LIB::FilterVersion::unfreeze ( const OSB_DB::Session session,
std::vector< OsbError > &  errors 
) [private]

Set the status from standby to editable.

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

Parameters:
session Database session to use.
errors Container of error messages is any.
Exceptions:
OsbException for any database errors.
Returns:
True if status changed to editable else false.

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

Update the filter version object in database.

This will update the filter version object into the database with the current values using filter version gateway. Filter id, filter version and object version are used to identify the filter version object for updation. After updation the object version will be increased by 1.

Parameters:
session Database session to use.
Exceptions:
Exception for the following error:
  • Object not found,
  • Name field is empty,
  • Name field exceeds maximum size
Returns:
True if the filter version object updated successfully else false.


Friends And Related Function Documentation

friend class FilterManager [friend]

This is used to configure and manage the filter version.

Definition at line 1273 of file filter.h.

friend struct OSB_DB::FilterVersionGw [friend]

This will perform all database operation for filter version.

Definition at line 1267 of file filter.h.


Member Data Documentation

FExprs OSB_LIB::FilterVersion::fexprs_ [private]

List of filter expressions and its corresponding filter action belong to this filter version object.

Definition at line 1577 of file filter.h.

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

Name of this filter version object.

Definition at line 1565 of file filter.h.

long OSB_LIB::FilterVersion::objVs_ [private]

Object version, this is used to ensure that the object in the database and the object in the system are same.

Definition at line 1562 of file filter.h.

Oid OSB_LIB::FilterVersion::oid_ [private]

Unique object id for the filter version object.

Definition at line 1556 of file filter.h.

Date OSB_LIB::FilterVersion::releaseDate_ [private]

Release date of this filter version object.

Definition at line 1571 of file filter.h.

CfgStatus OSB_LIB::FilterVersion::status_ [private]

Status of the object.

Definition at line 1568 of file filter.h.


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