//******************************************************************* // // Name: MarketManager.idl // // Description: // The class defines the interface for market manager object. // // Bugs: // // See also: // // Type: C++ header // //******************************************************************* #ifndef __MARKETMANAGER_IDL #define __MARKETMANAGER_IDL #include "TransactionManager.idl" #include "CorbaDof.idl" interface CorbaMarketManager { // Create a new Market. boolean CreateMarket(in CorbaDof::Tuple tSecurity, inout CorbaDof::OID MarketOID, in CorbaDof::Tuple tMarketInfo, out string sErrorMsg); // Delete an existing Market. boolean DeleteMarketItem(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketOID, out string sErrorMsg); // Change an existing Market's general details. boolean SetMarketInfo (in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketOID, in CorbaDof::Tuple tMarketInfo, out string sErrorMsg); // Fetch all the Markets from the database. boolean GetMarketList (in TransactionManager::HCONNECTION hConnection, out CorbaDof::TupleList tMarketList, out string sErrorMsg); // Set market taxes boolean AddMarketTaxes(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketOID, in CorbaDof::TupleList tlTaxList, out string sErrorMsg); // Fetch all the market taxes from the database. boolean GetMarketTaxList(in CorbaDof::OID MarketOID, out CorbaDof::TupleList tMarketTaxList, out string sErrorMsg); // Get list of availble taxes for this market. boolean GetTaxList(in CorbaDof::OID MarketOID, out CorbaDof::TupleList tlTaxList, out string sErrorMsg); // Set market invoice types boolean AddMarketInvoiceTypes(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketOID, in CorbaDof::TupleList tlInvoiceList, out string sErrorMsg); // Fetch all the market invoice types from the database. boolean GetMarketInvoiceList(in TransactionManager::HCONNECTION hConnection, in CorbaDof::OID MarketOID, out CorbaDof::TupleList tMarketInvoiceList, out string sErrorMsg); // Set market payment methods boolean AddMarketPayMethods(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketOID, in CorbaDof::TupleList tlPaymethodsList, out string sErrorMsg); // Set market messages boolean AddMarketMessages(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketOID, in CorbaDof::TupleList tlMessagesList, out string sErrorMsg); // Fetch all the market invoice types from the database. boolean GetMarketMessagesList(in TransactionManager::HCONNECTION hConnection, in CorbaDof::OID MarketOID, out CorbaDof::TupleList tMarketMessagesList, out string sErrorMsg); // Set market products boolean AddMarketProducts(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketOID, in CorbaDof::TupleList tlProductsList, out string sErrorMsg); /******************************************************************* // Function :CreateMarketTaxVerion // Description: // Create a new version for Market Tax object. // // Parameters: // input // tSecurity - Security tuple // hConnection - Connection to DB // OrigMarketTaxOID - The OID of the original market tax // NewMarketTaxOID - empty OID // tMarketTaxAttr - The Market Tax attributes. // The mandatory field is: // eff_date. // optional override fields are : // GL_Code , precentage. // output // NewMarketTaxOID - The new version of Market Tax OID // sErrorMsg - Error message // Returns: // true - SUCCESS. // false - FAILURE. //*******************************************************************/ boolean CreateMarketTaxVersion(in CorbaDof::Tuple tSecurity, in TransactionManager::HCONNECTION hConnection, in CorbaDof::OID OrigMarketTaxOID, inout CorbaDof::OID NewMarketTaxOID, in CorbaDof::Tuple tMarketTaxAttr, out string sErrorMsg); /******************************************************************* // Function :GetMarketTaxVersions // Description: // Get all MarketTax versions of one tax in market . // Parameters: // input // hConnection - Connection to DB // MarketOID - Market OID // TaxOID - Tax OID // output // tlMarketTaxVersions - Contain tuples with the structure : Tax Name,Status { Future , Current, Passed } Start Date , End Date // and all MarketTax attributes // sErrorMsg - Error message // Returns: // true - SUCCESS. // false - FAILURE. //*******************************************************************/ boolean GetMarketTaxVersions(in TransactionManager::HCONNECTION hConnection, in CorbaDof::OID MarketOID, in CorbaDof::OID TaxOID, out CorbaDof::TupleList tlMarketTaxVersions, out string sErrorMsg) ; /******************************************************************* // Function :GetMarketTaxes // Description: // Get all MarketTax objects in market // // Parameters: // input // hConnection - Connection to DB // MarketOID - Market OID // // output // tlMarketTaxes - Contain tuples with the structure : Tax Name,Status { Expire =0, Active, Future }, // Start Date , End Date // and all MarketTax attributes . // sErrorMsg - Error message // Returns: // true - SUCCESS. // false - FAILURE. //*******************************************************************/ boolean GetMarketTaxes(in TransactionManager::HCONNECTION hConnection, in CorbaDof::OID MarketOID, out CorbaDof::TupleList tlMarketTaxes, out string sErrorMsg) ; // Fetch all the market products from the database. boolean GetMarketProductsList(in CorbaDof::OID MarketOID, out CorbaDof::TupleList tMarketProductsList, out string sErrorMsg); // Update data of specific market product. boolean UpdateMarketProduct(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketProductOid, in CorbaDof::Tuple tData, out string sErrorMsg); // Fetch all charge types for the user to choose. boolean GetChargeTypesList(out CorbaDof::TupleList tChargeTypesList, out string sErrorMsg); // Fetch list of charge types with indication for market tax charges. boolean GetTaxChargeTypesList(in CorbaDof::OID MarketOid, in CorbaDof::OID TaxOid, out CorbaDof::TupleList tlChargeTypesList, out string sErrorMsg); // Update market tax charge types. boolean UpdateTaxChargeTypes(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketOid, in CorbaDof::OID TaxOid, in CorbaDof::TupleList tlChargeTypesList, out string sErrorMsg); // Fetch all currency types. boolean GetCurrencyTypesList(out CorbaDof::TupleList tlCurrencyList, out string sErrorMsg); // Get billing event types. boolean GetBillingEvents(in TransactionManager::HCONNECTION hConnection, in CorbaDof::OID MarketOid, in CorbaDof::Tuple tInfo, out CorbaDof::TupleList tlBillingEvents, out string sErrorMsg); // Get nearest billing event. boolean GetDefaultBillingEvent(in TransactionManager::HCONNECTION hConnection, in CorbaDof::OID MarketOid, in CorbaDof::Tuple tInfo, out CorbaDof::ObjectNumber oBillingEvent, out string sErrorMsg); // Get Market. boolean GetMarket(in TransactionManager::HCONNECTION hConnection, in CorbaDof::OID MarketOid, out CorbaDof::Tuple tMarketInfo, out string sErrorMsg); // Get available products. boolean GetAvailableProducts(in CorbaDof::OID MarketOid, out CorbaDof::TupleList tProductList, in boolean bExcludeDef, out string sErrorMsg); // Get Invoice types. boolean GetInvoiceTypesList(in CorbaDof::OID MarketOid, out CorbaDof::TupleList tTypesList, out string sErrorMsg); // Add invoice type. boolean AddInvoiceType(in CorbaDof::Tuple tSecurity, in CorbaDof::Tuple tInvoiceType, out string sErrorMsg); // Edit market message. boolean EditMarketMessage(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MessageOid, in CorbaDof::Tuple MessageDetails, out string sErrorMsg); // Get market message. boolean GetMarketMessage(in CorbaDof::OID MessageOid, out CorbaDof::Tuple MessageDetails, out string sErrorMsg); // Get new market Oid. boolean GetNewMarketOid(out CorbaDof::OID MarketOid, out string sErrorMsg); // Get financial data. boolean GetFinancialData(in CorbaDof::OID MarketOid, out CorbaDof::Tuple FinancialDetails, out string sErrorMsg); // Set default market. boolean SetDefMarket(in CorbaDof::OID MarketOid, out string sErrorMsg); // Get default market. boolean GetDefMarket(out CorbaDof::Tuple MarketDetails, out string sErrorMsg); // Set as main currency bank. boolean SetMainCurrencyBank(in CorbaDof::OID MarketBankOid, out string sErrorMsg); // Get Market by name. boolean GetMarketByName(in string sMarketName, out CorbaDof::Tuple theData, out string sErrorMsg); // -------------------------------------------------------------// // Market Bank // //--------------------------------------------------------------// // Get non-service accumulated banks available for the market. boolean GetAvailableBanks(in CorbaDof::OID MarketOid, out CorbaDof::TupleList BanksList, out string sErrorMsg); // GetMarketBankList - Fetch a list of market banks from the database. boolean GetMarketBankList(in CorbaDof::Tuple tSearchTuple, out CorbaDof::TupleList MarketBankList, out string sErrorMsg); // GetMarketBank - Fetch market bank data by Oid. boolean GetMarketBank(in CorbaDof::OID MarketBankOid, out CorbaDof::Tuple tMarketBankData, out string sErrorMsg); // DeleteMarketBank - Delete a certain market bank. boolean DeleteMarketBank(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketBankOid, out string sErrorMsg); // UpdateMarketBank - Update data of specific market bank. boolean UpdateMarketBank(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketBankOid, in CorbaDof::Tuple tMarketBankData, out string sErrorMsg); // CreateMarketBank - Create a new market bank. boolean CreateMarketBank(in CorbaDof::Tuple tSecurity, inout CorbaDof::OID MarketBankOid, in CorbaDof::Tuple tMarketBankData, out string sErrorMsg); // Check mandatory product boolean CheckMandatoryProduct(in CorbaDof::OID ProductOid, in boolean bGeneral, out boolean bValid, out string sErrorMsg); // Delete market. boolean DeleteMarket(in CorbaDof::Tuple tSecurity, in CorbaDof::OID MarketOid, out string sErrorMsg); //******************************************************************* // Function : GetMarketProductServices // // Description: // Return the market products and services according to the // market search tuple. The tuple list has a row for each // service and containing market_oid, market_name, product_oid, // product_name, product_status, service_oid, service_name, // service_status // // Parameters: // tSearchTuple - The search tuple to the markets. // tlResults - The result tuple list. // sErrorMsg - Error message where applicable. // // Returns: // false - Failure. // true - Success. //******************************************************************* boolean GetMarketProductServices(in CorbaDof::Tuple tSearchTuple, out CorbaDof::TupleList tlResults, out string sErrorMsg); //******************************************************************* // Function : GetDistinctMainBanks // // Description: // Return a list of "bank_obj_num" and "bank_name" of banks // that are used as main currency bank of market. // Each bank will appear exactly once in the list. // // Parameters: // tlResults - The result tuple list. // sErrorMsg - Error message where applicable. // // Returns: // false - Failure. // true - Success. //******************************************************************* boolean GetDistinctMainBanks(out CorbaDof::TupleList tlResults, out string sErrorMsg); //******************************************************************* // Function : GetUnavailableMarketListbyProfile // // Description: // Gets the list of all the markets not available to an user according to its profile // Parameters: // Input: // hConnection - Database connection. Pass -1 if no connection // in use. // tSecurity - A security tuple that is used to identify the user // whose unavailable markets according to its profile should be fetched . // This tuple must contain 'UserId' element populating a valid CSR user name. // Output: // tlMarkets - The List of all the unavailable markets of the user. // (included in the table PROFILE_MARKET_RESTRICT) // sErrorMsg - Error message where applicable. // // // Returns: // false - Failure. // true - Success. //******************************************************************* boolean GetUnavailableMarketListbyProfile(in TransactionManager::HCONNECTION hConnection, in CorbaDof::Tuple tSecurity, out CorbaDof::TupleList tlMarkets, out string sErrorMsg); //******************************************************************* // Function : GetAvailableMarketListbyProfile // // Description: // Gets the list of all the markets available to an user according to its profile // Parameters: // Input: // hConnection - Database connection. Pass -1 if no connection // in use. // tSecurity - A security tuple that is used to identify the user // whose unavailable markets according to its profile should be fetched . // This tuple must contain 'UserId' element populating a valid CSR user name. // Output: // tlMarkets - The List of all the available markets of the user. // (not included in the table PROFILE_MARKET_RESTRICT) // sErrorMsg - Error message where applicable. // // // Returns: // false - Failure. // true - Success. //******************************************************************* boolean GetAvailableMarketListbyProfile(in TransactionManager::HCONNECTION hConnection, in CorbaDof::Tuple tSecurity, out CorbaDof::TupleList tlMarkets, out string sErrorMsg); }; #endif