OSB_CORBA::Product_i Class Reference

Inheritance diagram for OSB_CORBA::Product_i:

Inheritance graph
[legend]
Collaboration diagram for OSB_CORBA::Product_i:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition of the Product_i interface.

This interface defines the methods needed for the handling of products. Product_i inherits from POA_corbapcat::pd::Product and implements this abstract skeleton class.

Definition at line 77 of file product_i.h.

Public Member Functions

Product_i member accessors.
These methods provide readonly access to the attributes of the product interface, which Product_i implements.

Methods for ProductPart handling.

Static Public Attributes

Protected Types

Protected Member Functions

Protected Attributes

Private Member Functions

Private Attributes

Friends

Classes


Member Typedef Documentation

typedef OSB_LIB::Guard OSB_CORBA::Product_i::Guard [protected]

Definition at line 215 of file product_i.h.

typedef Locators::Key OSB_CORBA::Product_i::ServantKey [protected]

Definition at line 216 of file product_i.h.

typedef std::list<ServantListElement> OSB_CORBA::Product_i::ServantList [protected]

Definition at line 226 of file product_i.h.


Constructor & Destructor Documentation

OSB_CORBA::Product_i::Product_i ( ProductCatalogue_i pcati,
const OSB_LIB::Product::Oid pdId,
PortableServer::POA_ptr  ppPoa 
)

Constructor.

virtual OSB_CORBA::Product_i::~Product_i (  )  [virtual]

Destructor.

When the destructor is called, the product's servant list is emptied and all the part servants are destroyed.


Member Function Documentation

void OSB_CORBA::Product_i::deleteServants (  ) 

Delete all product part servants.

Unregisters all part servants in the part servant locator and deletes them afterwards.

virtual Utf8String* OSB_CORBA::Product_i::desc (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Accessor for getting the description of the Product_i.

Returns:
The description of the Product_i.
Exceptions:
OsbCorbaException 
  • in case readlock of product in catalogue fails.

virtual Date OSB_CORBA::Product_i::endDate (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Accessor for getting the end date of the Product_i.

Returns:
The end date of the Product_i.
Exceptions:
OsbCorbaException 
  • in case readlock of product in catalogue fails.

virtual ProductPart_ptr OSB_CORBA::Product_i::getPart ( const ProductPartId &  id  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get a product part by id.

Parameters:
id The product part id.
Returns:
Reference to the product part.
Exceptions:
OsbCorbaException 
  • in case the part does not exist.
  • in case the servant cannot be created.

virtual ProductPartSeq* OSB_CORBA::Product_i::getParts (  )  throw (CORBA::SystemException) [virtual]

Get the product's first level parts.

Returns:
A sequence of first level product parts.

virtual ProductPart_ptr OSB_CORBA::Product_i::getPartServant ( const OSB_LIB::Product::Oid pId,
const OSB_LIB::ProductNode node 
) throw (OsbCorbaException) [virtual]

Gets a reference to the product part by searching the servantlist.

Checks if a product part is already in the servant list. If it is, a reference to the product part is returned. If it is not, The product part is retrieved from `pd' and pushed into the servant list.

Parameters:
pId The product id of the part. It must be readlocked before this method is called.
node The ProductNode.
Returns:
Reference to the product part.
Exceptions:
OsbCorbaException 
  • in case the part does not exist.
  • in case the servant cannot be created.

virtual ProductWriter_ptr OSB_CORBA::Product_i::getWriter (  )  throw (CORBA::SystemException) [virtual]

Get a Writable interface for this Product.

This method returns a reference to the ProductWriter interface that belongs to the product. Every client that wants to modify a product must first call this method.

Returns:
The reference to the ProductWriter interface.

virtual ProductId OSB_CORBA::Product_i::id (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Accessor for getting the id of the Product_i.

Returns:
The id of the Product_i.
Exceptions:
OsbCorbaException (Never thrown).

virtual Guard OSB_CORBA::Product_i::lock (  )  [protected, virtual]

Locks the product's private members (via a mutex).

Returns:
A guard. The guard unlocks the mutex when it goes out of scope.

virtual OSB_LIB::PcatLockMgr::ProductRg OSB_CORBA::Product_i::lockProduct (  )  throw (OsbCorbaException) [private, virtual]

Readlocks the product and returns a product readguard.

Both Product and ProductWriter must provide their own implementation of this method.

Returns:
Product readguard of the (locked) product.
Exceptions:
OsbCorbaException 
  • in case the locking fails.
Remarks:
This method must guarantee that the product pointer in the product readguard is not null.

Reimplemented in OSB_CORBA::ProductWriter_i.

virtual Utf8String* OSB_CORBA::Product_i::name (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Accessor for getting the name of the Product_i.

Returns:
The name of the Product_i.
Exceptions:
OsbCorbaException 
  • in case readlock of product in catalogue fails.

const OSB_LIB::Product::Oid& OSB_CORBA::Product_i::pdId (  )  const

Get the OSB library id of the product.

virtual ServantList::iterator OSB_CORBA::Product_i::retrieveServant ( const OSB_LIB::ProductNode::Oid nodeId  )  [protected, virtual]

Searches the servant list for a product part servant.

Parameters:
nodeId Id of the servant
Returns:
Servantlist iterator corresponding to the servant.
Remarks:
The calling method should hold the appropriate lock on the servant list before calling this method.

virtual Date OSB_CORBA::Product_i::startDate (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Accessor for getting the start date of the Product_i.

Returns:
The start date of the Product_i.
Exceptions:
OsbCorbaException 
  • in case readlock of product in catalogue fails.

virtual CfgStatus OSB_CORBA::Product_i::status (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Accessor for getting the status of the Product_i.

Returns:
The status of the Product_i.
Exceptions:
OsbCorbaException 
  • in case readlock of product in catalogue fails.


Friends And Related Function Documentation

friend struct ServantListElement [friend]

Definition at line 213 of file product_i.h.


Member Data Documentation

const std::string OSB_CORBA::Product_i::IFC [static]

String representation of Product_i.

Reimplemented in OSB_CORBA::ProductWriter_i.

Definition at line 82 of file product_i.h.

OSB_LIB::Mutex OSB_CORBA::Product_i::mutex_ [private]

Mutex for locking of this product's private member.

Definition at line 313 of file product_i.h.

ProductCatalogue_i& OSB_CORBA::Product_i::pcati_ [protected]

Catalogue containing this product and the servant locator.

Definition at line 303 of file product_i.h.

const OSB_LIB::Product::Oid OSB_CORBA::Product_i::pdId_ [private]

This product's oid.

Definition at line 311 of file product_i.h.

PortableServer::POA_ptr OSB_CORBA::Product_i::ppPoa_ [protected]

The product part POA.

Definition at line 307 of file product_i.h.

ServantList OSB_CORBA::Product_i::servantList_ [protected]

The product's servant list.

Definition at line 305 of file product_i.h.

OSB_LIB::MutexUnlock OSB_CORBA::Product_i::unlock_ [private]

Unlocks the mutex.

Definition at line 315 of file product_i.h.


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