00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef _PERSPRODITEM_I_H_
00034 #define _PERSPRODITEM_I_H_
00035
00036
00037
00038
00039 #include <memory>
00040
00041
00042 #include <e164item.h>
00043 #include <resourcelists.h>
00044
00045
00046 #include "persproditemS.h"
00047 #include "servantlocators.h"
00048
00049
00050 namespace OSB_LIB {
00051 class ProductItem;
00052 class PersProduct;
00053 class PersProductItem;
00054 class PersTariffSystem;
00055 class ResourceLists;
00056 }
00057
00058 namespace OSB_CORBA {
00059 class ContractAdmin_i;
00060 class PersProductWriter_i;
00061 }
00062
00063
00064
00065 namespace OSB_CORBA {
00066
00067 using namespace corba::cadmin::persproditem;
00068 using namespace corba::common;
00069
00070 using corba::cadmin::PersItemId;
00071 using corba::tcat::ts::TariffSystemId;
00072 using corba::tcat::ts::TariffSystem;
00073 using corba::tcat::ts::TariffSystemSeq;
00074 using corba::pcat::pp::PpTypeId;
00075
00076 class PersProdItemWriter_i :
00077 public virtual POA_corba::cadmin::persproditem::PersProdItemWriter
00078 {
00079 public:
00080 static const std::string IFC;
00081
00082 public:
00084 PersProdItemWriter_i (
00085 ContractAdmin_i& cadmin,
00086 PersProductWriter_i& ppServant,
00087 const OSB_LIB::ProductNode* pn,
00088 std::auto_ptr<OSB_LIB::PersProductItem> ppi
00089 );
00090
00091 virtual ~PersProdItemWriter_i();
00092
00093 private:
00095 PersProdItemWriter_i(const PersProdItemWriter_i&);
00097 PersProdItemWriter_i& operator=(const PersProdItemWriter_i&);
00098
00099 public:
00101 const Locators::Key& key() const
00102 {
00103 return key_;
00104 }
00105
00107 virtual PersItemId id() throw ();
00108
00113 virtual Utf8String* name()
00114 throw (OsbCorbaException);
00115
00120 virtual Utf8String* desc()
00121 throw (OsbCorbaException);
00122
00124 virtual DateTime* assignDate() throw ();
00125
00127 virtual DateTime* deassignDate() throw ();
00128
00130 virtual PpTypeId type() throw ();
00131
00133 virtual Utf8String* personalization() throw ();
00134
00136 virtual CORBA::Boolean canConfig() throw ();
00137
00151 virtual PersItemId create(
00152 CORBA::Boolean noWait
00153 ) throw (OsbCorbaException);
00154
00168 virtual PersItemId commitChanges(
00169 CORBA::Boolean noWait
00170 ) throw (OsbCorbaException);
00171
00185 void checkRefUsage() throw (OsbCorbaException);
00186
00196 virtual void checkConfig() throw (OsbCorbaException) = 0;
00197
00198 protected:
00204 OSB_LIB::PersProduct* persProduct();
00205
00206 protected:
00208 ContractAdmin_i& cadmin_;
00210 PersProductWriter_i& ppServant_;
00211
00216 const OSB_LIB::ProductNode* pn_;
00217
00219 OSB_LIB::PersProductItem* ppi_;
00220
00222 Locators::Key key_;
00223 };
00224
00225
00226
00227 class PersServiceWriter_i :
00228 public virtual POA_corba::cadmin::persproditem::PersServiceWriter,
00229 public virtual PersProdItemWriter_i
00230 {
00231 public:
00232
00233 static const std::string IFC;
00234
00235 PersServiceWriter_i(
00236 ContractAdmin_i& cadmin,
00237 PersProductWriter_i& ppServant,
00238 const OSB_LIB::ProductNode* pn,
00239 std::auto_ptr<OSB_LIB::PersProductItem> ppi
00240 ) : PersProdItemWriter_i(cadmin, ppServant, pn, ppi)
00241 {
00242
00243 }
00244
00251 void checkConfig() throw (OsbCorbaException);
00252 };
00253
00254
00255
00256 class PersTariffSystemWriter_i :
00257 public virtual POA_corba::cadmin::persproditem::PersTariffSystemWriter,
00258 public virtual PersProdItemWriter_i
00259 {
00260 public:
00261
00262 static const std::string IFC;
00263
00264 PersTariffSystemWriter_i(
00265 ContractAdmin_i& cadmin,
00266 PersProductWriter_i& ppServant,
00267 const OSB_LIB::ProductNode* pn,
00268 std::auto_ptr<OSB_LIB::PersProductItem> ppi
00269 ) : PersProdItemWriter_i(cadmin, ppServant, pn, ppi)
00270 {
00271
00272 }
00273
00275 OSB_LIB::PersTariffSystem* persTs()
00276 throw (OsbCorbaException);
00277
00285 virtual TariffSystem* ts()
00286 throw (OsbCorbaException);
00287
00289 virtual TariffSystemSeq* tsList()
00290 throw (OsbCorbaException);
00291
00300 virtual void setTsId(
00301 const TariffSystemId& id
00302 ) throw (OsbCorbaException);
00303
00313 void checkConfig() throw (OsbCorbaException);
00314 };
00315
00316
00317
00318 class PersResource_i :
00319 public virtual POA_corba::cadmin::persproditem::PersResource,
00320 public virtual PersProdItemWriter_i
00321 {
00322 public:
00323
00324 static const std::string IFC;
00325
00326 PersResource_i(
00327 ContractAdmin_i& cadmin,
00328 PersProductWriter_i& ppServant,
00329 const OSB_LIB::ProductNode* pn,
00330 std::auto_ptr<OSB_LIB::PersProductItem> ppi
00331 ) : PersProdItemWriter_i(cadmin, ppServant, pn, ppi)
00332 {
00333
00334 }
00335
00343 ResourceId rsId()
00344 throw (OsbCorbaException);
00345
00347 OSB_LIB::PersResource* persResource()
00348 throw (OsbCorbaException);
00349 };
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00380
00381
00382
00389
00390
00391
00392
00393
00394 class PersE164Writer_i :
00395 public virtual POA_corba::cadmin::persproditem::PersE164Writer,
00396 public virtual PersResource_i
00397 {
00398 public:
00400 static const std::string IFC;
00401
00402 public:
00408 PersE164Writer_i(
00409 ContractAdmin_i& cadmin,
00410 PersProductWriter_i& ppServant,
00411 const OSB_LIB::ProductNode* pn,
00412 std::auto_ptr<OSB_LIB::PersProductItem> ppi
00413 ) throw (OsbCorbaException);
00414
00415 public:
00425 void checkConfig() throw (OsbCorbaException);
00426
00428 BasicResInfo* e164Number()
00429 throw (OsbCorbaException);
00430
00432 BasicResSeq* search(
00433 const Utf8String& pattern,
00434 int numSearch
00435 ) throw (OsbCorbaException);
00436
00445 CORBA::Boolean setE164Number(
00446 const ResourceId& id
00447 ) throw (OsbCorbaException);
00448
00449 private:
00451 OSB_LIB::PersE164Item* persE164()
00452 throw (OsbCorbaException);
00453
00454 private:
00456 typedef OSB_LIB::ResourceList<OSB_LIB::E164Resource> E164List;
00462 E164List e164s_;
00463 };
00464
00465
00466
00467 class PersTrunkItemWriter_i :
00468 public virtual POA_corba::cadmin::persproditem::PersTrunkItemWriter,
00469 public virtual PersResource_i
00470 {
00471 public:
00472
00473 static const std::string IFC;
00474
00475 PersTrunkItemWriter_i(
00476 ContractAdmin_i& cadmin,
00477 PersProductWriter_i& ppServant,
00478 const OSB_LIB::ProductNode* pn,
00479 std::auto_ptr<OSB_LIB::PersProductItem> ppi
00480 ) throw (OsbCorbaException);
00481
00482 ~PersTrunkItemWriter_i();
00483
00490 virtual TrkResInfo* trkResource(
00491 const OSB_LIB::TrunkResource* trkres
00492 ) throw (OsbCorbaException);
00493
00495 virtual TrkResInfo* trkRes()
00496 throw (OsbCorbaException);
00497
00499 virtual TrkResInfoSeq* trkResList()
00500 throw (OsbCorbaException);
00501
00503 virtual CORBA::Boolean setTrkRes(
00504 const ResourceId& id
00505 ) throw (OsbCorbaException);
00506
00508 OSB_LIB::PersTrunk* persTrunk()
00509 throw (OsbCorbaException);
00510
00520 void checkConfig() throw (OsbCorbaException);
00521
00522 private:
00529 OSB_LIB::ResourceLists* resList_;
00530 };
00531
00532
00533
00534 class PersIpGroupItemWriter_i :
00535 public virtual POA_corba::cadmin::persproditem::PersIpGroupItemWriter,
00536 public virtual PersResource_i
00537 {
00538 public:
00539
00540 static const std::string IFC;
00541
00542 PersIpGroupItemWriter_i(
00543 ContractAdmin_i& cadmin,
00544 PersProductWriter_i& ppServant,
00545 const OSB_LIB::ProductNode* pn,
00546 std::auto_ptr<OSB_LIB::PersProductItem> ppi
00547 ) throw (OsbCorbaException);
00548
00549 ~PersIpGroupItemWriter_i();
00550
00557 virtual IpGroupInfo* ipGroup(
00558 const OSB_LIB::IpGroup* grp
00559 ) throw (OsbCorbaException);
00560
00562 virtual IpGroupInfo* ipGroup()
00563 throw (OsbCorbaException);
00564
00566 virtual IpGroupSeq* ipGroupList()
00567 throw (OsbCorbaException);
00568
00570 virtual CORBA::Boolean setIpGroup(
00571 const ResourceId& id
00572 ) throw (OsbCorbaException);
00573
00575 OSB_LIB::PersIpGroup* persIpGroup()
00576 throw (OsbCorbaException);
00577
00587 void checkConfig() throw (OsbCorbaException);
00588
00589 private:
00596 OSB_LIB::ResourceLists* resList_;
00597 };
00598
00599
00600
00601 class PersAnItemWriter_i :
00602 public virtual POA_corba::cadmin::persproditem::PersAnItemWriter,
00603 public virtual PersResource_i
00604 {
00605 public:
00606
00607 static const std::string IFC;
00608
00609 PersAnItemWriter_i(
00610 ContractAdmin_i& cadmin,
00611 PersProductWriter_i& ppServant,
00612 const OSB_LIB::ProductNode* pn,
00613 std::auto_ptr<OSB_LIB::PersProductItem> ppi
00614 ) throw (OsbCorbaException);
00615
00616 ~PersAnItemWriter_i();
00617
00624 virtual BasicResInfo* accessNumber(
00625 const OSB_LIB::AccessNumber* an);
00626
00628 virtual BasicResInfo* aNum()
00629 throw (OsbCorbaException);
00630
00632 virtual BasicResSeq* anList() throw ();
00633
00635 virtual CORBA::Boolean setAn(
00636 const ResourceId& id
00637 ) throw (OsbCorbaException);
00638
00640 OSB_LIB::PersAn* persAn()
00641 throw (OsbCorbaException);
00642
00652 void checkConfig() throw (OsbCorbaException);
00653
00654 private :
00661 OSB_LIB::ResourceLists* resList_;
00662 };
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00686
00687
00688
00697
00698
00699
00711
00712
00713
00714
00715
00716
00728
00729
00730
00731
00732
00733
00740
00741
00742
00743
00744
00745 class PpiServantFactory {
00746 public:
00747 PersProdItemWriter_i* makePpiWriter(
00748 ContractAdmin_i& cadmin,
00749 PersProductWriter_i& ppServant,
00750 const OSB_LIB::ProductNode* pn,
00751 std::auto_ptr<OSB_LIB::PersProductItem> ppi
00752 ) throw (OsbCorbaException);
00753 };
00754
00755
00756
00757
00758 }
00759
00760 #endif // #ifndef _PERSPRODITEM_I_H_