persprodnode_i.h

Go to the documentation of this file.
00001 // OSB library ************************************************ -*- C++ -*-
00009 /*
00010   AUTHOR(S): Darryl Kang (dk)
00011 
00012   RCS information
00013    $Name: OSB_060808 $
00014    $Revision: 1.36 $
00015 
00016   License
00017    OSB rating and billing library for communication networks
00018    Copyright (C) 2004, 2005, 2006  OSB systems
00019 
00020    This file may be distributed and/or modify under the terms of the
00021    GNU General Public License (GPL) as published by the Free Software
00022    Foundation which is provided in the file LICENSE.GPL included in the
00023    packaging of this file.
00024 
00025    The file is distributed in the hope that it will be useful, but WITHOUT
00026    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00027    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00028    for more details.
00029 
00030    Holders of a OSB Commercial License may use this file under the terms
00031    and conditions of this commercial license.
00032  */
00033 #ifndef _PERSPRODNODE_I_H_
00034 #define _PERSPRODNODE_I_H_
00035 
00036 // ************************************************************************
00037 // included header files
00038 // + standard includes
00039 
00040 // + libraries
00041 
00042 // + local headers
00043 #include "persprodnodeS.h"
00044 #include "servantlocators.h"
00045 
00046 // + class declarations
00047 namespace OSB_LIB {
00048     class PersProduct;
00049     class PersProductNode;
00050     class ProductNode;
00051 }
00052 
00053 namespace OSB_CORBA {
00054     class ContractAdmin_i;
00055     class PersProductWriter_i;
00056 }
00057 
00058 // ************************************************************************
00059 // namespace extensions
00060 namespace OSB_CORBA {
00061     using namespace corba::cadmin::persproditem;
00062     using namespace corba::cadmin::persprodnode;
00063 
00064     using corba::cadmin::PersItemId;
00065     using corba::cadmin::PersNodeId;
00066     using corba::cadmin::Status;
00067     using corba::cadmin::StatusHistory;
00068     using corba::cadmin::StatusRequest;
00069     using corba::cadmin::StatusValue;
00070     using corba::common::CfgErrorSeq_out;
00071     using corba::common::DateTime;
00072     using corba::common::Utf8String;
00073     using corba::pcat::pp::PpTypeId;
00074     using corba::pcat::pp::ProductPartId;
00075 
00079     class PersProdNodeWriter_i :
00080         public virtual POA_corba::cadmin::persprodnode::PersProdNodeWriter
00081     {
00082     public :
00083 
00084         static const std::string IFC;
00085 
00087         PersProdNodeWriter_i (
00088                   ContractAdmin_i&          cadmin,
00089                   PersProductWriter_i&      ppServant,
00090             const OSB_LIB::ProductNode*     pn,
00091                   OSB_LIB::PersProductNode* ppn
00092         );
00093 
00094         virtual ~PersProdNodeWriter_i();
00095 
00096     public:
00098         const Locators::Key& key() const
00099         {
00100             return key_;
00101         }
00102 
00104         virtual PersNodeId id()
00105             throw (CORBA::SystemException);
00106 
00108         virtual ProductPartId prodPartId()
00109             throw (CORBA::SystemException);
00110 
00112         virtual Utf8String* name()
00113             throw (CORBA::SystemException, OsbCorbaException);
00114 
00119         virtual Utf8String* desc()
00120             throw (CORBA::SystemException, OsbCorbaException);
00121 
00123         virtual PpTypeId type()
00124             throw (CORBA::SystemException, OsbCorbaException);
00125 
00127         virtual DateTime* createdDate()
00128             throw (CORBA::SystemException);
00129 
00131         virtual Status effStatus()
00132             throw (CORBA::SystemException);
00133 
00135         virtual Status prefStatus()
00136             throw (CORBA::SystemException);
00137 
00139         virtual DateTime* effStatusDate()
00140             throw (CORBA::SystemException);
00141 
00143         virtual DateTime* prefStatusDate()
00144             throw (CORBA::SystemException);
00145 
00157         virtual StatusValue requestedStatus(
00158             const DateTime& ts
00159         ) throw (CORBA::SystemException, OsbCorbaException);
00160 
00173         StatusHistory* statusHistory(
00174             const DateTime& from,
00175             const DateTime& to,
00176             CORBA::Boolean  noWait
00177         ) throw (CORBA::SystemException, OsbCorbaException);
00178 
00182         virtual PersProdItemSeq* getConfigs()
00183             throw (CORBA::SystemException, OsbCorbaException);
00184 
00192         virtual PersProdItemWriter* getConfig(
00193             const PersItemId& id
00194         ) throw (CORBA::SystemException, OsbCorbaException);
00195 
00197         virtual PersProdItemWriter* currentConfig()
00198             throw (CORBA::SystemException, OsbCorbaException);
00199 
00213         virtual PersProdItemWriter_ptr creNewConfig()
00214             throw (CORBA::SystemException, OsbCorbaException);
00215 
00226         virtual CORBA::Boolean removeConfig(
00227             const PersItemId& id,
00228             CORBA::Boolean noWait
00229         ) throw (CORBA::SystemException, OsbCorbaException);
00230 
00231     private:
00237         OSB_LIB::PersProduct* persProduct();
00238 
00239     private:
00241         typedef std::list<Locators::Key> Servants;
00242 
00244         ContractAdmin_i& cadmin_;
00246         PersProductWriter_i& ppServant_;
00247 
00249         const OSB_LIB::ProductNode* pn_;
00250 
00252         OSB_LIB::PersProductNode* ppn_;
00253 
00255         Servants ppiServants_;
00256 
00258         Locators::Key key_;
00259     };                                  // PersProdNodeWriter_i
00260 }                                       // namespace OSB_CORBA
00261 #endif                                 // #ifndef _ASSOCIATE_I_H_

Generated on Sat Sep 2 14:25:52 2006 for OSB Library by  doxygen 1.4.7