OSB_LIB::RpEvalMgr Class Reference

Collaboration diagram for OSB_LIB::RpEvalMgr:

Collaboration graph
[legend]
List of all members.

Detailed Description

List of rateable parties.

For each Cdr::UsageType the class stores a list of rated party evaluators (RatedPartyEval) for that usage type.

A dedicated configuration can be defined for each network and element. Rating will use the most specialized configuration to determine the rated parties.

Definition at line 78 of file rpevalmgr.h.

Public Types

Public Member Functions

Support for the rating application:
Support for GUI applications:

Private Types

Private Member Functions

Private Attributes

Friends

Classes


Member Typedef Documentation

typedef std::map<NeId, UsgEvalMap> OSB_LIB::RpEvalMgr::EvalMap

Rated party evaluators by network and network element.

The key of the map may not be set at all, i.e., the default configuration; or only have the network set, i.e., the default configuration for all elements of this network.

Definition at line 109 of file rpevalmgr.h.

typedef std::map<NeId, ModInfo> OSB_LIB::RpEvalMgr::ModInfos [private]

Definition at line 328 of file rpevalmgr.h.

typedef Id2<NetworkElement> OSB_LIB::RpEvalMgr::NeId

Short-hand for a network element id.

Definition at line 101 of file rpevalmgr.h.

typedef std::map<RpType, RatedPartyEval*> OSB_LIB::RpEvalMgr::RpEvals

Map of rated party evaluators.

Definition at line 88 of file rpevalmgr.h.

typedef TypeId<RatedParty> OSB_LIB::RpEvalMgr::RpType

Short-hand for type of a rated party.

Definition at line 83 of file rpevalmgr.h.

typedef std::map<UsgType, RpEvals> OSB_LIB::RpEvalMgr::UsgEvalMap

Rated party evaluators for one usage type.

Note:
The definition implies that for each usage type the rated party type is unique which matches common sense.
A wellcome side-effect of this that the id of the rated party evaluator needn't be stored in Cdr.

Definition at line 99 of file rpevalmgr.h.

typedef TypeId<Cdr, 1> OSB_LIB::RpEvalMgr::UsgType

Short-hand for a CDR usage type.

Definition at line 90 of file rpevalmgr.h.


Constructor & Destructor Documentation

OSB_LIB::RpEvalMgr::RpEvalMgr (  ) 

Empty default constructor.

OSB_LIB::RpEvalMgr::~RpEvalMgr (  ) 

Destructor: delete entries in evalMap_.

OSB_LIB::RpEvalMgr::RpEvalMgr ( const RpEvalMgr  )  [private]

Prevent copying until needed: not implemented.


Member Function Documentation

void OSB_LIB::RpEvalMgr::add ( const NeId neId,
long  objVs,
const UsageType usgType,
std::auto_ptr< RatedPartyEval rpEval 
) [private]

Add a rated party evaluator.

Parameters:
neId Id of the network and element for the evaluator.
It needn't be set.
objVs Object version for neId.
usgType Usage type for which the evaluator is valid.
rpEval Rated party evaluator to add, it must not be 0.
Exceptions:
EvalExists if an evaluator is already defined for the usage and rated party type (not the evaluator's type).
This member is called from the gateway when reading the configuration from the database.

Note:
Use replace() and remove() to configure the list.

void OSB_LIB::RpEvalMgr::clear (  ) 

Clear the map rated party evaluators.

const RatedPartyEval* OSB_LIB::RpEvalMgr::find ( const NeId neId,
const UsgType usgType,
const RpType rpType 
) const

Get the rated party evaluator for a usage type and rated party type.

Parameters:
neId The id of the network element,
see find(const NeId&) for details.
usgType Usage type for which the get the evaluator.
rpType The rated party for which to get the evaluator.
Returns:
The evaluator for neId, usgType and rpType,
note that it may be 0.

const RpEvals* OSB_LIB::RpEvalMgr::find ( const NeId neId,
const UsgType usgType 
) const

Get the rated party evaluators for a usage type.

Parameters:
neId The id of the network element,
see find(const NeId&) for details.
usgType Usage type for which the get list.
Returns:
Map of rated party evaluators, all pointers are valid. Note however that the map itself may be empty.

const UsgEvalMap* OSB_LIB::RpEvalMgr::find ( const NeId neId  )  const

Get the rated party evaluators for all usage types of a network and/or element.

Parameters:
neId The id of the network element for which to get the rateable party configuration.
It may not be set (default configuration) or only the network may be set (default for all elements of the network).
Returns:
A map usage type (key) to rated party evaluator (data).

const RatedPartyEval* OSB_LIB::RpEvalMgr::getEval ( const NeId neId,
const UsgType usgType,
const RpType rpType 
) const

Get the rated party evaluator for a usage and rated party type.

Parameters:
neId The id of the network element,
see getEvals() for details.
usgType Usage type for which the get the evaluator.
rpType The rated party for which to get the evaluator.
Returns:
The evaluator for neId, usgType and rpType,
note that it may be 0.
See also:
getEvals().

const RpEvals* OSB_LIB::RpEvalMgr::getEvals ( const NeId neId,
const UsgType usgType 
) const

Get the rated party evaluators for a usage type.

Parameters:
neId The id of the network element for which to get the rateable party configuration.
It may not be set (default configuration) or only the network may be set (default for all elements of the network).
usgType Usage type for which the get list.
Returns:
The map of rated party evaluators applicable for neId and usgType, 0 if no suitable configuration exists, see below.
Note:
The function searches for the default configuration only if no specialized configuration for the network and/or element exists.

RpEvalMgr& OSB_LIB::RpEvalMgr::operator= ( const RpEvalMgr  )  [private]

Prevent assignment until needed: not implemented.

void OSB_LIB::RpEvalMgr::read ( const OSB_DB::Session session  ) 

Read the whole rating configuration from the database.

Parameters:
session Database session to use.
Exceptions:
OsbException if the type of a rated party evaluator is not valid.

void OSB_LIB::RpEvalMgr::remove ( const NeId neId,
const UsageType usgType,
const RpType rpType 
)

Remove a rated party evaluator.

Parameters:
neId Id of the network and element for the evaluator.
It needn't be set.
usgType Usage type for which to remove the evaluator.
rpType The rated party type for which to remove the evaluator.

void OSB_LIB::RpEvalMgr::replace ( const NeId neId,
const UsageType usgType,
std::auto_ptr< RatedPartyEval rpEval 
)

Replace a rated party evaluator.

Parameters:
neId Id of the network and element for the evaluator.
It needn't be set.
usgType Usage type for which the evaluator is valid.
rpEval Rated party evaluator to replace, it must not be 0.

bool OSB_LIB::RpEvalMgr::resourceCacheNeeded (  )  const

Resource cache needed?

Returns:
true if any of the configured evaluators needs the resource cache, else false.
See also:
RatedPartyEval::requiresCache().

void OSB_LIB::RpEvalMgr::save ( const OSB_DB::Session session  ) 

Store the rating configuration to the database.

Parameters:
session Database session to use.


Friends And Related Function Documentation

friend class OSB_DB::RpEvalGw [friend]

Allow the gateway to call add().

Definition at line 80 of file rpevalmgr.h.


Member Data Documentation

EvalMap OSB_LIB::RpEvalMgr::evalMap_ [private]

Map usage type -> rated party pickers.

Definition at line 332 of file rpevalmgr.h.

ModInfos OSB_LIB::RpEvalMgr::modInfo_ [private]

Modification status by network element.

Definition at line 334 of file rpevalmgr.h.


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