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.
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.
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.
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.
OsbCorbaException |
|
virtual Date OSB_CORBA::Product_i::endDate | ( | ) | throw (CORBA::SystemException, OsbCorbaException) [virtual] |
Accessor for getting the end date of the Product_i.
OsbCorbaException |
|
virtual ProductPart_ptr OSB_CORBA::Product_i::getPart | ( | const ProductPartId & | id | ) | throw (CORBA::SystemException, OsbCorbaException) [virtual] |
Get a product part by id.
id | The product part id. |
OsbCorbaException |
|
virtual ProductPartSeq* OSB_CORBA::Product_i::getParts | ( | ) | throw (CORBA::SystemException) [virtual] |
Get the product's first level 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.
pId | The product id of the part. It must be readlocked before this method is called. | |
node | The ProductNode. |
OsbCorbaException |
|
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.
virtual ProductId OSB_CORBA::Product_i::id | ( | ) | throw (CORBA::SystemException, OsbCorbaException) [virtual] |
Accessor for getting the id of the Product_i.
OsbCorbaException | (Never thrown). |
virtual Guard OSB_CORBA::Product_i::lock | ( | ) | [protected, virtual] |
Locks the product's private members (via a mutex).
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.
OsbCorbaException |
|
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.
OsbCorbaException |
|
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.
nodeId | Id of the servant |
virtual Date OSB_CORBA::Product_i::startDate | ( | ) | throw (CORBA::SystemException, OsbCorbaException) [virtual] |
Accessor for getting the start date of the Product_i.
OsbCorbaException |
|
virtual CfgStatus OSB_CORBA::Product_i::status | ( | ) | throw (CORBA::SystemException, OsbCorbaException) [virtual] |
Accessor for getting the status of the Product_i.
OsbCorbaException |
|
friend struct ServantListElement [friend] |
Definition at line 213 of file product_i.h.
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] |
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] |
PortableServer::POA_ptr OSB_CORBA::Product_i::ppPoa_ [protected] |
ServantList OSB_CORBA::Product_i::servantList_ [protected] |