chargetraits_i.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00010 /*
00011   AUTHOR(S): Darryl Kang (dk)
00012 
00013   RCS information
00014    $Name: OSB_060808 $
00015    $Revision: 1.25 $
00016 
00017   License
00018    OSB rating and billing library for communication networks
00019    Copyright (C) 2004, 2005, 2006  OSB systems
00020 
00021    This file may be distributed and/or modify under the terms of the
00022    GNU General Public License (GPL) as published by the Free Software
00023    Foundation which is provided in the file LICENSE.GPL included in the
00024    packaging of this file.
00025 
00026    The file is distributed in the hope that it will be useful, but WITHOUT
00027    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00028    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00029    for more details.
00030 
00031    Holders of a OSB Commercial License may use this file under the terms
00032    and conditions of this commercial license.
00033  */
00034 
00035 #ifndef _CHARGETRAITS_I_H_
00036 #define _CHARGETRAITS_I_H_
00037 
00038 // ************************************************************
00039 #include "chargetraitsS.h"
00040 #include "chargetraits.h"
00041 #include "roundrule.h"
00042 #include "account.h"
00043 #include "osbunit.h"
00044 
00045 // ************************************************************************
00046 // namespace extensions
00047 namespace OSB_CORBA {
00048     using namespace corba::common;
00049 
00074     class Accounting_i : public virtual POA_corba::common::Accounting
00075     {
00076     public:
00077         static const std::string IFC;
00078 
00087         Accounting_i(const OSB_DB::Session& session);
00088 
00089         virtual ~Accounting_i() {};
00090 
00099         virtual ChargeTraits* getChargeTraits(
00100             const ChargeTraitsId& id
00101         ) throw (CORBA::SystemException, OsbCorbaException);
00102 
00112         virtual ChargeTraitsSeq* getChargeTraitses()
00113             throw (CORBA::SystemException, OsbCorbaException);
00114 
00123         virtual Account* getAccount(
00124             const Utf8String& accCode
00125         ) throw (CORBA::SystemException, OsbCorbaException);
00126 
00136         virtual AccountSeq* getAccounts()
00137             throw (CORBA::SystemException, OsbCorbaException);
00138 
00146         virtual TaxKeyId getTaxKeyByName(
00147             const Utf8String& name
00148         ) throw (CORBA::SystemException);
00149 
00158         virtual TaxKey* getTaxKey(
00159             const TaxKeyId& id
00160         ) throw (CORBA::SystemException, OsbCorbaException);
00161 
00171         virtual TaxKeySeq* getTaxKeys()
00172             throw (CORBA::SystemException, OsbCorbaException);
00173 
00181         virtual TaxKeySeq* getAssocTaxKeys()
00182             throw (CORBA::SystemException, OsbCorbaException);
00183 
00191         virtual TaxKeySeq* getContractTaxKeys()
00192             throw (CORBA::SystemException, OsbCorbaException);
00193 
00201         virtual TaxKeySeq* getProductTaxKeys()
00202             throw (CORBA::SystemException, OsbCorbaException);
00203 
00212         virtual Currency* getCurrency(
00213             const CurrencyCode& code
00214         ) throw (CORBA::SystemException, OsbCorbaException);
00215 
00225         virtual CurrencyBook* getCurrencyBook()
00226             throw (CORBA::SystemException, OsbCorbaException);
00227 
00235         virtual RoundRuleId getRoundRuleByName(
00236             const Utf8String& name
00237         ) throw (CORBA::SystemException);
00238 
00247         virtual RoundRule* getRoundRule(
00248             const RoundRuleId& id
00249         ) throw (CORBA::SystemException, OsbCorbaException);
00250 
00260         virtual RoundRuleSeq* getRoundRules()
00261             throw (CORBA::SystemException, OsbCorbaException);
00262 
00270         virtual UnitId getUnitByName(
00271             const Utf8String& name
00272         ) throw (CORBA::SystemException);
00273 
00282         virtual Unit* getUnit(
00283             const UnitId& id
00284         ) throw (CORBA::SystemException, OsbCorbaException);
00285 
00295         virtual UnitSeq* getUnits()
00296             throw (CORBA::SystemException, OsbCorbaException);
00297 
00323         virtual CORBA::Boolean creChargeTraits(
00324             const CurrencyCode&    currency,
00325             const RoundRuleId&     rrId,
00326             const Utf8String&      accCode,
00327             const Utf8String&      numFormat,
00328             const TaxKeyId&        tkId,
00329                   ChargeType       cType,
00330                   OSB_DB::Session& session,
00331                   ChargeTraits_out chrgTraits
00332         ) throw (CORBA::SystemException, OsbCorbaException);
00333 
00345         virtual CORBA::Boolean delChargeTraits(
00346                   OSB_DB::Session& session,
00347             const ChargeTraitsId&  id
00348         ) throw (CORBA::SystemException, OsbCorbaException);
00349 
00350     private:
00351         TaxKeySeq* getSpecificTaxKeys(
00352             TaxKeyType type
00353         ) throw (CORBA::SystemException, OsbCorbaException);
00354     };
00355 
00362     OSB_LIB::AccountType accountType(OSB_CORBA::AccountType acc);
00363 
00370     AccountType accountType(OSB_LIB::AccountType acc);
00371 
00378     OSB_LIB::ChargeType chargeType(OSB_CORBA::ChargeType ct);
00379 
00386     ChargeType chargeType(OSB_LIB::ChargeType ct);
00387 
00394     OSB_LIB::TaxKeyType tkType(OSB_CORBA::TaxKeyType type);
00395 
00402     TaxKeyType tkType(OSB_LIB::TaxKeyType tkType);
00403 
00410     OSB_LIB::RoundRule::Type rrType(RoundRuleType type);
00411 
00418     RoundRuleType rrType(OSB_LIB::RoundRule::Type type);
00419 
00420 
00421 }   // OSB_CORBA namespace
00422 
00423 #endif /* _CHARGETRAITS_I_H_  */

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