00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _BALANCESHEET_I_H_
00033 #define _BALANCESHEET_I_H_
00034
00035
00036 #include "balancesheetS.h"
00037 #include "servantlocators.h"
00038 #include "balancesheet.h"
00039
00040 namespace OSB_LIB {
00041 class BsPage;
00042 class BsTotal;
00043 class BalanceSheet;
00044 struct OnetimeCharge;
00045 }
00046
00047 namespace OSB_CORBA {
00048 class ContractAdmin_i;
00049 }
00050
00051 namespace OSB_CORBA {
00052 using namespace corba::cadmin::contract;
00053
00054 using corba::cadmin::BsPageId;
00055 using corba::cadmin::OtcId;
00056 using corba::cadmin::PersProdId;
00057 using corba::common::Date;
00058 using corba::common::DateTime;
00059 using corba::common::OsbCorbaException;
00060 using corba::common::Utf8String;
00061 using corba::pcat::pp::ProductPartId;
00062
00063 class BsPageWriter_i :
00064 public virtual POA_corba::cadmin::contract::BsPageWriter
00065 {
00066 public :
00067
00068 static const std::string IFC;
00069
00070
00071 BsPageWriter_i(
00072 ContractAdmin_i& cadmin,
00073 OSB_LIB::BalanceSheet& bs,
00074 const OSB_LIB::BsPage::Oid& page
00075 );
00076
00078 ~BsPageWriter_i();
00079
00081 const Locators::Key& key() const
00082 {
00083 return key_;
00084 }
00085
00087 const OSB_LIB::BsPage& page() const
00088 throw (OsbCorbaException);
00089
00091 OSB_LIB::BsPage& page()
00092 throw (OsbCorbaException);
00093
00095 virtual BsPageId id()
00096 throw (CORBA::SystemException);
00097
00099 virtual BpStatus status()
00100 throw (CORBA::SystemException, OsbCorbaException);
00101
00103 virtual void setRerate(
00104 CORBA::Boolean noWait
00105 ) throw (CORBA::SystemException, OsbCorbaException);
00106
00108 virtual void setDontBill(
00109 CORBA::Boolean noWait
00110 ) throw (CORBA::SystemException, OsbCorbaException);
00111
00113 virtual void setNormal(
00114 CORBA::Boolean noWait
00115 ) throw (CORBA::SystemException, OsbCorbaException);
00116
00118 virtual DateTime* opened()
00119 throw (CORBA::SystemException, OsbCorbaException);
00120
00122 virtual DateTime* closed()
00123 throw (CORBA::SystemException, OsbCorbaException);
00124
00126 virtual Date startDate()
00127 throw (CORBA::SystemException, OsbCorbaException);
00128
00130 virtual Date endDate()
00131 throw (CORBA::SystemException, OsbCorbaException);
00132
00134 virtual DateTime* lastCharged()
00135 throw (CORBA::SystemException, OsbCorbaException);
00136
00138 virtual BsTotal* charges()
00139 throw (CORBA::SystemException, OsbCorbaException);
00140
00142 virtual OnetimeCharge* getOnetimeCharge(
00143 const OtcId& id,
00144 CORBA::Boolean noWait
00145 ) throw (CORBA::SystemException, OsbCorbaException);
00146
00148 virtual OnetimeChargeSeq* getOnetimeCharges(
00149 CORBA::Boolean noWait
00150 ) throw (CORBA::SystemException, OsbCorbaException);
00151
00156 virtual OnetimeChargeSeq* getOtcOfPersProd(
00157 const PersProdId& ppId,
00158 CORBA::Boolean noWait
00159 ) throw (CORBA::SystemException, OsbCorbaException);
00160
00162 virtual OnetimeChargeSeq* getOtcOfPersProdNode(
00163 const ProductPartId& ppId,
00164 CORBA::Boolean noWait
00165 ) throw (CORBA::SystemException, OsbCorbaException);
00166
00168 virtual AdvanceChargeSeq* getAdvanceCharges()
00169 throw (CORBA::SystemException);
00170
00172 virtual CORBA::Boolean removeOtc(
00173 const OtcId& id,
00174 CORBA::Boolean noWait
00175 ) throw (CORBA::SystemException, OsbCorbaException);
00176
00177 private:
00179 ContractAdmin_i& cadmin_;
00180
00182 OSB_LIB::BalanceSheet& bs_;
00183
00185 OSB_LIB::BsPage::Oid pageId_;
00186
00188 Locators::Key key_;
00189 };
00190
00191 class BalanceSheetWriter_i :
00192 public virtual POA_corba::cadmin::contract::BalanceSheetWriter
00193 {
00194 public :
00195
00196 static const std::string IFC;
00197
00199 BalanceSheetWriter_i(
00200 ContractAdmin_i& cadmin,
00201 const OSB_LIB::BalanceSheet& bs
00202 );
00203
00205 ~BalanceSheetWriter_i();
00206
00208 const Locators::Key& key() const
00209 {
00210 return key_;
00211 }
00212
00214 virtual BsPageWriter_ptr getBsPage(
00215 const BsPageId& id
00216 ) throw (CORBA::SystemException, OsbCorbaException);
00217
00219 virtual BsPageSeq* getBsPages()
00220 throw (CORBA::SystemException, OsbCorbaException);
00221
00223 virtual BsTotal* totalCharges()
00224 throw (CORBA::SystemException);
00225
00227 virtual BsPageId addOtc(
00228 const OnetimeCharge& otc,
00229 CORBA::Boolean noWait
00230 ) throw (CORBA::SystemException, OsbCorbaException);
00231
00233 virtual CORBA::Boolean hasOtc()
00234 throw (CORBA::SystemException);
00235
00237 virtual CORBA::Boolean hasAdvCharges()
00238 throw (CORBA::SystemException);
00239
00240 private:
00242 typedef std::list<Locators::Key> Servants;
00243
00245 ContractAdmin_i& cadmin_;
00246
00248 OSB_LIB::BalanceSheet bs_;
00249
00251 Locators::Key key_;
00252
00254 Servants bpServants_;
00255 };
00256
00257
00258 OnetimeCharge otc(
00259 const OSB_LIB::OnetimeCharge& otc,
00260 bool noWait
00261 ) throw (OsbCorbaException);
00262
00263
00264 AdvanceCharge adv(const OSB_LIB::AdvanceCharge& adv);
00265
00266
00267 BsTotal* bsTotal(
00268 const OSB_LIB::BsTotal& bs);
00269
00270
00271
00272 BpStatus bpStatus(const OSB_LIB::BsPage::Status& stat);
00273 }
00274 #endif // #ifndef _BALANCESHEET_I_H_