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
00034 #ifndef _ANCLIST_I_H_
00035 #define _ANCLIST_I_H_
00036
00037
00038
00039
00040
00041
00042
00043
00044 #include "anclistS.h"
00045 #include "servantlocators.h"
00046
00047
00048 namespace OSB_LIB {
00049 class AnCList;
00050 class Contract;
00051 class Associate;
00052 }
00053
00054 namespace OSB_CORBA {
00055 class AssociateWriter_i;
00056 class ContractAdmin_i;
00057 class ContractWriter_i;
00058 class PersProductWriter_i;
00059 }
00060
00061
00062
00063 namespace OSB_CORBA {
00064 using namespace corba::cadmin::assoc;
00065 using namespace corba::cadmin::contract;
00066
00067 using corba::cadmin::AnCFilter;
00068 using corba::cadmin::AnCList;
00069 using corba::cadmin::AssociateId;
00070 using corba::cadmin::ContractId;
00071 using corba::common::OsbCorbaException;
00072 using corba::common::Utf8String;
00073
00074
00075
00076 class AnCList_i : public virtual POA_corba::cadmin::AnCList
00077 {
00078 public:
00079 static const std::string IFC;
00080
00082 explicit AnCList_i(
00083 ContractAdmin_i& cadmin
00084 );
00085
00087 virtual ~AnCList_i();
00088
00089 private:
00091 AnCList_i(const AnCList_i&);
00093 AnCList_i& operator=(const AnCList_i&);
00094
00095 public:
00097 virtual CORBA::Long numAssoc() throw();
00099 virtual CORBA::Long numContract() throw();
00110 virtual CORBA::Long search(
00111 AnCFilter& filter
00112 ) throw (CORBA::SystemException, OsbCorbaException);
00120 virtual void refresh(
00121 CORBA::Boolean noWait
00122 ) throw (CORBA::SystemException, OsbCorbaException);
00123
00124 public:
00135 virtual AssociateWriter_ptr getAssociate(
00136 const AssociateId& id,
00137 CORBA::Boolean noWait
00138 ) throw (CORBA::SystemException, OsbCorbaException);
00139
00141 virtual AssociateIdSeq* getAssociateIds()
00142 throw (CORBA::SystemException);
00144 virtual AssociateSeq* getAssociates()
00145 throw (CORBA::SystemException, OsbCorbaException);
00146
00147 public:
00163 virtual AssociateWriter_ptr newAssociate(
00164 AssociateType type
00165 ) throw (CORBA::SystemException, OsbCorbaException);
00166
00177 virtual CORBA::Boolean delAssociate(
00178 const AssociateId& id,
00179 CORBA::Boolean noWait
00180 ) throw (CORBA::SystemException, OsbCorbaException);
00181
00182 public:
00192 virtual ContractWriter_ptr getContract(
00193 const ContractId& id
00194 ) throw (CORBA::SystemException, OsbCorbaException);
00195
00203 virtual ContractSeq* getContracts(
00204 const ContractIdSeq& idList
00205 ) throw (CORBA::SystemException, OsbCorbaException);
00206
00208 virtual ContractIdSeq* getContractIds()
00209 throw (CORBA::SystemException);
00210
00212 virtual ContractSeq* getAllContracts()
00213 throw (CORBA::SystemException, OsbCorbaException);
00214
00215 public:
00230 ContractWriter_ptr newContract(
00231 AccountingType acctType
00232 ) throw (CORBA::SystemException, OsbCorbaException);
00233
00246 virtual CORBA::Boolean delContract(
00247 const ContractId& cId,
00248 CORBA::Boolean noWait
00249 ) throw (CORBA::SystemException, OsbCorbaException);
00250
00252 const Locators::Key& key() const
00253 {
00254 return key_;
00255 }
00256
00257 private:
00258 friend class AssociateWriter_i;
00259 friend class ContractWriter_i;
00260 friend class PersProductWriter_i;
00261
00263 ContractAdmin_i& cadmin() const
00264 {
00265 return cadmin_;
00266 }
00267
00269 OSB_LIB::AnCList& ancList()
00270 {
00271 return *ancList_;
00272 }
00273
00274 private:
00283 AssociateWriter_ptr makeAssociate(
00284 const OSB_LIB::Associate* assoc
00285 ) throw (CORBA::SystemException, OsbCorbaException);
00286
00292 ContractWriter_ptr makeContract(
00293 const OSB_LIB::Contract& co
00294 ) throw (CORBA::SystemException, OsbCorbaException);
00295
00296 private:
00298 ContractAdmin_i& cadmin_;
00299
00301 OSB_LIB::AnCList* ancList_;
00302
00304 Locators::Key key_;
00305
00306 private:
00319
00320
00321
00322
00323
00324
00325
00336
00337
00338
00339
00340
00341
00342 };
00343
00344
00345 }
00346 #endif // #ifndef _ANCLIST_I_H_