com.konakart.rmi
Class KKRMIEngServer

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by com.konakart.rmi.KKRMIEngServerBase
                  extended by com.konakart.rmi.KKRMIEngServer
All Implemented Interfaces:
KKRMIEngServerIf, java.io.Serializable, java.rmi.Remote

public class KKRMIEngServer
extends KKRMIEngServerBase
implements KKRMIEngServerIf

The KonaKart RMI Server-Side Engine - Generated by CreateKK_RMI_EngServer

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.konakart.rmi.KKRMIEngServerBase
log
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
KKRMIEngServer()
           
 
Method Summary
 int addAddressToCustomer(java.lang.String storeId, java.lang.String sessionId, S_Address addr)
          The Address object is added to the customer defined by the sessionId.
 void addCustomDataToSession(java.lang.String storeId, java.lang.String sessionId, java.lang.String data, int position)
          A sessionId is created when a customer logs in to KonaKart using the login() API call.
 int addPoints(java.lang.String storeId, java.lang.String sessionId, int points, java.lang.String code, java.lang.String description)
          Adds a number of reward points to the total for customer identified by the sessionId parameter.
 void addProductNotificationToCustomer(java.lang.String storeId, java.lang.String sessionId, int productId)
          Adds a product notification to the list of notifications for the customer.
 java.math.BigDecimal addTax(java.lang.String storeId, java.math.BigDecimal cost, int countryId, int zoneId, int taxClassId)
          Calculates the final cost (including tax) for a product with a certain taxClassId and cost, delivered to a country (countryId ) and zone (zoneId).
 int addToBasket(java.lang.String storeId, java.lang.String sessionId, int customerId, S_Basket item)
          Saves the Basket object in the database for a customer.
 int addToBasketWithOptions(java.lang.String storeId, java.lang.String sessionId, int customerId, S_Basket item, S_AddToBasketOptions options)
          If options is set to null, this method is identical to addToBasket().
 void addToCustomerTag(java.lang.String storeId, java.lang.String sessionId, java.lang.String tagName, int tagValue)
          This method is used for customer tags where the value is of type com.konakart.app.CustomerTag.MULTI_INT_TYPE.
 void addToCustomerTagForGuest(java.lang.String storeId, int customerId, java.lang.String tagName, int tagValue)
          This method is used for customer tags where the value is of type com.konakart.app.CustomerTag.MULTI_INT_TYPE.
 int addToWishList(java.lang.String storeId, java.lang.String sessionId, S_WishListItem wishListItem)
          Add a WishListItem object to the wish list referenced by wishListId.
 int addToWishListWithOptions(java.lang.String storeId, java.lang.String sessionId, S_WishListItem wishListItem, S_AddToWishListOptions options)
          If options is set to null, this method is identical to addToWishList().
 S_Order changeDeliveryAddress(java.lang.String storeId, java.lang.String sessionId, S_Order order, S_Address deliveryAddress)
          The delivery address of the order is changed and the tax rates for the various products within the order are re-calculated.
 void changeOrderStatus(java.lang.String storeId, java.lang.String sessionId, int orderId, int status, boolean customerNotified, java.lang.String comments)
          The state of the order referenced by the orderId parameter is changed, and an orders_status_history record is added to the order to keep track of the change.
 void changePassword(java.lang.String storeId, java.lang.String sessionId, java.lang.String currentPassword, java.lang.String newPassword)
          Ensures that the current password is correct, and then changes it to the new password.
 int checkCoupon(java.lang.String storeId, java.lang.String couponCode)
          This method is used to verify whether a coupon code actually exists and if it does, whether the coupon is still active.
 int checkSession(java.lang.String storeId, java.lang.String sessionId)
          The given sessionId is checked to see whether it exists and whether it is has timed out.
 S_Order createAndSaveOrder(java.lang.String storeId, java.lang.String emailAddr, java.lang.String password, S_CustomerRegistration custReg, S_Basket[] basketItemArray, java.lang.String shippingModule, java.lang.String paymentModule, int languageId)
          A high level call to simplify the process of creating a KonaKart order.
 S_Order createOrder(java.lang.String storeId, java.lang.String sessionId, S_Basket[] basketItemArray, int languageId)
          An order object is returned with all addresses populated with the default address of the customer referenced by sessionId.
 S_Order createOrderWithOptions(java.lang.String storeId, java.lang.String sessionId, S_Basket[] basketItemArray, S_CreateOrderOptions options, int languageId)
          If options is set to null, this method is identical to createOrder().
 int createWishList(java.lang.String storeId, java.lang.String sessionId, S_WishList wishList)
          Create a wish list from a WishList object.
 int createWishListWithOptions(java.lang.String storeId, java.lang.String sessionId, S_WishList wishList, S_AddToWishListOptions options)
          Create a wish list from a WishList object.
 java.lang.String custom(java.lang.String storeId, java.lang.String input1, java.lang.String input2)
          A custom interface that you have to provide an implementation for.
 java.lang.String customSecure(java.lang.String storeId, java.lang.String sessionId, java.lang.String input1, java.lang.String input2)
          A custom interface that you have to provide an implementation for.
 void deleteAddressFromCustomer(java.lang.String storeId, java.lang.String sessionId, int addressId)
          The address defined by the sessionId and addressId is deleted.
 void deleteCookie(java.lang.String storeId, java.lang.String customerUuid, java.lang.String attrId)
          Deletes the cookie object from the database that is referenced by the customerUuid and attrId parameters.
 void deleteCustomerTag(java.lang.String storeId, java.lang.String sessionId, java.lang.String tagName)
          This method deletes the customer tag referenced by the parameter tagName and for the customer referenced by the sessionId.
 void deleteCustomerTagForGuest(java.lang.String storeId, int customerId, java.lang.String tagName)
          This method deletes the customer tag referenced by the parameter tagName and for the guest customer referenced by the negative customerId.
 void deleteOrderIdForSecretKey(java.lang.String storeId, java.lang.String secretKey)
          The secret key is removed from the system.
 int deletePoints(java.lang.String storeId, java.lang.String sessionId, int points, java.lang.String code, java.lang.String description)
          Deletes a number of reward points from the total for the customer identified by the sessionId parameter.
 void deleteProductNotificationFromCustomer(java.lang.String storeId, java.lang.String sessionId, int productId)
          Deletes a product notification from the list of notifications for the customer.
 void deleteReservedPoints(java.lang.String storeId, java.lang.String sessionId, int reservationId, java.lang.String code, java.lang.String description)
          Verifies that the reservationId parameter exists and that it belongs to the customer identified by the sessionId parameter.
 void deleteWishList(java.lang.String storeId, java.lang.String sessionId, int wishListId)
          The wish list referenced by wishListId and all of the items contained by the wish list, will be deleted.
 void deleteWishListWithOptions(java.lang.String storeId, java.lang.String sessionId, int wishListId, S_AddToWishListOptions options)
          The wish list referenced by wishListId and all of the items contained by the wish list, will be deleted.
 boolean doesCustomerExistForEmail(java.lang.String storeId, java.lang.String emailAddr)
          Determine whether a customer has already registered with a certain eMail address as their user name.
 void editConfiguration(java.lang.String storeId, java.lang.String key, java.lang.String value)
          Edits an existing configuration.
 void editCustomer(java.lang.String storeId, java.lang.String sessionId, S_Customer cust)
          The Customer object will replace the existing customer object in the database.
 void editCustomerAddress(java.lang.String storeId, java.lang.String sessionId, S_Address addr)
          The Address object will replace the existing address object in the database with the same id.
 void editDigitalDownload(java.lang.String storeId, java.lang.String sessionId, S_DigitalDownload digitalDownload)
          Edits the digital download object if it belongs to the customer identified by the sessionId.
 void editWishList(java.lang.String storeId, java.lang.String sessionId, S_WishList wishList)
          Edit an existing wish list object.
 void editWishListWithOptions(java.lang.String storeId, java.lang.String sessionId, S_WishList wishList, S_AddToWishListOptions options)
          Edit an existing wish list object.
 void enableCustomer(java.lang.String storeId, java.lang.String secretKey)
          This method reads the SSO token using the Secret Key.
 boolean evaluateExpression(java.lang.String storeId, java.lang.String sessionId, int expressionId, java.lang.String expressionName)
          An expression object is retrieved from the database and evaluated for the customer referenced by the sessionId.
 boolean evaluateExpressionForGuest(java.lang.String storeId, int customerId, int expressionId, java.lang.String expressionName)
          An expression object is retrieved from the database and evaluated for the guest customer referenced by the negative customerId.
 int forceRegisterCustomer(java.lang.String storeId, S_CustomerRegistration custReg)
          This API Call is used rather than registerCustomer() when you want to provide a store that doesn't force a customer to register.
 int freeReservedPoints(java.lang.String storeId, java.lang.String sessionId, int reservationId)
          Verifies that the reservationId parameter exists and that it belongs to the customer identified by the sessionId parameter.
 S_Address[] getAddressesPerCustomer(java.lang.String storeId, java.lang.String sessionId)
          Returns all of the addresses registered for the given customer.
 S_Address[] getAddressesPerManufacturer(java.lang.String storeId, int manufacturerId)
          Gets an array of Address objects that have been defined for the manufacturer referenced by the manufacturerId.
 S_Address[] getAddressesPerProduct(java.lang.String storeId, int productId)
          Gets an array of Address objects that have been defined for the product referenced by the productId.
 S_KKCookie[] getAllCookies(java.lang.String storeId, java.lang.String customerUuid)
          Fetches all of the cookie object from the database that are referenced by the customerUuid parameter.
 S_Country[] getAllCountries(java.lang.String storeId)
          Returns an array of Country objects for all of the countries in the system.
 S_Currency[] getAllCurrencies(java.lang.String storeId)
          Returns an array of currency objects for all the records in the currencies table.
 S_CustomerGroup[] getAllCustomerGroups(java.lang.String storeId, int languageId)
          Returns an array of customer groups for all customer groups that have been defined in the system.
 S_Language[] getAllLanguages(java.lang.String storeId)
          Returns an array of Language classes containing all of the languages that have been defined within the system.
 S_Manufacturer[] getAllManufacturers(java.lang.String storeId)
          Returns an array of Manufacturer objects for all of the manufacturers in the system.
 S_OrderStatus[] getAllOrderStatuses(java.lang.String storeId, int languageId)
          Returns an array of order status objects for the language defined by languageId.
 S_Products getAllProducts(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int languageId)
          Returns all products using the given language.
 S_Products getAllProductsWithOptions(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int languageId, S_FetchProductOptions options)
          An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from.
 S_Promotion[] getAllPromotions(java.lang.String storeId)
          Returns an array of all active promotions.
 S_Reviews getAllReviews(java.lang.String storeId, S_DataDescriptor dataDesc)
          An array of review objects is returned.
 S_Products getAllSpecials(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int languageId)
          Returns all specials using the given language.
 S_Product[] getAlsoPurchased(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int productId, int languageId)
          Find products that were in the same order as orders containing the product referenced by productId.
 S_Product[] getAlsoPurchasedWithOptions(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int productId, int languageId, S_FetchProductOptions options)
          An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from.
 S_Basket[] getBasketItemsPerCustomer(java.lang.String storeId, java.lang.String sessionId, int customerId, int languageId)
          Get the basket items for a customer and language.
 S_Basket[] getBasketItemsPerCustomerWithOptions(java.lang.String storeId, java.lang.String sessionId, int customerId, int languageId, S_AddToBasketOptions options)
          Get the basket items for a customer and language.
 S_Product[] getBestSellers(java.lang.String storeId, S_DataDescriptor dataDesc, int categoryId, int languageId)
          Returns an array of bestseller products for the category referenced by categoryId and its children.
 S_Product[] getBestSellersWithOptions(java.lang.String storeId, S_DataDescriptor dataDesc, int categoryId, int languageId, S_FetchProductOptions options)
          An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from.
 S_Product[] getBookableProductConflict(java.lang.String storeId, java.lang.String sessionId, S_Product bookableProd, S_BookableProductOptions options)
          This method checks to see whether the bookable product passed in as a parameter conflicts with any bookable products that the customer identified by the sessionId has already signed up for.
If no conflicts are found, null is returned.
 S_Bookings getBookingsPerCustomer(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, S_BookableProductOptions options)
          Get an array of bookings for a logged in customer.
 S_Bookings getBookingsPerProduct(java.lang.String storeId, S_DataDescriptor dataDesc, int productId, S_BookableProductOptions options)
          Get an array of bookings for a bookable product.
 S_Category[] getCategoriesPerManufacturer(java.lang.String storeId, int manufacturerId, int languageId)
          Returns an array of leaf Category objects for the given manufacturer.
 S_Category[] getCategoriesPerProduct(java.lang.String storeId, int productId, int languageId)
          Returns an array of Category objects for the given product.
 S_Category getCategory(java.lang.String storeId, int categoryId, int languageId)
          Returns a complete single Category object for the given categoryId and language.
 S_Category[] getCategoryTree(java.lang.String storeId, int languageId, boolean getNumProducts)
          Returns a category tree structure consisting of an array of top level categories, each of which may contain an array of child categories.
 S_KKConfiguration getConfiguration(java.lang.String storeId, java.lang.String key)
          Returns a Configuration object referenced by the key passed in as a parameter
 S_KKConfiguration[] getConfigurations(java.lang.String storeId)
          Returns an array of Configuration objects containing all configurations that have been defined in the system.
 java.lang.String getConfigurationValue(java.lang.String storeId, java.lang.String key)
          Returns a Configuration Value referenced by the key passed in as a parameter
 java.math.BigDecimal getConfigurationValueAsBigDecimal(java.lang.String storeId, java.lang.String key)
          Returns a Configuration Value as a BigDecimal for the key passed in as a parameter
 java.math.BigDecimal getConfigurationValueAsBigDecimalWithDefault(java.lang.String storeId, java.lang.String key, java.math.BigDecimal def)
          Returns a Configuration Value as a BigDecimal for the key passed in as a parameter
 java.lang.Boolean getConfigurationValueAsBool(java.lang.String storeId, java.lang.String key, java.lang.Boolean def)
          Returns a Configuration Value as a Boolean for the key passed in as a parameter
 int getConfigurationValueAsInt(java.lang.String storeId, java.lang.String key)
          Returns a Configuration Value as an integer for the key passed in as a parameter
 int getConfigurationValueAsIntWithDefault(java.lang.String storeId, java.lang.String key, int def)
          Returns a Configuration Value as an integer for the key passed in as a parameter
 S_KKCookie getCookie(java.lang.String storeId, java.lang.String customerUuid, java.lang.String attrId)
          Fetches the cookie object from the database that is referenced by the customerUuid and attrId parameters.
 S_Country getCountry(java.lang.String storeId, int countryId)
          Returns the country object for the countryId, or null if the country doesn't exist in the DB.
 S_Country getCountryPerName(java.lang.String storeId, java.lang.String countryName)
          Returns the country object for the countryName, or null if the country doesn't exist in the DB.
 S_Currency getCurrency(java.lang.String storeId, java.lang.String currencyCode)
          Returns the currency referenced by currencyCode.
 java.lang.String getCustomDataFromSession(java.lang.String storeId, java.lang.String sessionId, int position)
          A sessionId is created when a customer logs in to KonaKart using the login() API call.
 S_Customer getCustomer(java.lang.String storeId, java.lang.String sessionId)
          Returns the customer object for the customer defined by the given sessionId.
 S_CustomerGroup getCustomerGroup(java.lang.String storeId, int customerGroupId, int languageId)
          Returns a customer group object for the customerGroupId passed in as a parameter.
 S_CustomerTag getCustomerTag(java.lang.String storeId, java.lang.String sessionId, java.lang.String tagName)
          A CustomerTag object referenced by the parameter tagName is returned.
 S_CustomerTag getCustomerTagForGuest(java.lang.String storeId, int customerId, java.lang.String tagName)
          A CustomerTag object referenced by the parameter tagName is returned.
 S_CustomerTag[] getCustomerTags(java.lang.String storeId, java.lang.String sessionId)
          This method fetches all of the customer tags for the customer referenced by the sessionId.
 S_CustomerTag[] getCustomerTagsForGuest(java.lang.String storeId, int customerId)
          This method fetches all of the customer tags for the guest customer referenced by the customerId which must have a negative value.
 java.lang.String getCustomerTagValue(java.lang.String storeId, java.lang.String sessionId, java.lang.String tagName)
          A string is returned containing the value of the customer tag referenced by the parameter tagName and for the customer referenced by the sessionId.
 java.lang.String getCustomerTagValueForGuest(java.lang.String storeId, int customerId, java.lang.String tagName)
          A string is returned containing the value of the customer tag referenced by the parameter tagName and for the guest customer referenced by the negative customerId.
 S_Address getDefaultAddressPerCustomer(java.lang.String storeId, java.lang.String sessionId)
          Returns the default address for the given customer.
 S_Currency getDefaultCurrency(java.lang.String storeId)
          The default currency is referenced by a configuration variable called DEFAULT_CURRENCY.
 S_Customer getDefaultCustomer(java.lang.String storeId)
          Returns the customer object for the default customer.
 S_Language getDefaultLanguage(java.lang.String storeId)
          The default language is referenced by a configuration variable called DEFAULT_LANGUAGE.
 S_DigitalDownload getDigitalDownloadById(java.lang.String storeId, java.lang.String sessionId, int digitalDownloadId)
          Returns a Digital Download object for the digital download id.
 S_DigitalDownload[] getDigitalDownloads(java.lang.String storeId, java.lang.String sessionId)
          Returns an array of Digital Download objects for the customer identified by the sessionId parameter.
 S_Expression getExpression(java.lang.String storeId, java.lang.String sessionId, int expressionId, java.lang.String expressionName)
          An Expression object, fully populated with an array of Expression Variables is returned.
 S_Expression getExpressionForGuest(java.lang.String storeId, int customerId, int expressionId, java.lang.String expressionName)
          An Expression object, fully populated with an array of Expression Variables is returned.
 S_GeoZone[] getGeoZonesPerZone(java.lang.String storeId, S_Zone zone)
          Returns an array of GeoZone objects (tax areas) for the zone passed in as a parameter.
 S_IpnHistory[] getIpnHistory(java.lang.String storeId, java.lang.String sessionId, int orderId)
          Retrieve an array of IpnHistory objects for an order.
 java.util.Calendar getKonakartTimeStamp(java.lang.String storeId)
          Get a Date Time Stamp from the server
 S_Language getLanguagePerCode(java.lang.String storeId, java.lang.String code)
          Retrieves the language object referenced by the two letter code (i.e.
 S_Language getLanguagePerId(java.lang.String storeId, int languageId)
          Retrieves the language object referenced by the id.
 S_Manufacturer getManufacturer(java.lang.String storeId, int manufacturerId, int languageId)
          Returns a complete Manufacturer object for the given manufacturerId and language.
 S_Manufacturer getManufacturerPerProduct(java.lang.String storeId, int productId, int languageId)
          Returns a complete Manufacturer object for the given productId and language.
 S_Manufacturer[] getManufacturersPerCategory(java.lang.String storeId, int categoryId)
          Returns an array of Manufacturer objects for the given category.
 S_NameValue[] getMessages(java.lang.String storeId, int type, java.lang.String locale)
          Used to fetch a message catalog for a locale and message type.
 java.lang.String getMsgValue(java.lang.String storeId, java.lang.String key, int type, java.lang.String locale)
          Get an Application Message Value.
 S_Order getOrder(java.lang.String storeId, java.lang.String sessionId, int orderId, int languageId)
          Gets on order with the specified order Id, for the customer referenced by the sessionId.
 S_Product[] getOrderHistory(java.lang.String storeId, S_DataDescriptor dataDesc, java.lang.String sessionId, int languageId)
          Get a list of the products ordered by the customer referenced by sessionId.
 S_Product[] getOrderHistoryWithOptions(java.lang.String storeId, S_DataDescriptor dataDesc, java.lang.String sessionId, int languageId, S_FetchProductOptions options)
          An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from.
 int getOrderIdFromSecretKey(java.lang.String storeId, java.lang.String secretKey)
          When an order is created, a secret key is generated that may be used to send to the payment gateway if the payment gateway uses a callback mechanism.
 S_Orders getOrdersPerCustomer(java.lang.String storeId, S_DataDescriptor dataDesc, java.lang.String sessionId, int languageId)
          Retrieve a number of orders for the customer referenced by the sessionId.
 int getOrderStatus(java.lang.String storeId, java.lang.String sessionId, int orderId)
          Get the order status for an order.
 S_Order getOrderTotals(java.lang.String storeId, S_Order order, int languageId)
          The order object is populated with an array of order totals.
 S_PaymentDetails getPaymentDetails(java.lang.String storeId, java.lang.String sessionId, java.lang.String moduleCode, int orderId, java.lang.String hostAndPort, int languageId)
          This method is called once a payment gateway has been selected and an order has been saved in the database.
 S_PaymentDetails getPaymentDetailsPerOrder(java.lang.String storeId, java.lang.String sessionId, java.lang.String moduleCode, S_Order order, java.lang.String hostAndPort, int languageId)
          This method is called once a payment gateway has been selected even if the order has not been saved in the database.
 S_PaymentDetails getPaymentGateway(java.lang.String storeId, S_Order order, java.lang.String moduleName, int languageId)
          The payment module called moduleName is called to get a PaymentDetails object for the order passed in as a parameter.
 S_PaymentDetails[] getPaymentGateways(java.lang.String storeId, S_Order order, int languageId)
          Each payment module is called and asked to return a PaymentDetails object.
 S_PaymentSchedule getPaymentSchedule(java.lang.String storeId, int id)
          Returns the payment schedule object for the id parameter, or Null if the payment schedule object doesn't exist in the DB.
 S_PdfResult getPdf(java.lang.String storeId, java.lang.String sessionId, S_PdfOptions options)
          Creates a PDF document.
 S_Product getProduct(java.lang.String storeId, java.lang.String sessionId, int productId, int languageId)
          Returns a complete Product object for the given productId and language.
 S_Product[] getProductNotificationsPerCustomer(java.lang.String storeId, java.lang.String sessionId, int languageId)
          Returns all products sorted by name, that the customer has asked to be notified about.
 S_Product[] getProductNotificationsPerCustomerWithOptions(java.lang.String storeId, java.lang.String sessionId, int languageId, S_FetchProductOptions options)
          An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from.
 S_Product getProductPerSku(java.lang.String storeId, java.lang.String sessionId, java.lang.String sku, int languageId)
          Get a product from its SKU.
 S_Product getProductPerSkuWithOptions(java.lang.String storeId, java.lang.String sessionId, java.lang.String sku, int languageId, S_FetchProductOptions options)
          Get a product from its SKU.
 S_ProductQuantity getProductQuantity(java.lang.String storeId, java.lang.String encodedProductId)
          The stock level of the product and the date available are returned within a ProductQuantity object.
 S_ProductQuantity getProductQuantityWithOptions(java.lang.String storeId, java.lang.String encodedProductId, S_FetchProductOptions options)
          The stock level of the product and the date available are returned within a ProductQuantity object.
 S_Product[] getProductsFromIdsWithOptions(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int[] prodIdArray, int languageId, S_FetchProductOptions options)
          An array of products is returned that corresponds to an array of productIds passed in as a parameter.
 S_Products getProductsPerCategory(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int categoryId, boolean searchInSubCats, int languageId)
          Returns a Products object for the given category and language.
 S_Products getProductsPerCategoryPerManufacturer(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int categoryId, int manufacturerId, int languageId)
          Returns a Products object for the given category, language and manufacturer.
 S_Products getProductsPerCategoryPerManufacturerWithOptions(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int categoryId, int manufacturerId, int languageId, S_FetchProductOptions options)
          An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from.
 S_Products getProductsPerCategoryWithOptions(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int categoryId, boolean searchInSubCats, int languageId, S_FetchProductOptions options)
          An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from.
 S_Products getProductsPerManufacturer(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int manufacturerId, int languageId)
          Returns a Products object for the given manufacturer and language.
 S_Products getProductsPerManufacturerWithOptions(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int manufacturerId, int languageId, S_FetchProductOptions options)
          An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from.
 S_Product getProductWithOptions(java.lang.String storeId, java.lang.String sessionId, int productId, int languageId, S_FetchProductOptions options)
          An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from.
 S_Product[] getPromotionsPerProducts(java.lang.String storeId, java.lang.String sessionId, int customerId, S_Product[] products, S_Promotion[] promotions, java.lang.String[] couponCodes, S_PromotionOptions options)
          This method is used to calculate a discount on individual products so that the discount can be displayed without having to add the product to the cart.
The method receives an array of products and returns an array of products with attached PromotionResult objects that contain the results of one or more of the promotions passed in as a parameter.
 S_Products getRelatedProducts(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int productId, int relationType, int languageId)
          Find products related to the product defined by the productId parameter.
 S_Products getRelatedProductsWithOptions(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int productId, int relationType, int languageId, S_FetchProductOptions options)
          An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from.
 S_Review getReview(java.lang.String storeId, int reviewId)
          An review object is returned for the given reviewId.
 S_Reviews getReviewsPerProduct(java.lang.String storeId, S_DataDescriptor dataDesc, int productId)
          An array of review objects is returned for the given productId.
 S_RewardPoints getRewardPoints(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc)
          Gets an array of reward point objects for a customer identified by the sessionId parameter.
 java.lang.String getSecretKeyForOrderId(java.lang.String storeId, int orderId)
          A secret key is generated and stored in the database for the orderId passed as a parameter.
 S_ShippingQuote getShippingQuote(java.lang.String storeId, S_Order order, java.lang.String moduleName, int languageId)
          The shipping module called moduleName is called to get a shipping quote for the order passed in as a parameter.
 S_ShippingQuote[] getShippingQuotes(java.lang.String storeId, S_Order order, int languageId)
          All active installed shipping modules are called in order to get an array of shipping quotes.
 java.lang.String getSku(java.lang.String storeId, S_OrderProduct orderProd)
          Deprecated.  
 S_Products getSpecialsPerCategory(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int categoryId, boolean searchInSubCats, int languageId)
          Returns all specials for the given categoryId and language.
 S_SSOToken getSSOToken(java.lang.String storeId, java.lang.String secretKey, boolean deleteToken)
          Returns an SSOToken object for the secretKey (UUID).
 java.lang.String getStatusText(java.lang.String storeId, int statusId, int languageId)
          Returns the text of a status from the orders_status table.
 S_Store getStore(java.lang.String storeId)
          Returns the store that this KonaKart engine is connected to.
 java.lang.String[] getStoreIds(java.lang.String storeId)
          Returns an array of strings containing the store ids for the stores being used in a multi-store / multi-database environment.
 S_Subscription[] getSubscriptionsPerCustomer(java.lang.String storeId, java.lang.String sessionId)
          Returns an array of Subscription objects for a customer referred to by the sessionId parameter.
 S_SuggestedSearchItem[] getSuggestedSearchItems(java.lang.String storeId, java.lang.String sessionId, S_SuggestedSearchOptions options)
          An array of SuggestedSearchItems is returned for search text within the options parameter.
 S_Tag getTag(java.lang.String storeId, int tagId, boolean getProdCount, int languageId)
          Returns a Tag object for the id passed in as a parameter.
 S_TagGroup getTagGroup(java.lang.String storeId, int tagGroupId, boolean getProdCount, int languageId)
          Returns a TagGroup object for the id passed in as a parameter.
 S_TagGroup[] getTagGroupsPerCategory(java.lang.String storeId, int categoryId, boolean getProdCount, int languageId)
          Return an array of TagGroup objects for a category.
 S_Tag[] getTagsPerCategory(java.lang.String storeId, int categoryId, boolean getProdCount, int languageId)
          Return an array of Tag objects for a category.
 java.math.BigDecimal getTax(java.lang.String storeId, java.math.BigDecimal cost, int countryId, int zoneId, int taxClassId)
          Calculates the tax for a product with a taxClassId and cost, delivered to a country (countryId) and zone (zoneId).
 java.math.BigDecimal getTaxRate(java.lang.String storeId, int countryId, int zoneId, int taxClassId)
          Calculates the tax rate for a product with a taxClassId delivered to a country ( countryId) and zone (zoneId).
 int getTempCustomerId(java.lang.String storeId)
          When a customer that hasn't logged in adds products to the shopping cart, we use a temporary customer id which is always negative and unique.
 S_WishList getWishList(java.lang.String storeId, java.lang.String sessionId, int wishListId)
          Returns a WishList object not populated with an array of WishListItem objects.
 S_WishListItems getWishListItems(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int wishListId, int languageId)
          Returns a WishListItems object containing an array of items and the number of items returned.
 S_WishListItems getWishListItemsWithOptions(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, int wishListId, int languageId, S_AddToWishListOptions options)
          Returns a WishListItems object containing an array of items and the number of items returned.
 S_WishList getWishListWithItems(java.lang.String storeId, java.lang.String sessionId, int wishListId, int languageId)
          Returns a fully populated WishList object that may contain an array of WishListItem objects.
 S_WishList getWishListWithItemsWithOptions(java.lang.String storeId, java.lang.String sessionId, int wishListId, int languageId, S_AddToWishListOptions options)
          If options is set to null, this method is identical to getWishListWithItems().
 S_WishList getWishListWithOptions(java.lang.String storeId, java.lang.String sessionId, int wishListId, S_AddToWishListOptions options)
          Returns a WishList object not populated with an array of WishListItem objects.
 S_Zone[] getZonesPerCountry(java.lang.String storeId, int countryId)
          Returns an array of Zone objects for the country referenced by the countryId.
 int insertBooking(java.lang.String storeId, java.lang.String sessionId, S_Booking booking, S_BookableProductOptions options)
          Inserts a Booking object into the database.
 void insertCustomerEvent(java.lang.String storeId, S_CustomerEvent event)
          The customer event is written to a queue and control is immediately returned to the caller.
 void insertCustomerTag(java.lang.String storeId, java.lang.String sessionId, S_CustomerTag tag)
          Assigns a customer tag to the customer referenced by the sessionId.
 void insertCustomerTagForGuest(java.lang.String storeId, int customerId, S_CustomerTag tag)
          Assigns a customer tag to the guest customer referenced by the customerId which must have a negative value.
 int insertDigitalDownload(java.lang.String storeId, java.lang.String sessionId, int productId)
          Create and insert a digital download record for the product identified by the productId and the customer identified by the sessionId.
 int insertSubscription(java.lang.String storeId, java.lang.String sessionId, S_Subscription subscription)
          A Subscription object is inserted into the database.
 boolean isEmailValid(java.lang.String storeId, java.lang.String emailAddr)
          Determines whether the eMail address is valid
 java.lang.String login(java.lang.String storeId, java.lang.String emailAddr, java.lang.String password)
          Returns a 16 byte long session key is the login is successful, otherwise it returns null.
 java.lang.String loginByAdmin(java.lang.String storeId, java.lang.String adminSession, int customerId)
          Used to log in to the application as a customer by an Administrator.
 void logout(java.lang.String storeId, java.lang.String sessionId)
          Logs out the user with the specified session Id.
 void mergeBaskets(java.lang.String storeId, java.lang.String sessionId, int customerFromId)
          Add all items from the basket of customerFrom to the basket of the customer associated to the sessionId.
 void mergeBasketsWithOptions(java.lang.String storeId, java.lang.String sessionId, int customerFromId, S_AddToBasketOptions options)
          Add all items from the basket of customerFrom to the basket of the customer associated to the sessionId.
 void mergeWishListsWithOptions(java.lang.String storeId, java.lang.String sessionId, int customerFromId, int languageId, S_AddToWishListOptions options)
          Add all items from the wish list of customerFrom to the wish list of customerTo which is retrieved from the sessionId.
 int pointsAvailable(java.lang.String storeId, java.lang.String sessionId)
          Calculates the number of reward points available for the customer identified by the sessionId parameter.
 void postMessageToQueue(java.lang.String storeId, java.lang.String sessionId, S_MqOptions options)
          Post a message to a specified queue.
 S_MqResponse readMessageFromQueue(java.lang.String storeId, java.lang.String sessionId, S_MqOptions options)
          Read a single message from a specified queue.
 int registerCustomer(java.lang.String storeId, S_CustomerRegistration custReg)
          Receives all of the necessary parameters from the Customer Registration object to create a new customer in the database.
 void removeBasketItemsPerCustomer(java.lang.String storeId, java.lang.String sessionId, int customerId)
          All Basket objects that exist for this customer are deleted.
 void removeFromBasket(java.lang.String storeId, java.lang.String sessionId, int customerId, S_Basket item)
          The Basket object is deleted.
 void removeFromWishList(java.lang.String storeId, java.lang.String sessionId, int wishListItemId)
          Remove the WishListItem object referenced by wishListItemId.
 void removeFromWishListWithOptions(java.lang.String storeId, java.lang.String sessionId, int wishListItemId, S_AddToWishListOptions options)
          Remove the WishListItem object referenced by wishListItemId.
 int reservePoints(java.lang.String storeId, java.lang.String sessionId, int points)
          Removes a number of reward points from the total for the customer identified by the sessionId parameter.
 int saveIpnHistory(java.lang.String storeId, java.lang.String sessionId, S_IpnHistory ipnHistory)
          A new IpnHistory (Instant Product Notification) record is created in the database.
 int saveOrder(java.lang.String storeId, java.lang.String sessionId, S_Order order, int languageId)
          A new order is created in the DB.
 java.lang.String saveSSOToken(java.lang.String storeId, S_SSOToken token)
          Saves the SSOToken in the database and returns a UUID secret key identifier.
 S_Orders searchForOrdersPerCustomer(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, S_OrderSearch orderSearch, int languageId)
          Retrieve a number of orders for the customer referenced by the sessionId for the given language.
 S_Products searchForProducts(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, S_ProductSearch prodSearch, int languageId)
          Returns all products using the given language.
 S_Products searchForProductsWithOptions(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, S_ProductSearch prodSearch, int languageId, S_FetchProductOptions options)
          An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from.
 S_WishLists searchForWishLists(java.lang.String storeId, java.lang.String sessionId, S_DataDescriptor dataDesc, S_CustomerSearch customerSearch)
          All wish lists matching the search criteria will be returned.
 S_Zone[] searchForZones(java.lang.String storeId, S_ZoneSearch search)
          Search for zones using various search criteria
 void sendNewPassword(java.lang.String storeId, java.lang.String emailAddr, java.lang.String subject, java.lang.String countryCode)
          Deprecated.  
 S_Email sendNewPassword1(java.lang.String storeId, java.lang.String emailAddr, S_EmailOptions options)
          A mail is sent to emailAddr containing a new password.
 void sendOrderConfirmationEmail(java.lang.String storeId, java.lang.String sessionId, int orderId, java.lang.String mailSubject, int languageId)
          Deprecated.  
 S_Email sendOrderConfirmationEmail1(java.lang.String storeId, java.lang.String sessionId, int orderId, int langIdForOrder, S_EmailOptions options)
          A confirmation mail is sent after submitting an order.
 void sendTemplateEmailToCustomer(java.lang.String storeId, int customerId, java.lang.String templateName, java.lang.String message, java.lang.String countryCode)
          Deprecated.  
 S_Email sendTemplateEmailToCustomer1(java.lang.String storeId, int customerId, java.lang.String message, S_EmailOptions options)
          This method is used to send a template based eMail to a customer identified by the customerId.
 void sendWelcomeEmail(java.lang.String storeId, int customerId, java.lang.String mailSubject, java.lang.String countryCode)
          Deprecated.  
 S_Email sendWelcomeEmail1(java.lang.String storeId, int customerId, S_EmailOptions options)
          A welcome email is sent after registration of a new customer.
 void setCookie(java.lang.String storeId, S_KKCookie cookie)
          Saves the cookie in the database.
 void setCreditCardDetailsOnOrder(java.lang.String storeId, java.lang.String sessionId, int orderId, S_CreditCard card)
          The credit card details in the CreditCard object passed in as a parameter, are saved in the database for an existing order.
 void setDefaultAddressPerCustomer(java.lang.String storeId, java.lang.String sessionId, int addressId)
          Sets the default address for this customer to be the address identified by addressId.
 void setEndpoint(java.lang.String storeId, java.lang.String wsEndpoint)
          Set the Web Service endpoint for the engine.
 void setRewardPointReservationId(java.lang.String storeId, java.lang.String sessionId, int orderId, int reservationId)
          Verifies that the order belongs to the customer identified by the sessionId parameter and then updates the reservation id on the order.
 void updateBasket(java.lang.String storeId, java.lang.String sessionId, int customerId, S_Basket item)
          Updates the Basket object in the database.
 void updateBasketWithOptions(java.lang.String storeId, java.lang.String sessionId, int customerId, S_Basket item, S_AddToBasketOptions options)
          Updates the Basket object in the database.
 S_Basket[] updateBasketWithStockInfo(java.lang.String storeId, S_Basket[] basketItems)
          Receives an array of basket items and updates each one with the current stock level.
 S_Basket[] updateBasketWithStockInfoWithOptions(java.lang.String storeId, S_Basket[] basketItems, S_AddToBasketOptions options)
          Receives an array of basket items and updates each one with the current stock level.
 void updateCachedConfigurations(java.lang.String storeId)
          Wherever in the engine any configurations have been cached, they are refreshed when this method is called.
 int updateDigitalDownloadCount(java.lang.String storeId, java.lang.String sessionId, int productId)
          Updates the count of the Digital Download identified by the productId and the customer identified by the sessionId.
 int updateDigitalDownloadCountById(java.lang.String storeId, java.lang.String sessionId, int digitalDownloadId)
          Updates the count of the Digital Download identified by the digitalDownloadId and the customer identified by the sessionId.
 void updateInventory(java.lang.String storeId, java.lang.String sessionId, int orderId)
          If the STOCK_LIMITED configuration variable is set to true, we subtract the products in stock by the product orders.
 void updateInventoryWithOptions(java.lang.String storeId, java.lang.String sessionId, int orderId, S_CreateOrderOptions options)
          If options is set to null, this method is identical to updateInventory().
 void updateManufacturerViewedCount(java.lang.String storeId, int manufacturerId, int languageId)
          It updates the number of times that the manufacturer referenced by manufacturerId, has been clicked on, to view the home page.
 void updateProductViewedCount(java.lang.String storeId, int productId, int languageId)
          It updates the number of times that the product referenced by productId, has been viewed.
 int writeReview(java.lang.String storeId, java.lang.String sessionId, S_Review review)
          Receives all of the necessary parameters from the Review object to create a new review in the database.
 
Methods inherited from class com.konakart.rmi.KKRMIEngServerBase
getRmiEngine, handleThrowable
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KKRMIEngServer

public KKRMIEngServer()
               throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException
Method Detail

getAllLanguages

public S_Language[] getAllLanguages(java.lang.String storeId)
                             throws java.rmi.RemoteException
Returns an array of Language classes containing all of the languages that have been defined within the system.

Specified by:
getAllLanguages in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
Array of Language objects
Throws:
java.rmi.RemoteException

getDefaultLanguage

public S_Language getDefaultLanguage(java.lang.String storeId)
                              throws java.rmi.RemoteException
The default language is referenced by a configuration variable called DEFAULT_LANGUAGE. If this variable isn't set, then the method returns the language with the lowest sort order value. We assume that this language is the default language and will be used when no other language is specified.

Specified by:
getDefaultLanguage in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
Returns a language object
Throws:
java.rmi.RemoteException

getLanguagePerCode

public S_Language getLanguagePerCode(java.lang.String storeId,
                                     java.lang.String code)
                              throws java.rmi.RemoteException
Retrieves the language object referenced by the two letter code (i.e. en, de, es)

Specified by:
getLanguagePerCode in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
code - The two letter language code such as en, de, es etc.
Returns:
Returns a language object
Throws:
java.rmi.RemoteException

getLanguagePerId

public S_Language getLanguagePerId(java.lang.String storeId,
                                   int languageId)
                            throws java.rmi.RemoteException
Retrieves the language object referenced by the id.

Specified by:
getLanguagePerId in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
languageId - The numeric id of the language object
Returns:
Returns a language object
Throws:
java.rmi.RemoteException

getCategoryTree

public S_Category[] getCategoryTree(java.lang.String storeId,
                                    int languageId,
                                    boolean getNumProducts)
                             throws java.rmi.RemoteException
Returns a category tree structure consisting of an array of top level categories, each of which may contain an array of child categories.

The name of the category is language dependent and will be returned in the language defined by the languageId parameter.

Each Category class contains a numberOfProducts field that describes how many products exist for that category. It is only calculated if the getNumProducts input parameter is set to true. For performance reasons this parameter should be set to false if numberOfProducts is not required.

Specified by:
getCategoryTree in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
languageId - The id for the language that will be used to determine the Category name. Value of -1 selects the default language.
getNumProducts - A boolean that specifies whether the Category objects should have the numberOfProducts attribute set.
Returns:
Array of Category objects
Throws:
java.rmi.RemoteException

getProductsPerCategory

public S_Products getProductsPerCategory(java.lang.String storeId,
                                         java.lang.String sessionId,
                                         S_DataDescriptor dataDesc,
                                         int categoryId,
                                         boolean searchInSubCats,
                                         int languageId)
                                  throws java.rmi.RemoteException
Returns a Products object for the given category and language.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getProductsPerCategory in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
categoryId - The numeric id of the category
searchInSubCats - Determines whether products are searched for in the sub-categories of the specified category
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

getProductsPerCategoryWithOptions

public S_Products getProductsPerCategoryWithOptions(java.lang.String storeId,
                                                    java.lang.String sessionId,
                                                    S_DataDescriptor dataDesc,
                                                    int categoryId,
                                                    boolean searchInSubCats,
                                                    int languageId,
                                                    S_FetchProductOptions options)
                                             throws java.rmi.RemoteException
An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from. If options is set to null, then this call is identical to getProductsPerCategory().

Returns a Products object for the given category and language.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getProductsPerCategoryWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
categoryId - The numeric id of the category
searchInSubCats - Determines whether products are searched for in the sub-categories of the specified category
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

getProductsPerCategoryPerManufacturer

public S_Products getProductsPerCategoryPerManufacturer(java.lang.String storeId,
                                                        java.lang.String sessionId,
                                                        S_DataDescriptor dataDesc,
                                                        int categoryId,
                                                        int manufacturerId,
                                                        int languageId)
                                                 throws java.rmi.RemoteException
Returns a Products object for the given category, language and manufacturer.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getProductsPerCategoryPerManufacturer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
categoryId - The numeric id of the category
languageId - The id for the language that will be used. Value of -1 selects the default language.
manufacturerId - The numeric id of the manufacturer
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

getProductsPerCategoryPerManufacturerWithOptions

public S_Products getProductsPerCategoryPerManufacturerWithOptions(java.lang.String storeId,
                                                                   java.lang.String sessionId,
                                                                   S_DataDescriptor dataDesc,
                                                                   int categoryId,
                                                                   int manufacturerId,
                                                                   int languageId,
                                                                   S_FetchProductOptions options)
                                                            throws java.rmi.RemoteException
An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from. If options is set to null, then this call is identical to getProductsPerCategoryPerManufacture().

Returns a Products object for the given category, language and manufacturer.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getProductsPerCategoryPerManufacturerWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
categoryId - The numeric id of the category
languageId - The id for the language that will be used. Value of -1 selects the default language.
manufacturerId - The numeric id of the manufacturer
options - An object containing options for the method. It may be set to null.
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

getProductsPerManufacturer

public S_Products getProductsPerManufacturer(java.lang.String storeId,
                                             java.lang.String sessionId,
                                             S_DataDescriptor dataDesc,
                                             int manufacturerId,
                                             int languageId)
                                      throws java.rmi.RemoteException
Returns a Products object for the given manufacturer and language.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getProductsPerManufacturer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
manufacturerId - The numeric id of the manufacturer
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

getProductsPerManufacturerWithOptions

public S_Products getProductsPerManufacturerWithOptions(java.lang.String storeId,
                                                        java.lang.String sessionId,
                                                        S_DataDescriptor dataDesc,
                                                        int manufacturerId,
                                                        int languageId,
                                                        S_FetchProductOptions options)
                                                 throws java.rmi.RemoteException
An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from. If options is set to null, then this call is identical to getProductsPerManufacturer().

Returns a Products object for the given manufacturer and language.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getProductsPerManufacturerWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
manufacturerId - The numeric id of the manufacturer
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

getProduct

public S_Product getProduct(java.lang.String storeId,
                            java.lang.String sessionId,
                            int productId,
                            int languageId)
                     throws java.rmi.RemoteException
Returns a complete Product object for the given productId and language.

Returns null if no product is found. The specialPrice is null if a special offer doesn't exist for the product.

Specified by:
getProduct in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
productId - The numeric id of the product
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
A Product object
Throws:
java.rmi.RemoteException

getProductWithOptions

public S_Product getProductWithOptions(java.lang.String storeId,
                                       java.lang.String sessionId,
                                       int productId,
                                       int languageId,
                                       S_FetchProductOptions options)
                                throws java.rmi.RemoteException
An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from. If options is set to null, then this call is identical to getProduct().

Returns a complete Product object for the given productId and language.

Returns null if no product is found. The specialPrice is null if a special offer doesn't exist for the product.

Specified by:
getProductWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
productId - The numeric id of the product
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
A Product object
Throws:
java.rmi.RemoteException

getCategoriesPerManufacturer

public S_Category[] getCategoriesPerManufacturer(java.lang.String storeId,
                                                 int manufacturerId,
                                                 int languageId)
                                          throws java.rmi.RemoteException
Returns an array of leaf Category objects for the given manufacturer.

Specified by:
getCategoriesPerManufacturer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
manufacturerId - The numeric id of the manufacturer
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Array of Category objects
Throws:
java.rmi.RemoteException

getCategoriesPerProduct

public S_Category[] getCategoriesPerProduct(java.lang.String storeId,
                                            int productId,
                                            int languageId)
                                     throws java.rmi.RemoteException
Returns an array of Category objects for the given product.

Specified by:
getCategoriesPerProduct in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
productId - The numeric id of the product
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Array of Category objects
Throws:
java.rmi.RemoteException

getManufacturersPerCategory

public S_Manufacturer[] getManufacturersPerCategory(java.lang.String storeId,
                                                    int categoryId)
                                             throws java.rmi.RemoteException
Returns an array of Manufacturer objects for the given category. They are sorted by name.

The Manufacturer objects are not complete. Only the name and the image are returned and these are language independent.

Specified by:
getManufacturersPerCategory in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
categoryId - The numeric id of the category
Returns:
Array of Manufacturer objects
Throws:
java.rmi.RemoteException

getAllManufacturers

public S_Manufacturer[] getAllManufacturers(java.lang.String storeId)
                                     throws java.rmi.RemoteException
Returns an array of Manufacturer objects for all of the manufacturers in the system. They are sorted by name.

The Manufacturer objects are not complete. Only the name and the image and custom fields 1 and 2 are returned, and these are language independent.

Specified by:
getAllManufacturers in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
Array of Manufacturer objects
Throws:
java.rmi.RemoteException

getManufacturerPerProduct

public S_Manufacturer getManufacturerPerProduct(java.lang.String storeId,
                                                int productId,
                                                int languageId)
                                         throws java.rmi.RemoteException
Returns a complete Manufacturer object for the given productId and language.

Specified by:
getManufacturerPerProduct in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
productId - The numeric id of the product
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Manufacturer object
Throws:
java.rmi.RemoteException

getManufacturer

public S_Manufacturer getManufacturer(java.lang.String storeId,
                                      int manufacturerId,
                                      int languageId)
                               throws java.rmi.RemoteException
Returns a complete Manufacturer object for the given manufacturerId and language.

Specified by:
getManufacturer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
manufacturerId - The numeric id of the manufacturer
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Manufacturer object
Throws:
java.rmi.RemoteException

getCategory

public S_Category getCategory(java.lang.String storeId,
                              int categoryId,
                              int languageId)
                       throws java.rmi.RemoteException
Returns a complete single Category object for the given categoryId and language. It does not populate the children even if they exist. It does populate the MiscItem array.

Specified by:
getCategory in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
categoryId - The numeric id of the category
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Category object
Throws:
java.rmi.RemoteException

getSpecialsPerCategory

public S_Products getSpecialsPerCategory(java.lang.String storeId,
                                         java.lang.String sessionId,
                                         S_DataDescriptor dataDesc,
                                         int categoryId,
                                         boolean searchInSubCats,
                                         int languageId)
                                  throws java.rmi.RemoteException
Returns all specials for the given categoryId and language.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero.

However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getSpecialsPerCategory in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
categoryId - The numeric id of the category
searchInSubCats - Determines whether products are searched for in the sub-categories of the specified category
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

getAllSpecials

public S_Products getAllSpecials(java.lang.String storeId,
                                 java.lang.String sessionId,
                                 S_DataDescriptor dataDesc,
                                 int languageId)
                          throws java.rmi.RemoteException
Returns all specials using the given language.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getAllSpecials in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

getAllProducts

public S_Products getAllProducts(java.lang.String storeId,
                                 java.lang.String sessionId,
                                 S_DataDescriptor dataDesc,
                                 int languageId)
                          throws java.rmi.RemoteException
Returns all products using the given language.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getAllProducts in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

getAllProductsWithOptions

public S_Products getAllProductsWithOptions(java.lang.String storeId,
                                            java.lang.String sessionId,
                                            S_DataDescriptor dataDesc,
                                            int languageId,
                                            S_FetchProductOptions options)
                                     throws java.rmi.RemoteException
An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from. If options is set to null, then this call is identical to getAllProducts().

Returns all products using the given language.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getAllProductsWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

getReviewsPerProduct

public S_Reviews getReviewsPerProduct(java.lang.String storeId,
                                      S_DataDescriptor dataDesc,
                                      int productId)
                               throws java.rmi.RemoteException
An array of review objects is returned for the given productId.

The averageRating attribute of the reviews is calculated and set by the method.

All reviews are retrieved, regardless of the language. dataDesc may be null. In this case, the number of retrieved reviews is limited to a default number, the reviews are ordered by the ReviewId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getReviewsPerProduct in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
productId - The numeric id of the product
Returns:
Return a Reviews object
Throws:
java.rmi.RemoteException

getReview

public S_Review getReview(java.lang.String storeId,
                          int reviewId)
                   throws java.rmi.RemoteException
An review object is returned for the given reviewId. The averageRating attribute of the review is calculated and set by the method.

Specified by:
getReview in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
reviewId - The numeric id of the review
Returns:
Return a Review object
Throws:
java.rmi.RemoteException

getAllReviews

public S_Reviews getAllReviews(java.lang.String storeId,
                               S_DataDescriptor dataDesc)
                        throws java.rmi.RemoteException
An array of review objects is returned. All reviews are retrieved, regardless of the language.

dataDesc may be null. In this case, the number of retrieved reviews is limited to a default number, the reviews are ordered by the ReviewId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getAllReviews in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
Returns:
Return a Reviews object
Throws:
java.rmi.RemoteException

searchForProducts

public S_Products searchForProducts(java.lang.String storeId,
                                    java.lang.String sessionId,
                                    S_DataDescriptor dataDesc,
                                    S_ProductSearch prodSearch,
                                    int languageId)
                             throws java.rmi.RemoteException
Returns all products using the given language. The ProductSearch class contains the search criteria.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
searchForProducts in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
prodSearch - Contains information used to search the catalog for a product
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

searchForProductsWithOptions

public S_Products searchForProductsWithOptions(java.lang.String storeId,
                                               java.lang.String sessionId,
                                               S_DataDescriptor dataDesc,
                                               S_ProductSearch prodSearch,
                                               int languageId,
                                               S_FetchProductOptions options)
                                        throws java.rmi.RemoteException
An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from. If options is set to null, then this call is identical to searchForProducts().

Returns all products using the given language. The ProductSearch class contains the search criteria.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The description will only be set if specified in the ProductSearch object passed in as a parameter. The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
searchForProductsWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
prodSearch - Contains information used to search the catalog for a product
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
Returns a Products object
Throws:
java.rmi.RemoteException

registerCustomer

public int registerCustomer(java.lang.String storeId,
                            S_CustomerRegistration custReg)
                     throws java.rmi.RemoteException
Receives all of the necessary parameters from the Customer Registration object to create a new customer in the database. If the customer has already registered, an exception is thrown

If the country has at least one zone defined in the database, then we verify that the State attribute of the CustomerRegistration object matches one of the defined zones, otherwise a kkInvalidZoneException is thrown. If a match is found, then the zoneId is saved in the database table. If no zones are defined for the country, then we don't make the check and save the State attribute directly in the database.

Specified by:
registerCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
custReg - Contains all the required data in order to register a new customer
Returns:
Id of the customer that was created.
Throws:
java.rmi.RemoteException

forceRegisterCustomer

public int forceRegisterCustomer(java.lang.String storeId,
                                 S_CustomerRegistration custReg)
                          throws java.rmi.RemoteException
This API Call is used rather than registerCustomer() when you want to provide a store that doesn't force a customer to register. It registers a customer as a temporary customer and allows you to register this customer more than once as long as the customer remains temporary. i.e. Doesn't go through a proper registration process.

KonaKart requires a temporary customer (one that has never registered) to be present in its database even if the store doesn't require registration. If a temporary customer with the same eMail address already exists, then this customer is deleted. An exception is thrown if a non-temporary customer (one that has registered) exists with the same eMail. You must still supply a password (which can be randomly generated) which you must then use to log in the customer so that he can checkout.

If your online store lets users choose whether to register or not, this method should be used if a user decides not to register since you still require to gather the user's personal details such as name and address.

If the country has at least one zone defined in the database, then we verify that the State attribute of the CustomerRegistration object matches one of the defined zones, otherwise a kkInvalidZoneException is thrown. If a match is found, then the zoneId is saved in the database table. If no zones are defined for the country, then we don't make the check and save the State attribute directly in the database.

Specified by:
forceRegisterCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
custReg - Contains all the required data in order to register a new customer
Returns:
Id of the customer that was created.
Throws:
java.rmi.RemoteException

getAllCountries

public S_Country[] getAllCountries(java.lang.String storeId)
                            throws java.rmi.RemoteException
Returns an array of Country objects for all of the countries in the system. They are sorted by name. This method is used to create the drop list of countries during the customer registration process.

Specified by:
getAllCountries in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
Array of Country objects
Throws:
java.rmi.RemoteException

login

public java.lang.String login(java.lang.String storeId,
                              java.lang.String emailAddr,
                              java.lang.String password)
                       throws java.rmi.RemoteException
Returns a 16 byte long session key is the login is successful, otherwise it returns null.

Specified by:
login in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
emailAddr - The user name required to log in
password - The log in password
Returns:
sessionId The sessionId which must be used in subsequent API calls to identify the user
Throws:
java.rmi.RemoteException

logout

public void logout(java.lang.String storeId,
                   java.lang.String sessionId)
            throws java.rmi.RemoteException
Logs out the user with the specified session Id.

Specified by:
logout in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session Id of the logged in user
Throws:
java.rmi.RemoteException

getAddressesPerCustomer

public S_Address[] getAddressesPerCustomer(java.lang.String storeId,
                                           java.lang.String sessionId)
                                    throws java.rmi.RemoteException
Returns all of the addresses registered for the given customer. An exception is thrown if the sessionId isn't valid.

Specified by:
getAddressesPerCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
Returns:
An array of address objects where the first one is the primary address. Returns an empty array if no addresses exist.
Throws:
java.rmi.RemoteException

getAddressesPerManufacturer

public S_Address[] getAddressesPerManufacturer(java.lang.String storeId,
                                               int manufacturerId)
                                        throws java.rmi.RemoteException
Gets an array of Address objects that have been defined for the manufacturer referenced by the manufacturerId.

Specified by:
getAddressesPerManufacturer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
manufacturerId -
Returns:
Returns an array of Address objects. Returns an empty array if no addresses exist.
Throws:
java.rmi.RemoteException

getAddressesPerProduct

public S_Address[] getAddressesPerProduct(java.lang.String storeId,
                                          int productId)
                                   throws java.rmi.RemoteException
Gets an array of Address objects that have been defined for the product referenced by the productId. The primary address(es) are first in the list.

Specified by:
getAddressesPerProduct in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
productId -
Returns:
Returns an array of Address objects. Returns an empty array if no addresses exist.
Throws:
java.rmi.RemoteException

getDefaultAddressPerCustomer

public S_Address getDefaultAddressPerCustomer(java.lang.String storeId,
                                              java.lang.String sessionId)
                                       throws java.rmi.RemoteException
Returns the default address for the given customer. An exception is thrown if the sessionId isn't valid.

Specified by:
getDefaultAddressPerCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
Returns:
An address object or null if it doesn't exist.
Throws:
java.rmi.RemoteException

setDefaultAddressPerCustomer

public void setDefaultAddressPerCustomer(java.lang.String storeId,
                                         java.lang.String sessionId,
                                         int addressId)
                                  throws java.rmi.RemoteException
Sets the default address for this customer to be the address identified by addressId. A check is made to determine whether an address exists with that id and that it belongs to the customer logged in with this sessionId.

Specified by:
setDefaultAddressPerCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
addressId - The numeric id of the address object
Throws:
java.rmi.RemoteException

addAddressToCustomer

public int addAddressToCustomer(java.lang.String storeId,
                                java.lang.String sessionId,
                                S_Address addr)
                         throws java.rmi.RemoteException
The Address object is added to the customer defined by the sessionId. The id of the address object is ignored since it is calculated during the insertion process. The zoneId is also calculated unless addr.isUseZoneId()is set to true. In this case the zoneId from the address object is used. The customerId of the address object is also ignored. An exception is thrown if the sessionId isn't valid.

Specified by:
addAddressToCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
addr - The address object which will be added to the customer
Returns:
Id of the new address object. A negative return value indicates an error.
Throws:
java.rmi.RemoteException

deleteAddressFromCustomer

public void deleteAddressFromCustomer(java.lang.String storeId,
                                      java.lang.String sessionId,
                                      int addressId)
                               throws java.rmi.RemoteException
The address defined by the sessionId and addressId is deleted. The customerId is retrieved from the session. An exception is thrown if the session isn't valid and if the address referenced by the addressId doesn't belong to the customer referenced by the sessionId. An exception is also thrown if we attempt to delete the default address.

Specified by:
deleteAddressFromCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
addressId - The numeric id of the address object
Throws:
java.rmi.RemoteException

editCustomerAddress

public void editCustomerAddress(java.lang.String storeId,
                                java.lang.String sessionId,
                                S_Address addr)
                         throws java.rmi.RemoteException
The Address object will replace the existing address object in the database with the same id. A check is made to verify that the address object belongs to the customer logged in with the sessionId passed in as a parameter. The zoneId is ignored since it is calculated during the insertion process, unless addr.isUseZoneId()is set to true. In this case the zoneId from the address object is used. The addressId is used to identify the address object. The customerId attribute of the address object is ignored since it is obtained from the sessionId. An exception is thrown if the session isn't valid.

Specified by:
editCustomerAddress in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
addr - The address object to edit
Throws:
java.rmi.RemoteException

getCustomer

public S_Customer getCustomer(java.lang.String storeId,
                              java.lang.String sessionId)
                       throws java.rmi.RemoteException
Returns the customer object for the customer defined by the given sessionId. Throws an exception if the session has expired.

Specified by:
getCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
Returns:
Customer Object or Null if the customer doesn't exist.
Throws:
java.rmi.RemoteException

editCustomer

public void editCustomer(java.lang.String storeId,
                         java.lang.String sessionId,
                         S_Customer cust)
                  throws java.rmi.RemoteException
The Customer object will replace the existing customer object in the database. cust has to be the same customer logged in with a valid sessionId. Only non null attributes or integers not equal to -1 will be used (i.e. set an integer field to -1 if you do not want to change it).

The attributes from the Customer object that are used are :

Specified by:
editCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
cust - The customer object to edit
Throws:
java.rmi.RemoteException

getKonakartTimeStamp

public java.util.Calendar getKonakartTimeStamp(java.lang.String storeId)
                                        throws java.rmi.RemoteException
Get a Date Time Stamp from the server

Specified by:
getKonakartTimeStamp in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
Calendar
Throws:
java.rmi.RemoteException

writeReview

public int writeReview(java.lang.String storeId,
                       java.lang.String sessionId,
                       S_Review review)
                throws java.rmi.RemoteException
Receives all of the necessary parameters from the Review object to create a new review in the database. The new review is associated to the customer logged in with sessionId.

The obligatory parameters are :

Specified by:
writeReview in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
review - The review that will be inserted
Returns:
Id of the review that was created.
Throws:
java.rmi.RemoteException

checkSession

public int checkSession(java.lang.String storeId,
                        java.lang.String sessionId)
                 throws java.rmi.RemoteException
The given sessionId is checked to see whether it exists and whether it is has timed out. If it is valid, the expiry attribute is updated. An exception is thrown if it is not valid.

Specified by:
checkSession in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
Returns:
Returns customerId of customer pointed to by session
Throws:
java.rmi.RemoteException

addToBasket

public int addToBasket(java.lang.String storeId,
                       java.lang.String sessionId,
                       int customerId,
                       S_Basket item)
                throws java.rmi.RemoteException
Saves the Basket object in the database for a customer. If the Basket object already exists with exactly the same options etc, then we just increase the quantity of the existing object.

The Basket object does not have to be fully populated. The compulsory attributes are:

If the customer is logged in to the application, then a valid sessionId is required and the customerId is ignored. Otherwise, the sessionId may be set to null and the method will use the customerId, ensuring that the customer is not a registered customer by checking that the customerId is negative. All registered customers have positive ids.

Specified by:
addToBasket in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
customerId - The numeric id of the customer
item - The basket item to add to the basket
Returns:
Returns the id of the newly created Basket object
Throws:
java.rmi.RemoteException

addToBasketWithOptions

public int addToBasketWithOptions(java.lang.String storeId,
                                  java.lang.String sessionId,
                                  int customerId,
                                  S_Basket item,
                                  S_AddToBasketOptions options)
                           throws java.rmi.RemoteException
If options is set to null, this method is identical to addToBasket(). Otherwise the functionality differs depending on the combination of options set.

Saves the Basket object in the database for a customer. If the Basket object already exists with exactly the same options etc, then we either just increase the quantity of the existing object or we add a new object. This depends on the options.

The Basket object does not have to be fully populated. The compulsory attributes are:

If the customer is logged in to the application, then a valid sessionId is required and the customerId is ignored. Otherwise, the sessionId may be set to null and the method will use the customerId, ensuring that the customer is not a registered customer by checking that the customerId is negative. All registered customers have positive ids.

Specified by:
addToBasketWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
customerId - The numeric id of the customer
item - The basket item to add to the basket
options - An object containing options for the method. It may be set to null.
Returns:
Returns the id of the newly created Basket object
Throws:
java.rmi.RemoteException

mergeBaskets

public void mergeBaskets(java.lang.String storeId,
                         java.lang.String sessionId,
                         int customerFromId)
                  throws java.rmi.RemoteException
Add all items from the basket of customerFrom to the basket of the customer associated to the sessionId. The customer receiving the basket items, must be logged on, which is why the method parameter is a sessionId and not a customerId. This method is normally called when a customer logs on, in order to move his temporary basket to his permanent basket. The items are merged into the target basket. i.e. If a similar item already exists, then the quantity is increased.

Specified by:
mergeBaskets in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
customerFromId - The numeric id of the customer that has the temporary basket
Throws:
java.rmi.RemoteException

mergeBasketsWithOptions

public void mergeBasketsWithOptions(java.lang.String storeId,
                                    java.lang.String sessionId,
                                    int customerFromId,
                                    S_AddToBasketOptions options)
                             throws java.rmi.RemoteException
Add all items from the basket of customerFrom to the basket of the customer associated to the sessionId. The customer receiving the basket items, must be logged on, which is why the method parameter is a sessionId and not a customerId. This method is normally called when a customer logs on, in order to move his temporary basket to his permanent basket. The items are merged into the target basket. i.e. If a similar item already exists, then the quantity is increased.

If options is set to null then this call is identical to mergeBaskets(). The options may determine from where we read the price and quantity of the basket items.

Specified by:
mergeBasketsWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
customerFromId - The numeric id of the customer that has the temporary basket
options - An object containing options for the method. It may be set to null.
Throws:
java.rmi.RemoteException

updateBasket

public void updateBasket(java.lang.String storeId,
                         java.lang.String sessionId,
                         int customerId,
                         S_Basket item)
                  throws java.rmi.RemoteException
Updates the Basket object in the database.

The only attributes that may be changed are:

If the customer is logged in to the application, then a valid sessionId is required and the customerId is ignored. Otherwise, the sessionId may be set to null and the method will use the customerId, ensuring that the customer is not a registered customer by checking that the customerId is negative. All registered customers have positive ids.

A check is also made to ensure that the basket item being modified, actually belongs to the customer.

Specified by:
updateBasket in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
customerId - The numeric id of the customer
item - The basket item to update
Throws:
java.rmi.RemoteException

updateBasketWithOptions

public void updateBasketWithOptions(java.lang.String storeId,
                                    java.lang.String sessionId,
                                    int customerId,
                                    S_Basket item,
                                    S_AddToBasketOptions options)
                             throws java.rmi.RemoteException
Updates the Basket object in the database.

The only attributes that may be changed are:

If the customer is logged in to the application, then a valid sessionId is required and the customerId is ignored. Otherwise, the sessionId may be set to null and the method will use the customerId, ensuring that the customer is not a registered customer by checking that the customerId is negative. All registered customers have positive ids.

A check is also made to ensure that the basket item being modified, actually belongs to the customer.

If options is set to null, this method is identical to updateBasket(). Otherwise the functionality differs depending on the combination of options set.

Specified by:
updateBasketWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
customerId - The numeric id of the customer
item - The basket item to update
options - An object containing options for the method. It may be set to null.
Throws:
java.rmi.RemoteException

removeFromBasket

public void removeFromBasket(java.lang.String storeId,
                             java.lang.String sessionId,
                             int customerId,
                             S_Basket item)
                      throws java.rmi.RemoteException
The Basket object is deleted.

If the customer is logged in to the application, then a valid sessionId is required and the customerId is ignored. Otherwise, the sessionId may be set to null and the method will use the customerId, ensuring that the customer is not a registered customer by checking that the customerId is negative. All registered customers have positive ids.

A check is also made to ensure that the basket item being deleted, actually belongs to the customer.

Specified by:
removeFromBasket in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
customerId - The numeric id of the customer
item - The basket item to delete
Throws:
java.rmi.RemoteException

removeBasketItemsPerCustomer

public void removeBasketItemsPerCustomer(java.lang.String storeId,
                                         java.lang.String sessionId,
                                         int customerId)
                                  throws java.rmi.RemoteException
All Basket objects that exist for this customer are deleted.

If the customer is logged in to the application, then a valid sessionId is required and the customerId is ignored. Otherwise, the sessionId may be set to null and the method will use the customerId, ensuring that the customer is not a registered customer by checking that the customerId is negative. All registered customers have positive ids.

Specified by:
removeBasketItemsPerCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
customerId - The numeric id of the customer
Throws:
java.rmi.RemoteException

getBasketItemsPerCustomer

public S_Basket[] getBasketItemsPerCustomer(java.lang.String storeId,
                                            java.lang.String sessionId,
                                            int customerId,
                                            int languageId)
                                     throws java.rmi.RemoteException
Get the basket items for a customer and language.

Each basket item has an instantiated product object.

If the customer is logged in to the application, then a valid sessionId is required and the customerId is ignored. Otherwise, the sessionId may be set to null and the method will use the customerId , ensuring that the customer is not a registered customer by checking that the customerId is negative. All registered customers have positive ids.

Specified by:
getBasketItemsPerCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
customerId - The numeric id of the customer
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns an array of Basket objects
Throws:
java.rmi.RemoteException

getBasketItemsPerCustomerWithOptions

public S_Basket[] getBasketItemsPerCustomerWithOptions(java.lang.String storeId,
                                                       java.lang.String sessionId,
                                                       int customerId,
                                                       int languageId,
                                                       S_AddToBasketOptions options)
                                                throws java.rmi.RemoteException
Get the basket items for a customer and language. Each basket item has an instantiated product object.

If the customer is logged in to the application, then a valid sessionId is required and the customerId is ignored. Otherwise, the sessionId may be set to null and the method will use the customerId , ensuring that the customer is not a registered customer by checking that the customerId is negative. All registered customers have positive ids.

If options is set to null then this call is identical to getBasketItemsPerCustomer(). The options may determine from where we read the price and quantity of the basket items.

Specified by:
getBasketItemsPerCustomerWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
customerId - The numeric id of the customer
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
Returns an array of Basket objects
Throws:
java.rmi.RemoteException

getDefaultCurrency

public S_Currency getDefaultCurrency(java.lang.String storeId)
                              throws java.rmi.RemoteException
The default currency is referenced by a configuration variable called DEFAULT_CURRENCY. If this isn't found then we return the currency in the currency table with the lowest id.

Specified by:
getDefaultCurrency in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
Returns a currency object
Throws:
java.rmi.RemoteException

getAllCurrencies

public S_Currency[] getAllCurrencies(java.lang.String storeId)
                              throws java.rmi.RemoteException
Returns an array of currency objects for all the records in the currencies table.

Specified by:
getAllCurrencies in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
Returns an array of currency objects
Throws:
java.rmi.RemoteException

getConfigurations

public S_KKConfiguration[] getConfigurations(java.lang.String storeId)
                                      throws java.rmi.RemoteException
Returns an array of Configuration objects containing all configurations that have been defined in the system.

Specified by:
getConfigurations in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
An array of Configuration objects.
Throws:
java.rmi.RemoteException

getConfiguration

public S_KKConfiguration getConfiguration(java.lang.String storeId,
                                          java.lang.String key)
                                   throws java.rmi.RemoteException
Returns a Configuration object referenced by the key passed in as a parameter

Specified by:
getConfiguration in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
key - The key of the configuration object
Returns:
A Configuration object
Throws:
java.rmi.RemoteException

getConfigurationValue

public java.lang.String getConfigurationValue(java.lang.String storeId,
                                              java.lang.String key)
                                       throws java.rmi.RemoteException
Returns a Configuration Value referenced by the key passed in as a parameter

Specified by:
getConfigurationValue in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
key - The key of the configuration object
Returns:
A Configuration Value or null if the key does not exist
Throws:
java.rmi.RemoteException

getConfigurationValueAsInt

public int getConfigurationValueAsInt(java.lang.String storeId,
                                      java.lang.String key)
                               throws java.rmi.RemoteException
Returns a Configuration Value as an integer for the key passed in as a parameter

Specified by:
getConfigurationValueAsInt in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
key - the Configuration Key
Returns:
A Configuration Value as an integer or KKConstants.NOT_SET if the key isn't found.
Throws:
java.rmi.RemoteException - if there is a problem converting the configuration value into an integer.

getConfigurationValueAsIntWithDefault

public int getConfigurationValueAsIntWithDefault(java.lang.String storeId,
                                                 java.lang.String key,
                                                 int def)
                                          throws java.rmi.RemoteException
Returns a Configuration Value as an integer for the key passed in as a parameter

Specified by:
getConfigurationValueAsIntWithDefault in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
key - the Configuration Key
def - default value to return if the key isn't found.
Returns:
A Configuration Value as an integer or the default value if the key isn't found.
Throws:
java.rmi.RemoteException - if there is a problem converting the configuration value into an integer.

getConfigurationValueAsBigDecimal

public java.math.BigDecimal getConfigurationValueAsBigDecimal(java.lang.String storeId,
                                                              java.lang.String key)
                                                       throws java.rmi.RemoteException
Returns a Configuration Value as a BigDecimal for the key passed in as a parameter

Specified by:
getConfigurationValueAsBigDecimal in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
key - the Configuration Key
Returns:
A Configuration Value as a BigDecimal or null if the key isn't found.
Throws:
java.rmi.RemoteException - if there is a problem converting the configuration value into a BigDecimal.

getConfigurationValueAsBigDecimalWithDefault

public java.math.BigDecimal getConfigurationValueAsBigDecimalWithDefault(java.lang.String storeId,
                                                                         java.lang.String key,
                                                                         java.math.BigDecimal def)
                                                                  throws java.rmi.RemoteException
Returns a Configuration Value as a BigDecimal for the key passed in as a parameter

Specified by:
getConfigurationValueAsBigDecimalWithDefault in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
key - the Configuration Key
def - default value to use if the key doesn't exist.
Returns:
A Configuration Value as a BigDecimal or the default value if the key isn't found.
Throws:
java.rmi.RemoteException - if there is a problem converting the configuration value into a BigDecimal.

getConfigurationValueAsBool

public java.lang.Boolean getConfigurationValueAsBool(java.lang.String storeId,
                                                     java.lang.String key,
                                                     java.lang.Boolean def)
                                              throws java.rmi.RemoteException
Returns a Configuration Value as a Boolean for the key passed in as a parameter

Specified by:
getConfigurationValueAsBool in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
key - the Configuration Key
def - the default value to be returned if there's a problem
Returns:
A Configuration Value as a Boolean or the default value if the key isn't found.
Throws:
java.rmi.RemoteException

editConfiguration

public void editConfiguration(java.lang.String storeId,
                              java.lang.String key,
                              java.lang.String value)
                       throws java.rmi.RemoteException
Edits an existing configuration. Throws an exception if the configuration doesn't exist.

Specified by:
editConfiguration in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
key - The key of the configuration object
value - The new value for the configuration
Throws:
java.rmi.RemoteException

changePassword

public void changePassword(java.lang.String storeId,
                           java.lang.String sessionId,
                           java.lang.String currentPassword,
                           java.lang.String newPassword)
                    throws java.rmi.RemoteException
Ensures that the current password is correct, and then changes it to the new password. It allows any password length and relies on the application to ensure that a minimum length is guaranteed. Throws an exception if the currentPassword doesn't match.

Specified by:
changePassword in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
currentPassword - The current password of the logged in user
newPassword - The new password of the logged in user
Throws:
java.rmi.RemoteException

getProductNotificationsPerCustomer

public S_Product[] getProductNotificationsPerCustomer(java.lang.String storeId,
                                                      java.lang.String sessionId,
                                                      int languageId)
                                               throws java.rmi.RemoteException
Returns all products sorted by name, that the customer has asked to be notified about. An exception is thrown if the sessionId isn't valid.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

Specified by:
getProductNotificationsPerCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns a Product array
Throws:
java.rmi.RemoteException

getProductNotificationsPerCustomerWithOptions

public S_Product[] getProductNotificationsPerCustomerWithOptions(java.lang.String storeId,
                                                                 java.lang.String sessionId,
                                                                 int languageId,
                                                                 S_FetchProductOptions options)
                                                          throws java.rmi.RemoteException
An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from. If options is set to null, then this call is identical to getProductNotificationsPerCustomer().

Returns all products sorted by name, that the customer has asked to be notified about. An exception is thrown if the sessionId isn't valid.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. The specialPrice is null if a special offer doesn't exist for the product.

Specified by:
getProductNotificationsPerCustomerWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
Returns a Product array
Throws:
java.rmi.RemoteException

addProductNotificationToCustomer

public void addProductNotificationToCustomer(java.lang.String storeId,
                                             java.lang.String sessionId,
                                             int productId)
                                      throws java.rmi.RemoteException
Adds a product notification to the list of notifications for the customer. An exception is thrown if the sessionId isn't valid.

Specified by:
addProductNotificationToCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
productId - The numeric id of the product
Throws:
java.rmi.RemoteException

deleteProductNotificationFromCustomer

public void deleteProductNotificationFromCustomer(java.lang.String storeId,
                                                  java.lang.String sessionId,
                                                  int productId)
                                           throws java.rmi.RemoteException
Deletes a product notification from the list of notifications for the customer. An exception is thrown if the sessionId isn't valid.

Specified by:
deleteProductNotificationFromCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
productId - The numeric id of the product
Throws:
java.rmi.RemoteException

updateProductViewedCount

public void updateProductViewedCount(java.lang.String storeId,
                                     int productId,
                                     int languageId)
                              throws java.rmi.RemoteException
It updates the number of times that the product referenced by productId, has been viewed. The languageId is required because a separate count is kept for how many times the product has been viewed in each supported language.

Specified by:
updateProductViewedCount in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
productId - The numeric id of the product
languageId - The id for the language that will be used. Value of -1 selects the default language.
Throws:
java.rmi.RemoteException

getBestSellers

public S_Product[] getBestSellers(java.lang.String storeId,
                                  S_DataDescriptor dataDesc,
                                  int categoryId,
                                  int languageId)
                           throws java.rmi.RemoteException
Returns an array of bestseller products for the category referenced by categoryId and its children. The products are returned in the language referenced by languageId. If the categoryId is equal to 0, then it is not used as a constraint for the query.

dataDesc defines the ordering of the products and the number of products returned.

Specified by:
getBestSellers in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
categoryId - The numeric id of the category
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
An array of products
Throws:
java.rmi.RemoteException

getBestSellersWithOptions

public S_Product[] getBestSellersWithOptions(java.lang.String storeId,
                                             S_DataDescriptor dataDesc,
                                             int categoryId,
                                             int languageId,
                                             S_FetchProductOptions options)
                                      throws java.rmi.RemoteException
An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from. If options is set to null, then this call is identical to getBestSellers().

Returns an array of bestseller products for the category referenced by categoryId and its children. The products are returned in the language referenced by languageId. If the categoryId is equal to 0, then it is not used as a constraint for the query.

dataDesc defines the ordering of the products and the number of products returned.

Specified by:
getBestSellersWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
categoryId - The numeric id of the category
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
An array of products
Throws:
java.rmi.RemoteException

getOrdersPerCustomer

public S_Orders getOrdersPerCustomer(java.lang.String storeId,
                                     S_DataDescriptor dataDesc,
                                     java.lang.String sessionId,
                                     int languageId)
                              throws java.rmi.RemoteException
Retrieve a number of orders for the customer referenced by the sessionId. The orders are always returned sorted by date (most recent orders first). dataDesc is used to retrieve offset and limit information. If null, the offset defaults to 0 and a default limit is used.

Specified by:
getOrdersPerCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
sessionId - The session id of the logged in user
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
An Orders object
Throws:
java.rmi.RemoteException

searchForOrdersPerCustomer

public S_Orders searchForOrdersPerCustomer(java.lang.String storeId,
                                           java.lang.String sessionId,
                                           S_DataDescriptor dataDesc,
                                           S_OrderSearch orderSearch,
                                           int languageId)
                                    throws java.rmi.RemoteException
Retrieve a number of orders for the customer referenced by the sessionId for the given language. The OrderSearch class contains the search criteria although it may be null.

dataDesc may be null. In this case, the number of retrieved orders is limited to a default number, the orders are ordered by the OrderId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
searchForOrdersPerCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
orderSearch - Contains information used to add serach constraints
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
An Orders object
Throws:
java.rmi.RemoteException

getOrder

public S_Order getOrder(java.lang.String storeId,
                        java.lang.String sessionId,
                        int orderId,
                        int languageId)
                 throws java.rmi.RemoteException
Gets on order with the specified order Id, for the customer referenced by the sessionId.

Specified by:
getOrder in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
orderId - The numeric id of the order
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
An order object
Throws:
java.rmi.RemoteException

getCurrency

public S_Currency getCurrency(java.lang.String storeId,
                              java.lang.String currencyCode)
                       throws java.rmi.RemoteException
Returns the currency referenced by currencyCode.

Specified by:
getCurrency in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
currencyCode - The 3 letter currency code (i.e. USD, EUR ..)
Returns:
Returns a currency object
Throws:
java.rmi.RemoteException

createOrder

public S_Order createOrder(java.lang.String storeId,
                           java.lang.String sessionId,
                           S_Basket[] basketItemArray,
                           int languageId)
                    throws java.rmi.RemoteException
An order object is returned with all addresses populated with the default address of the customer referenced by sessionId. The products added to the order are retrieved from the basketItemArray. The returned object has not been saved in the DB and so an Order Id has not yet been assigned.

Null is returned if the products and/or product options referenced by the array of basket items are no longer available.

Specified by:
createOrder in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
basketItemArray - The array of basket items to add to the order
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Order object
Throws:
java.rmi.RemoteException

createOrderWithOptions

public S_Order createOrderWithOptions(java.lang.String storeId,
                                      java.lang.String sessionId,
                                      S_Basket[] basketItemArray,
                                      S_CreateOrderOptions options,
                                      int languageId)
                               throws java.rmi.RemoteException
If options is set to null, this method is identical to createOrder(). Otherwise the functionality differs depending on the combination of options set.

An order object is returned with all addresses populated with the default address of the customer referenced by sessionId. The products added to the order are retrieved from the basketItemArray. The returned object has not been saved in the DB and so an Order Id has not yet been assigned.

Null is returned if the products and/or product options referenced by the array of basket items are no longer available.

One available option is to automatically copy all of the basket custom fields to the orderProduct custom fields which are generated from the basket items.

Another option allows you to leave the seesionId null and to use a default customer. This default customer needs to be setup using the Admin App and is used to create a temporary order even before the customer logs in or registers, so that he can view the order totals in the window that shows him the cart details. These order totals give an indication of the shipping cost and also show any discounts available. The Administrator can create a default customer that matches his typical customer. For example if a store normally ships overseas, then the default customer can be set up with an overseas address so that the shipping costs are calculated at overseas rates.

A further option is to use the shipping address retrieved from a wish list if the wish list id of any one of the basket items is set to a valid wish list. This is useful in the case of gift registries to ship the gifts directly to the owner of the registry.

Specified by:
createOrderWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
basketItemArray - The array of basket items to add to the order
options - An object containing options for the method. It may be set to null.
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Order object
Throws:
java.rmi.RemoteException

getOrderHistory

public S_Product[] getOrderHistory(java.lang.String storeId,
                                   S_DataDescriptor dataDesc,
                                   java.lang.String sessionId,
                                   int languageId)
                            throws java.rmi.RemoteException
Get a list of the products ordered by the customer referenced by sessionId. The number of products returned and the return order is determined by the dataDesc parameter. The default OrderBy is "ORDER_BY_NAME_ASCENDING".

Specified by:
getOrderHistory in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
sessionId - The session id of the logged in user
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns an array of products
Throws:
java.rmi.RemoteException

getOrderHistoryWithOptions

public S_Product[] getOrderHistoryWithOptions(java.lang.String storeId,
                                              S_DataDescriptor dataDesc,
                                              java.lang.String sessionId,
                                              int languageId,
                                              S_FetchProductOptions options)
                                       throws java.rmi.RemoteException
An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from. If options is set to null, then this call is identical to getOrderHistory().

Get a list of the products ordered by the customer referenced by sessionId. The number of products returned and the return order is determined by the dataDesc parameter. The default OrderBy is "ORDER_BY_NAME_ASCENDING".

Specified by:
getOrderHistoryWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
sessionId - The session id of the logged in user
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
Returns an array of products
Throws:
java.rmi.RemoteException

getAlsoPurchased

public S_Product[] getAlsoPurchased(java.lang.String storeId,
                                    java.lang.String sessionId,
                                    S_DataDescriptor dataDesc,
                                    int productId,
                                    int languageId)
                             throws java.rmi.RemoteException
Find products that were in the same order as orders containing the product referenced by productId. The return order of the products is by purchase date. dataDesc determines the number of products returned.

sessionId may be set to null. If it is valid, then the customer information is used to calculate the tax. Otherwise the store location is used.

Specified by:
getAlsoPurchased in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
productId - The numeric id of the product
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns an array of products
Throws:
java.rmi.RemoteException

getAlsoPurchasedWithOptions

public S_Product[] getAlsoPurchasedWithOptions(java.lang.String storeId,
                                               java.lang.String sessionId,
                                               S_DataDescriptor dataDesc,
                                               int productId,
                                               int languageId,
                                               S_FetchProductOptions options)
                                        throws java.rmi.RemoteException
An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from. If options is set to null, then this call is identical to getAlsoPurchased().

Find products that were in the same order as orders containing the product referenced by productId. The return order of the products is by purchase date. dataDesc determines the number of products returned.

sessionId may be set to null. If it is valid, then the customer information is used to calculate the tax. Otherwise the store location is used.

Specified by:
getAlsoPurchasedWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
productId - The numeric id of the product
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
Returns an array of products
Throws:
java.rmi.RemoteException

getRelatedProducts

public S_Products getRelatedProducts(java.lang.String storeId,
                                     java.lang.String sessionId,
                                     S_DataDescriptor dataDesc,
                                     int productId,
                                     int relationType,
                                     int languageId)
                              throws java.rmi.RemoteException
Find products related to the product defined by the productId parameter.

The relationType defines the relation. Valid values for relationType are:

When all relationships are returned by setting relationType to 0, the prodRelationType attribute of the returned products is set, so that the information about the type of relationship is not lost.

Specified by:
getRelatedProducts in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order. It may be null, in which case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero.
productId - The numeric id of the product
relationType - The numeric relation type defining up selling, cross selling etc.
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Array of products
Throws:
java.rmi.RemoteException

getRelatedProductsWithOptions

public S_Products getRelatedProductsWithOptions(java.lang.String storeId,
                                                java.lang.String sessionId,
                                                S_DataDescriptor dataDesc,
                                                int productId,
                                                int relationType,
                                                int languageId,
                                                S_FetchProductOptions options)
                                         throws java.rmi.RemoteException
An options object is passed in to customize from where some of the product attributes (such as price and quantity) are fetched from. If options is set to null, then this call is identical to getRelatedProducts().

Find products related to the product defined by the productId parameter. The relationType defines the relation. Valid values for relationType are:

When all relationships are returned by setting relationType to 0, the prodRelationType attribute of the returned products is set, so that the information about the type of relationship is not lost.

Specified by:
getRelatedProductsWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order. It may be null, in which case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero.
productId - The numeric id of the product
relationType - The numeric relation type defining up selling, cross selling etc.
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null. This object contains an attribute called invertRelatedProductDirection which If true, inverts the direction of the related product link. This is especially useful for bundled products, so rather than discovering the products within a bundle, you can determine which bundles a product belongs to by setting this attribute to true.
Returns:
Array of products
Throws:
java.rmi.RemoteException

getCountryPerName

public S_Country getCountryPerName(java.lang.String storeId,
                                   java.lang.String countryName)
                            throws java.rmi.RemoteException
Returns the country object for the countryName, or null if the country doesn't exist in the DB. If there is more than one country with the same name, we return the first one that we find.

Specified by:
getCountryPerName in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
countryName - The name of the country
Returns:
Returns a country object
Throws:
java.rmi.RemoteException

getCountry

public S_Country getCountry(java.lang.String storeId,
                            int countryId)
                     throws java.rmi.RemoteException
Returns the country object for the countryId, or null if the country doesn't exist in the DB.

Specified by:
getCountry in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
countryId - The id of the country object
Returns:
Returns a country object
Throws:
java.rmi.RemoteException

getShippingQuotes

public S_ShippingQuote[] getShippingQuotes(java.lang.String storeId,
                                           S_Order order,
                                           int languageId)
                                    throws java.rmi.RemoteException
All active installed shipping modules are called in order to get an array of shipping quotes. This is normally called to display a selection of quotes to the customer during the checkout process.

Specified by:
getShippingQuotes in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
order - The order object
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns an array of shipping quotes
Throws:
java.rmi.RemoteException

getShippingQuote

public S_ShippingQuote getShippingQuote(java.lang.String storeId,
                                        S_Order order,
                                        java.lang.String moduleName,
                                        int languageId)
                                 throws java.rmi.RemoteException
The shipping module called moduleName is called to get a shipping quote for the order passed in as a parameter. Null is returned if the shipping module isn't available.

Specified by:
getShippingQuote in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
order - The order object
moduleName - e.g. flat or item or table etc.
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Return a shipping quote
Throws:
java.rmi.RemoteException

changeDeliveryAddress

public S_Order changeDeliveryAddress(java.lang.String storeId,
                                     java.lang.String sessionId,
                                     S_Order order,
                                     S_Address deliveryAddress)
                              throws java.rmi.RemoteException
The delivery address of the order is changed and the tax rates for the various products within the order are re-calculated.

Specified by:
changeDeliveryAddress in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
order - The order object
deliveryAddress - The address object containing the delivery address
Returns:
Returns an order with modified delivery address
Throws:
java.rmi.RemoteException

getTaxRate

public java.math.BigDecimal getTaxRate(java.lang.String storeId,
                                       int countryId,
                                       int zoneId,
                                       int taxClassId)
                                throws java.rmi.RemoteException
Calculates the tax rate for a product with a taxClassId delivered to a country ( countryId) and zone (zoneId). There may be multiple tax rates which are added and / or compounded as appropriate.

Specified by:
getTaxRate in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
countryId - The numeric id of the country
zoneId - The numeric id of the zone
taxClassId - The numeric id of the taxClass
Returns:
Returns the tax rate
Throws:
java.rmi.RemoteException

getTax

public java.math.BigDecimal getTax(java.lang.String storeId,
                                   java.math.BigDecimal cost,
                                   int countryId,
                                   int zoneId,
                                   int taxClassId)
                            throws java.rmi.RemoteException
Calculates the tax for a product with a taxClassId and cost, delivered to a country (countryId) and zone (zoneId).

Specified by:
getTax in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
cost - The cost of the product
countryId - The numeric id of the country
zoneId - The numeric id of the zone
taxClassId - The numeric id of the taxClass
Returns:
Returns the tax amount
Throws:
java.rmi.RemoteException

addTax

public java.math.BigDecimal addTax(java.lang.String storeId,
                                   java.math.BigDecimal cost,
                                   int countryId,
                                   int zoneId,
                                   int taxClassId)
                            throws java.rmi.RemoteException
Calculates the final cost (including tax) for a product with a certain taxClassId and cost, delivered to a country (countryId ) and zone (zoneId).

Specified by:
addTax in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
cost - The cost of the product
countryId - The numeric id of the country
zoneId - The numeric id of the zone
taxClassId - The numeric id of the taxClass
Returns:
Returns the cost inclusive of tax
Throws:
java.rmi.RemoteException

getOrderTotals

public S_Order getOrderTotals(java.lang.String storeId,
                              S_Order order,
                              int languageId)
                       throws java.rmi.RemoteException
The order object is populated with an array of order totals. The order totals depend on the order total modules installed.

Specified by:
getOrderTotals in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
order - The order object
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
An order object
Throws:
java.rmi.RemoteException

getPaymentGateways

public S_PaymentDetails[] getPaymentGateways(java.lang.String storeId,
                                             S_Order order,
                                             int languageId)
                                      throws java.rmi.RemoteException
Each payment module is called and asked to return a PaymentDetails object. This method is called during the checkout process before the order has been saved and confirmed by the user. Therefore it does not compile the exact details for the payment (i.e. the parameters passed to a payment gateway) since this will be done later for the selected payment module. The returned PaymentDetails object contains the information required for the user to select it.

Based on the zone of the billing address, the module may decide that it cannot process payment for that zone and so not even return a PaymentDetails object.

Specified by:
getPaymentGateways in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
order - The order object
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Return an array of PaymentDetail objects
Throws:
java.rmi.RemoteException

getPaymentGateway

public S_PaymentDetails getPaymentGateway(java.lang.String storeId,
                                          S_Order order,
                                          java.lang.String moduleName,
                                          int languageId)
                                   throws java.rmi.RemoteException
The payment module called moduleName is called to get a PaymentDetails object for the order passed in as a parameter. Null is returned if the PaymentDetails object isn't available.

Based on the zone of the billing address, the module may decide that it cannot process payment for that zone and so in this case, null is returned.

Specified by:
getPaymentGateway in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
order - The order object
moduleName - This is the name of the payment module in lower case. Examples are cod, paypal, usaepay, worldpay etc.
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Return a PaymentDetail object
Throws:
java.rmi.RemoteException

getPaymentDetails

public S_PaymentDetails getPaymentDetails(java.lang.String storeId,
                                          java.lang.String sessionId,
                                          java.lang.String moduleCode,
                                          int orderId,
                                          java.lang.String hostAndPort,
                                          int languageId)
                                   throws java.rmi.RemoteException
This method is called once a payment gateway has been selected and an order has been saved in the database. The order is read from the database and the details of the payment are retrieved from the order. This ensures that the payment request matches the order exactly.

The module matching the moduleCode is called in order to get a fully populated PaymentDetails object containing all of the required parameters etc. for the payment gateway.

Specified by:
getPaymentDetails in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
moduleCode - This is the name of the payment module in lower case. Examples are cod, paypal, usaepay, worldpay etc.
orderId - The numeric id of the order
hostAndPort - The host and port in the format "host:port" for the KonaKart servlet engine.
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Return an array of PaymentDetail objects
Throws:
java.rmi.RemoteException

getPaymentDetailsPerOrder

public S_PaymentDetails getPaymentDetailsPerOrder(java.lang.String storeId,
                                                  java.lang.String sessionId,
                                                  java.lang.String moduleCode,
                                                  S_Order order,
                                                  java.lang.String hostAndPort,
                                                  int languageId)
                                           throws java.rmi.RemoteException
This method is called once a payment gateway has been selected even if the order has not been saved in the database. The details of the payment are retrieved from the order.

The module matching the moduleCode is called in order to get a fully populated PaymentDetails object containing all of the required parameters etc. for the payment gateway.

Specified by:
getPaymentDetailsPerOrder in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
moduleCode - This is the name of the payment module in lower case. Examples are cod, paypal, usaepay, worldpay etc.
order - The order object
hostAndPort - The host and port in the format "host:port" for the KonaKart servlet engine.
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Return an array of PaymentDetail objects
Throws:
java.rmi.RemoteException

saveOrder

public int saveOrder(java.lang.String storeId,
                     java.lang.String sessionId,
                     S_Order order,
                     int languageId)
              throws java.rmi.RemoteException
A new order is created in the DB. The Order object parameter should have all addresses populated (customer, billing and delivery). The status of the newly created order is taken from the order itself. A check is made to determine whether the status exists within the orders_status table.

To save an order we have to write into a few DB tables: orders, orders_products, orders_products_attributes, orders_total, orders_status_history. We do this in a single transaction.

Specified by:
saveOrder in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
order - The order object
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns the order id
Throws:
java.rmi.RemoteException

getStatusText

public java.lang.String getStatusText(java.lang.String storeId,
                                      int statusId,
                                      int languageId)
                               throws java.rmi.RemoteException
Returns the text of a status from the orders_status table. This table contains order status descriptions in different languages.

Specified by:
getStatusText in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
statusId - The numeric id of the OrderStatus object
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns the text of the status. Returns Null if not found.
Throws:
java.rmi.RemoteException

changeOrderStatus

public void changeOrderStatus(java.lang.String storeId,
                              java.lang.String sessionId,
                              int orderId,
                              int status,
                              boolean customerNotified,
                              java.lang.String comments)
                       throws java.rmi.RemoteException
The state of the order referenced by the orderId parameter is changed, and an orders_status_history record is added to the order to keep track of the change.

Specified by:
changeOrderStatus in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
orderId - The numeric id of the order
status - The new numeric state of the order. Valid states are defined in the database.
customerNotified - If you send an eMail to the customer to notify him of the state change then set this to true to register the fact that an eMail has been sent
comments - These comments are written into the orders_status_history record
Throws:
java.rmi.RemoteException

updateInventory

public void updateInventory(java.lang.String storeId,
                            java.lang.String sessionId,
                            int orderId)
                     throws java.rmi.RemoteException
If the STOCK_LIMITED configuration variable is set to true, we subtract the products in stock by the product orders. If we hit the STOCK_REORDER_LEVEL, then we instantiate a class defined by the STOCK_REORDER_CLASS and call it. If STOCK_ALLOW_CHECKOUT is set to true, when we hit zero items in stock we don't touch the status, otherwise we disable the product when the quantity reaches zero by setting the status to zero.

Specified by:
updateInventory in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
orderId - The numeric id of the order
Throws:
java.rmi.RemoteException

updateInventoryWithOptions

public void updateInventoryWithOptions(java.lang.String storeId,
                                       java.lang.String sessionId,
                                       int orderId,
                                       S_CreateOrderOptions options)
                                throws java.rmi.RemoteException
If options is set to null, this method is identical to updateInventory(). Otherwise the functionality differs depending on the combination of options set.

If the STOCK_LIMITED configuration variable is set to true, we subtract the products in stock by the product orders. If we hit the STOCK_REORDER_LEVEL, then we instantiate a class defined by the STOCK_REORDER_CLASS and call it. If STOCK_ALLOW_CHECKOUT is set to true, when we hit zero items in stock we don't touch the status, otherwise we disable the product when the quantity reaches zero by setting the status to zero.

Specified by:
updateInventoryWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
orderId - The numeric id of the order
options - An object containing options for the method. It may be set to null.
Throws:
java.rmi.RemoteException

sendNewPassword

public void sendNewPassword(java.lang.String storeId,
                            java.lang.String emailAddr,
                            java.lang.String subject,
                            java.lang.String countryCode)
                     throws java.rmi.RemoteException
Deprecated. 

A mail is sent to emailAddr containing a new password. The language of the email depends on the two letter country code which is used to choose the correct template for creating the mail.

Specified by:
sendNewPassword in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
emailAddr - Address of the email
subject - Subject of the email
countryCode - Two letter code used to pick correct template
Throws:
java.rmi.RemoteException

sendNewPassword1

public S_Email sendNewPassword1(java.lang.String storeId,
                                java.lang.String emailAddr,
                                S_EmailOptions options)
                         throws java.rmi.RemoteException
A mail is sent to emailAddr containing a new password.

Valid options are:

The Velocity context contains the following data:

Specified by:
sendNewPassword1 in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
emailAddr - Address of the email
options - Options for the email
Returns:
Returns an Email object containing the content of the email
Throws:
java.rmi.RemoteException

sendWelcomeEmail

public void sendWelcomeEmail(java.lang.String storeId,
                             int customerId,
                             java.lang.String mailSubject,
                             java.lang.String countryCode)
                      throws java.rmi.RemoteException
Deprecated. 

A welcome email is sent after registration of a new customer. The language of the email depends on the two letter country code which is used to choose the correct template for creating the mail.

Specified by:
sendWelcomeEmail in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The numeric id of the customer
mailSubject - The subject of the email
countryCode - The two letter country code used to select the velocity template that creates the mail
Throws:
java.rmi.RemoteException

sendWelcomeEmail1

public S_Email sendWelcomeEmail1(java.lang.String storeId,
                                 int customerId,
                                 S_EmailOptions options)
                          throws java.rmi.RemoteException
A welcome email is sent after registration of a new customer.

Valid options are:

The Velocity context contains the following data:

Specified by:
sendWelcomeEmail1 in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The numeric id of the customer
options - Options for the email
Returns:
Returns an Email object containing the content of the email
Throws:
java.rmi.RemoteException

sendOrderConfirmationEmail

public void sendOrderConfirmationEmail(java.lang.String storeId,
                                       java.lang.String sessionId,
                                       int orderId,
                                       java.lang.String mailSubject,
                                       int languageId)
                                throws java.rmi.RemoteException
Deprecated. 

A confirmation mail is sent after submitting an order. The language of the email depends on the languageId which is used to choose the correct template for creating the mail.

Specified by:
sendOrderConfirmationEmail in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
orderId - The numeric id of the order
mailSubject - The subject of the email
languageId - The id for the language that will be used. Value of -1 selects the default language.
Throws:
java.rmi.RemoteException

sendOrderConfirmationEmail1

public S_Email sendOrderConfirmationEmail1(java.lang.String storeId,
                                           java.lang.String sessionId,
                                           int orderId,
                                           int langIdForOrder,
                                           S_EmailOptions options)
                                    throws java.rmi.RemoteException
A confirmation mail is sent after submitting an order.

Valid options are:

The Velocity context contains the following data:

Specified by:
sendOrderConfirmationEmail1 in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
orderId - The numeric id of the order
langIdForOrder - The languageId used for retrieving the order, to translate things such as order status. Value of -1 selects the default language.
options - Options for the email
Returns:
Returns an Email object containing the content of the email
Throws:
java.rmi.RemoteException

getSecretKeyForOrderId

public java.lang.String getSecretKeyForOrderId(java.lang.String storeId,
                                               int orderId)
                                        throws java.rmi.RemoteException
A secret key is generated and stored in the database for the orderId passed as a parameter.

Specified by:
getSecretKeyForOrderId in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
orderId -
Returns:
Returns the secret key
Throws:
java.rmi.RemoteException

getOrderIdFromSecretKey

public int getOrderIdFromSecretKey(java.lang.String storeId,
                                   java.lang.String secretKey)
                            throws java.rmi.RemoteException
When an order is created, a secret key is generated that may be used to send to the payment gateway if the payment gateway uses a callback mechanism. The payment gateway should re-send the secret key as a parameter of the callback so that we can look up the order referenced by the key. The secret key is unique for each order.

Specified by:
getOrderIdFromSecretKey in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
secretKey - A string representing the secret key
Returns:
Returns the orderId referenced to by the secretKey. A negative number is returned if no order is found.
Throws:
java.rmi.RemoteException

deleteOrderIdForSecretKey

public void deleteOrderIdForSecretKey(java.lang.String storeId,
                                      java.lang.String secretKey)
                               throws java.rmi.RemoteException
The secret key is removed from the system. This should be done once payment has been received and no other callbacks are expected from the payment gateway.

Specified by:
deleteOrderIdForSecretKey in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
secretKey - A string representing the secret key
Throws:
java.rmi.RemoteException

saveIpnHistory

public int saveIpnHistory(java.lang.String storeId,
                          java.lang.String sessionId,
                          S_IpnHistory ipnHistory)
                   throws java.rmi.RemoteException
A new IpnHistory (Instant Product Notification) record is created in the database. This should be called every time a payment gateway does a callback with information about the payment. The saved record contains data received from the payment gateway, the exact format of which is normally defined by the code that is called when the callback is received.

Specified by:
saveIpnHistory in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
ipnHistory - The IpnHistory object to save
Returns:
Returns the id of the new ipnHistory object
Throws:
java.rmi.RemoteException

updateManufacturerViewedCount

public void updateManufacturerViewedCount(java.lang.String storeId,
                                          int manufacturerId,
                                          int languageId)
                                   throws java.rmi.RemoteException
It updates the number of times that the manufacturer referenced by manufacturerId, has been clicked on, to view the home page. The languageId is required because a separate count is kept for how many times the manufacturer home page has been viewed in each supported language.

Specified by:
updateManufacturerViewedCount in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
manufacturerId - The numeric id of the manufacturer
languageId - The id for the language that will be used. Value of -1 selects the default language.
Throws:
java.rmi.RemoteException

getZonesPerCountry

public S_Zone[] getZonesPerCountry(java.lang.String storeId,
                                   int countryId)
                            throws java.rmi.RemoteException
Returns an array of Zone objects for the country referenced by the countryId.

Specified by:
getZonesPerCountry in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
countryId - The numeric id of the country
Returns:
Return an array of Zone objects
Throws:
java.rmi.RemoteException

searchForZones

public S_Zone[] searchForZones(java.lang.String storeId,
                               S_ZoneSearch search)
                        throws java.rmi.RemoteException
Search for zones using various search criteria

Specified by:
searchForZones in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
search -
Returns:
Returns an array of Zone objects
Throws:
java.rmi.RemoteException

updateCachedConfigurations

public void updateCachedConfigurations(java.lang.String storeId)
                                throws java.rmi.RemoteException
Wherever in the engine any configurations have been cached, they are refreshed when this method is called.

Specified by:
updateCachedConfigurations in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Throws:
java.rmi.RemoteException

doesCustomerExistForEmail

public boolean doesCustomerExistForEmail(java.lang.String storeId,
                                         java.lang.String emailAddr)
                                  throws java.rmi.RemoteException
Determine whether a customer has already registered with a certain eMail address as their user name.

Specified by:
doesCustomerExistForEmail in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
emailAddr - The user name in the format of an email address
Returns:
Returns true if a customer is registered with the eMail address passed in as a parameter. Otherwise it returns false.
Throws:
java.rmi.RemoteException

isEmailValid

public boolean isEmailValid(java.lang.String storeId,
                            java.lang.String emailAddr)
                     throws java.rmi.RemoteException
Determines whether the eMail address is valid

Specified by:
isEmailValid in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
emailAddr - A string representing an email address
Returns:
Returns true if the email address is valid. Otherwise returns false.
Throws:
java.rmi.RemoteException

updateBasketWithStockInfo

public S_Basket[] updateBasketWithStockInfo(java.lang.String storeId,
                                            S_Basket[] basketItems)
                                     throws java.rmi.RemoteException
Receives an array of basket items and updates each one with the current stock level. This is a useful check to make before checking out, to see whether the stock level is sufficient. The Date Available is also set to return information as to when the products will be available if they aren't in stock.

If the product or any of the product attributes of a basket item no longer exist, then that basket item is not returned. This means that the size of the returned array may be smaller than the size of the array passed in as a parameter.

Specified by:
updateBasketWithStockInfo in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
basketItems - An array of basket items
Returns:
Returns an array of basket items with updated stock level
Throws:
java.rmi.RemoteException

updateBasketWithStockInfoWithOptions

public S_Basket[] updateBasketWithStockInfoWithOptions(java.lang.String storeId,
                                                       S_Basket[] basketItems,
                                                       S_AddToBasketOptions options)
                                                throws java.rmi.RemoteException
Receives an array of basket items and updates each one with the current stock level. This is a useful check to make before checking out, to see whether the stock level is sufficient. The Date Available is also set to return information as to when the products will be available if they aren't in stock.

If the product or any of the product attributes of a basket item no longer exist, then that basket item is not returned. This means that the size of the returned array may be smaller than the size of the array passed in as a parameter.

If options is set to null, this method is identical to updateBasketWithStockInfo(). Otherwise the functionality differs depending on the combination of options set.

Specified by:
updateBasketWithStockInfoWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
basketItems - An array of basket items
options - An object containing options for the method. It may be set to null.
Returns:
Returns an array of basket items with updated stock level
Throws:
java.rmi.RemoteException

getProductQuantity

public S_ProductQuantity getProductQuantity(java.lang.String storeId,
                                            java.lang.String encodedProductId)
                                     throws java.rmi.RemoteException
The stock level of the product and the date available are returned within a ProductQuantity object. An exception is thrown if the product doesn't exist or if the encoded product id has an invalid format. The format of the encoded product id is 1{2}3{4}5 where the product id = 1, the first optionId / valueId pair have ids of 2,3 and the 2nd optionId / valueId pair have ids of 4,5. If the product has no attributes then the encodedProductId should be just the productId in String format.

If there are no option / value pairs then we use the stock level from the product object. If there is at least one option / value pair, we attempt to find the quantity in the product quantity table. If we can't find it in the product_quantity table we look for at least one record in the product_quantity table for this product id. If we find something then we assume that the quantity is zero. If we find no records, we use the quantity from the product object.

Specified by:
getProductQuantity in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
encodedProductId - The encoded product id which can reference a particular configuration of a product. i.e. A green shirt rather than a blue shirt.
Returns:
A ProductQuantity object containing the stock level of the product and the date available.
Throws:
java.rmi.RemoteException

getProductQuantityWithOptions

public S_ProductQuantity getProductQuantityWithOptions(java.lang.String storeId,
                                                       java.lang.String encodedProductId,
                                                       S_FetchProductOptions options)
                                                throws java.rmi.RemoteException
The stock level of the product and the date available are returned within a ProductQuantity object. An exception is thrown if the product doesn't exist or if the encoded product id has an invalid format. The format of the encoded product id is 1{2}3{4}5 where the product id = 1, the first optionId / valueId pair have ids of 2,3 and the 2nd optionId / valueId pair have ids of 4,5. If the product has no attributes then the encodedProductId should be just the productId in String format.

If there are no option / value pairs then we use the stock level from the product object. If there is at least one option / value pair, we attempt to find the quantity in the product quantity table. If we can't find it in the product_quantity table we look for at least one record in the product_quantity table for this product id. If we find something then we assume that the quantity is zero. If we find no records, we use the quantity from the product object.

The options object is used to set whether the quantity and available date should be fetched from an external table based on the catalogId.

Specified by:
getProductQuantityWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
encodedProductId - The encoded product id which can reference a particular configuration of a product. i.e. A green shirt rather than a blue shirt.
options - An object containing options for the method. It may be set to null.
Returns:
A ProductQuantity object containing the stock level of the product and the date available.
Throws:
java.rmi.RemoteException

createAndSaveOrder

public S_Order createAndSaveOrder(java.lang.String storeId,
                                  java.lang.String emailAddr,
                                  java.lang.String password,
                                  S_CustomerRegistration custReg,
                                  S_Basket[] basketItemArray,
                                  java.lang.String shippingModule,
                                  java.lang.String paymentModule,
                                  int languageId)
                           throws java.rmi.RemoteException
A high level call to simplify the process of creating a KonaKart order. It is convenient to use this call especially when KonaKart is integrated within another application such as a Content Management System.

The caller supplies the user name (email address) and password of the KonaKart user. If the user has not yet been registered, then the caller must also supply a populated CustomerRegistration object, otherwise this can be set to null. The registration is done automatically if the email address doesn't exist in the KonaKart database.

The shipping and payment module names must be names of modules that have been installed in the KonaKart engine.

Specified by:
createAndSaveOrder in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
emailAddr - The user name of the customer creating the order
password - The password of the customer creating the order
custReg - Object that contains all necessary details to register a new customer. Can be set to null if user has already been registered.
basketItemArray - Array of basket items to add to the order
shippingModule - Shipping module to use (null if no shipping required). This parameter must contain the name of the module (i.e. flat or item or table..)
paymentModule - Payment module to use. This parameter must contain the name of the module (i.e. chronopay or cod or worldpay..)
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns an Order object with payment details so that the calling application can call the payment gateway.
Throws:
java.rmi.RemoteException

getSku

public java.lang.String getSku(java.lang.String storeId,
                               S_OrderProduct orderProd)
                        throws java.rmi.RemoteException
Deprecated. 

This method is deprecated since release 4.0.0.0 because an SKU attribute was added to the OrderProduct.

Specified by:
getSku in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
orderProd - The OrderProduct object. An order normally contains an array of order product objects.
Returns:
Returns the SKU for the OrderProduct
Throws:
java.rmi.RemoteException

setEndpoint

public void setEndpoint(java.lang.String storeId,
                        java.lang.String wsEndpoint)
                 throws java.rmi.RemoteException
Set the Web Service endpoint for the engine. This is only applicable when calling a KonaKart engine via web services.

The effect will be to set the web service endpoint for the proxy to the KonaKart engine.

Specified by:
setEndpoint in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
wsEndpoint - A String representing the web service endpoint
Throws:
java.rmi.RemoteException

insertDigitalDownload

public int insertDigitalDownload(java.lang.String storeId,
                                 java.lang.String sessionId,
                                 int productId)
                          throws java.rmi.RemoteException
Create and insert a digital download record for the product identified by the productId and the customer identified by the sessionId. If the digital download already exists, then we overwrite it with the new one.

The attributes of the digital download product such as the maximum number of days that it is valid and how many times it can be downloaded, are retrieved from configuration variables or from the product directly.

Specified by:
insertDigitalDownload in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
productId - The numeric id of the product
Returns:
Returns the id of the inserted Digital Download
Throws:
java.rmi.RemoteException

getDigitalDownloads

public S_DigitalDownload[] getDigitalDownloads(java.lang.String storeId,
                                               java.lang.String sessionId)
                                        throws java.rmi.RemoteException
Returns an array of Digital Download objects for the customer identified by the sessionId parameter.

If the DD_DELETE_ON_EXPIRATION configuration variable is set to "true", then the objects read from the database that have expired, are automatically deleted. This avoids having to maintain the database table. Regardless of the setting of DD_DELETE_ON_EXPIRATION, only valid (not expired) objects are ever returned.

Specified by:
getDigitalDownloads in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
Returns:
Returns an array of DigitalDownload objects
Throws:
java.rmi.RemoteException

updateDigitalDownloadCount

public int updateDigitalDownloadCount(java.lang.String storeId,
                                      java.lang.String sessionId,
                                      int productId)
                               throws java.rmi.RemoteException
Updates the count of the Digital Download identified by the productId and the customer identified by the sessionId. The count defines how many times it has been downloaded.

Specified by:
updateDigitalDownloadCount in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
productId - The numeric id of the product
Returns:
Returns the new count
Throws:
java.rmi.RemoteException

updateDigitalDownloadCountById

public int updateDigitalDownloadCountById(java.lang.String storeId,
                                          java.lang.String sessionId,
                                          int digitalDownloadId)
                                   throws java.rmi.RemoteException
Updates the count of the Digital Download identified by the digitalDownloadId and the customer identified by the sessionId. The count defines how many times it has been downloaded. This is used when there may be many digital downloads for the same product pointing to different files. i.e. Tickets

Specified by:
updateDigitalDownloadCountById in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
digitalDownloadId - The numeric id of the digital download object
Returns:
Returns the new count
Throws:
java.rmi.RemoteException

getTempCustomerId

public int getTempCustomerId(java.lang.String storeId)
                      throws java.rmi.RemoteException
When a customer that hasn't logged in adds products to the shopping cart, we use a temporary customer id which is always negative and unique. This is the engine call used to get the unique negative id.

Specified by:
getTempCustomerId in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
The latest temporaryId
Throws:
java.rmi.RemoteException

getAllCustomerGroups

public S_CustomerGroup[] getAllCustomerGroups(java.lang.String storeId,
                                              int languageId)
                                       throws java.rmi.RemoteException
Returns an array of customer groups for all customer groups that have been defined in the system. The groups returned are those for the language defined by languageId.

Specified by:
getAllCustomerGroups in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
languageId - The id for the language that will be used to determine the customer group name and description. Value of -1 selects the default language.
Returns:
An array of customer group objects.
Throws:
java.rmi.RemoteException

getCustomerGroup

public S_CustomerGroup getCustomerGroup(java.lang.String storeId,
                                        int customerGroupId,
                                        int languageId)
                                 throws java.rmi.RemoteException
Returns a customer group object for the customerGroupId passed in as a parameter.

Specified by:
getCustomerGroup in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerGroupId -
languageId - The id for the language that will be used to determine the customer group name and description. Value of -1 selects the default language.
Returns:
A customer group object.
Throws:
java.rmi.RemoteException

sendTemplateEmailToCustomer

public void sendTemplateEmailToCustomer(java.lang.String storeId,
                                        int customerId,
                                        java.lang.String templateName,
                                        java.lang.String message,
                                        java.lang.String countryCode)
                                 throws java.rmi.RemoteException
Deprecated. 

This method is used to send a template based eMail to a customer identified by the customerId. The attributes that the velocity template has access to are:

We ship an example template called GenericCustEmail_en.vm . Note that the first line of the template is used to generate the subject of the eMail.

Specified by:
sendTemplateEmailToCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The numeric id of the customer
templateName - The name of the template, not including "_countryCode.vm". If the template file name is CustomEmail_en.vm, the parameter must be set to CustomEmail.
message - The information within the message may be used by the template.
countryCode - The two letter country code used to select the velocity template that creates the mail.
Throws:
java.rmi.RemoteException

sendTemplateEmailToCustomer1

public S_Email sendTemplateEmailToCustomer1(java.lang.String storeId,
                                            int customerId,
                                            java.lang.String message,
                                            S_EmailOptions options)
                                     throws java.rmi.RemoteException
This method is used to send a template based eMail to a customer identified by the customerId.

Valid options are:

The Velocity context contains the following data:

Specified by:
sendTemplateEmailToCustomer1 in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The numeric id of the customer
message - The information within the message may be used by the template.
options - Options for the email
Returns:
Returns an Email object containing the content of the email
Throws:
java.rmi.RemoteException

loginByAdmin

public java.lang.String loginByAdmin(java.lang.String storeId,
                                     java.lang.String adminSession,
                                     int customerId)
                              throws java.rmi.RemoteException
Used to log in to the application as a customer by an Administrator. This is useful for Call Center type applications where the Call Center person can log into the application as the customer without requiring the customer's credentials, in order to perform some action on behalf of the customer.

The adminSession must contain the session of a logged in Administrator User. The customerId must contain the Id of the customer to login as.

Specified by:
loginByAdmin in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
adminSession - The session of a logged in administrator user
customerId - The id of the customer to login as
Returns:
Returns the sessionId for the customer's session
Throws:
java.rmi.RemoteException

custom

public java.lang.String custom(java.lang.String storeId,
                               java.lang.String input1,
                               java.lang.String input2)
                        throws java.rmi.RemoteException
A custom interface that you have to provide an implementation for. The default implementation will simply return a null.

There are two versions, one that requires a valid sessionId (customSecure) and one that does not (custom).

You are free to use the two input String parameters in any way you choose, for example you may wish to use one to indicate which of your custom functions to run, and the other might contain XML to give you a great deal of flexibility - but it's up to you!

Specified by:
custom in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
input1 - The first input String - can be anything you choose
input2 - The second input String - can be anything you choose
Returns:
Returns a String
Throws:
java.rmi.RemoteException

customSecure

public java.lang.String customSecure(java.lang.String storeId,
                                     java.lang.String sessionId,
                                     java.lang.String input1,
                                     java.lang.String input2)
                              throws java.rmi.RemoteException
A custom interface that you have to provide an implementation for. The default implementation will throw an exception for an invalid sessionId or return a null.

There are two versions, one that requires a valid sessionId (customSecure) and one that does not (custom).

You are free to use the two input String parameters in any way you choose, for example you may wish to use one to indicate which of your custom functions to run, and the other might contain XML to give you a great deal of flexibility - but it's up to you!

Specified by:
customSecure in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
input1 - The first input String - can be anything you choose
input2 - The second input String - can be anything you choose
Returns:
Returns a String
Throws:
java.rmi.RemoteException

getTagGroupsPerCategory

public S_TagGroup[] getTagGroupsPerCategory(java.lang.String storeId,
                                            int categoryId,
                                            boolean getProdCount,
                                            int languageId)
                                     throws java.rmi.RemoteException
Return an array of TagGroup objects for a category. Each TagGroup is populated with an array of Tags which are sorted first by sort order and then by name. An empty array is returned if no TagGroup objects exist.

Specified by:
getTagGroupsPerCategory in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
categoryId - The numeric id of the category
getProdCount - If true, the Tag objects are populated with the number of products
languageId - The id for the language that will be used to determine the tag group name and description. Value of -1 selects the default language.
Returns:
Returns an array of TagGroup objects
Throws:
java.rmi.RemoteException

getTagsPerCategory

public S_Tag[] getTagsPerCategory(java.lang.String storeId,
                                  int categoryId,
                                  boolean getProdCount,
                                  int languageId)
                           throws java.rmi.RemoteException
Return an array of Tag objects for a category. An empty array is returned if no Tag objects exist. The Tags are sorted first by sort order and then by name.

Specified by:
getTagsPerCategory in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
categoryId - The numeric id of the category
getProdCount - If true, the Tag objects are populated with the number of products
languageId - The id for the language that will be used to determine the tag name. Value of -1 selects the default language.
Returns:
Returns an array of Tag objects
Throws:
java.rmi.RemoteException

getTagGroup

public S_TagGroup getTagGroup(java.lang.String storeId,
                              int tagGroupId,
                              boolean getProdCount,
                              int languageId)
                       throws java.rmi.RemoteException
Returns a TagGroup object for the id passed in as a parameter. The TagGroup is populated with an array of Tags which are sorted first by sort order and then by name. Null is returned if the TagGroup object doesn't exist.

Specified by:
getTagGroup in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
tagGroupId - The numeric Id of the tag group
getProdCount - If true, the Tag objects are populated with the number of products
languageId - The id for the language that will be used to determine the tag group name and description. Value of -1 selects the default language.
Returns:
Returns a TagGroup object
Throws:
java.rmi.RemoteException

getTag

public S_Tag getTag(java.lang.String storeId,
                    int tagId,
                    boolean getProdCount,
                    int languageId)
             throws java.rmi.RemoteException
Returns a Tag object for the id passed in as a parameter.

Specified by:
getTag in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
tagId - The numeric Id of the tag
getProdCount - If true, the Tag object is populated with the number of products
languageId - The id for the language that will be used to determine the tag name. Value of -1 selects the default language.
Returns:
Returns a Tag object
Throws:
java.rmi.RemoteException

getDefaultCustomer

public S_Customer getDefaultCustomer(java.lang.String storeId)
                              throws java.rmi.RemoteException
Returns the customer object for the default customer. If more than one default customer exists (which shouldn't be the case), it returns one of the customers found. If no default customer is found, it returns null.

The default customer can be configured in the Admin App. It is a fictitious customer with a real address that is used to create a temporary order even when a customer is not logged in or hasn't registered yet. The order totals of this temporary order are displayed in the cart details screen to give an indication of shipping costs and to display any available discounts.

Specified by:
getDefaultCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
Customer Object or Null if the default customer doesn't exist.
Throws:
java.rmi.RemoteException

getStoreIds

public java.lang.String[] getStoreIds(java.lang.String storeId)
                               throws java.rmi.RemoteException
Returns an array of strings containing the store ids for the stores being used in a multi-store / multi-database environment. It may return null or an empty array if not applicable. In a multi-store / multi-database environment, each KonaKart database instance may only be configured to connect to a number of stores and so it is necessary to know which stores the engine will connect to. In a multi-store / single-database environment, the method isn't applicable since each engine instance can connect to all stores.

Specified by:
getStoreIds in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
Returns an array of strings containing the store ids for the stores being used in a multi-store / multi-database environment.
Throws:
java.rmi.RemoteException

setCreditCardDetailsOnOrder

public void setCreditCardDetailsOnOrder(java.lang.String storeId,
                                        java.lang.String sessionId,
                                        int orderId,
                                        S_CreditCard card)
                                 throws java.rmi.RemoteException
The credit card details in the CreditCard object passed in as a parameter, are saved in the database for an existing order. Before being saved, this sensitive information is encrypted.

No update or insert is done for attributes of the CreditCard object that are set to null. The credit card details are mapped as follows to attributes in the order object:

Specified by:
setCreditCardDetailsOnOrder in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
orderId - The numeric id of the order
card - CreditCard object containing the credit card details
Throws:
java.rmi.RemoteException

addToWishList

public int addToWishList(java.lang.String storeId,
                         java.lang.String sessionId,
                         S_WishListItem wishListItem)
                  throws java.rmi.RemoteException
Add a WishListItem object to the wish list referenced by wishListId. If the wish list doesn't belong to the logged in customer, an exception is thrown. If the WishListItem already exists, then it is updated. The customer must be logged in with a valid sessionId when this method is called.

The compulsory attributes for the WishListItem are:

The WishListItem may also contain an array of options if these are applicable for the chosen product.

Specified by:
addToWishList in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
wishListItem - The wish list item to be added to the wish list
Returns:
Returns the id of the new wishListItem object
Throws:
java.rmi.RemoteException

addToWishListWithOptions

public int addToWishListWithOptions(java.lang.String storeId,
                                    java.lang.String sessionId,
                                    S_WishListItem wishListItem,
                                    S_AddToWishListOptions options)
                             throws java.rmi.RemoteException
If options is set to null, this method is identical to addToWishList(). Otherwise the functionality differs depending on the combination of options set.

Add a WishListItem object to the wish list referenced by wishListId. The sessionId may be left null if a temporary customer id (negative number) is added to the options object. If the wish list doesn't belong to the logged in customer or the customer referenced by the customer id, an exception is thrown. If the WishListItem already exists, then it is updated.

The compulsory attributes for the WishListItem are:

The WishListItem may also contain an array of options if these are applicable for the chosen product.

Specified by:
addToWishListWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
wishListItem - The wish list item to be added to the wish list
options - An object containing options for the method. It may be set to null.
Returns:
Returns the id of the new wishListItem object
Throws:
java.rmi.RemoteException

createWishList

public int createWishList(java.lang.String storeId,
                          java.lang.String sessionId,
                          S_WishList wishList)
                   throws java.rmi.RemoteException
Create a wish list from a WishList object. Once created, the method addToWishList() can be called to add wish list items to the wish list. The customer must be logged in with a valid sessionId when this method is called.

The compulsory attributes for the WishListItem are:

Specified by:
createWishList in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
wishList - The wish list to be created
Returns:
Returns the id of the new WishList object
Throws:
java.rmi.RemoteException

createWishListWithOptions

public int createWishListWithOptions(java.lang.String storeId,
                                     java.lang.String sessionId,
                                     S_WishList wishList,
                                     S_AddToWishListOptions options)
                              throws java.rmi.RemoteException
Create a wish list from a WishList object. Once created, the method addToWishList() can be called to add wish list items to the wish list. This method may be called even when a customer isn't logged in. In this case the customerId attribute of the options object must be set to the id of the temporary customer which is negative.

The compulsory attributes for the WishListItem are:

Specified by:
createWishListWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
wishList - The wish list to be created
options - An object containing options for the method. It may be set to null.
Returns:
Returns the id of the new WishList object
Throws:
java.rmi.RemoteException

editWishList

public void editWishList(java.lang.String storeId,
                         java.lang.String sessionId,
                         S_WishList wishList)
                  throws java.rmi.RemoteException
Edit an existing wish list object. A check is made that the wish list actually belongs to the user referenced by the session id. The customer must be logged in with a valid sessionId when this method is called.

Specified by:
editWishList in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
wishList - The wish list to be edited
Throws:
java.rmi.RemoteException

editWishListWithOptions

public void editWishListWithOptions(java.lang.String storeId,
                                    java.lang.String sessionId,
                                    S_WishList wishList,
                                    S_AddToWishListOptions options)
                             throws java.rmi.RemoteException
Edit an existing wish list object. The sessionId may be left null if a temporary customer id (negative number) is added to the options object. A check is made that the wish list actually belongs to the user referenced by the session id or customer id.

Specified by:
editWishListWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
wishList - The wish list to be edited
options - An object containing options for the method. It may be set to null.
Throws:
java.rmi.RemoteException

deleteWishList

public void deleteWishList(java.lang.String storeId,
                           java.lang.String sessionId,
                           int wishListId)
                    throws java.rmi.RemoteException
The wish list referenced by wishListId and all of the items contained by the wish list, will be deleted. An exception will be thrown if the wish list does not belong to the logged in customer. The customer must be logged in with a valid sessionId when this method is called.

Specified by:
deleteWishList in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
wishListId - The numeric id of the wish list
Throws:
java.rmi.RemoteException

deleteWishListWithOptions

public void deleteWishListWithOptions(java.lang.String storeId,
                                      java.lang.String sessionId,
                                      int wishListId,
                                      S_AddToWishListOptions options)
                               throws java.rmi.RemoteException
The wish list referenced by wishListId and all of the items contained by the wish list, will be deleted. The sessionId may be left null if a temporary customer id (negative number) is added to the options object. The WishListItem will only be deleted if the wish list belongs to the logged in customer or the customer referenced by the customer id. An exception will be thrown if the wish list does not belong to the logged in customer or customer referenced by customerId.

Specified by:
deleteWishListWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
wishListId - The numeric id of the wish list
options - An object containing options for the method. It may be set to null.
Throws:
java.rmi.RemoteException

getWishListWithItems

public S_WishList getWishListWithItems(java.lang.String storeId,
                                       java.lang.String sessionId,
                                       int wishListId,
                                       int languageId)
                                throws java.rmi.RemoteException
Returns a fully populated WishList object that may contain an array of WishListItem objects. An exception will be thrown if the wish list doesn't belong to the logged in customer and is private. The customer must be logged in with a valid sessionId when this method is called.

Each WishListItem object will have a populated product attribute and populated opts attribute if the WishListItem contains options. The items will be ordered by priority with the highest priority first.

Specified by:
getWishListWithItems in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user. It may be null if the user isn't logged in.
wishListId - The numeric id of the wish list
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns an array of WishListItem objects
Throws:
java.rmi.RemoteException

getWishListWithItemsWithOptions

public S_WishList getWishListWithItemsWithOptions(java.lang.String storeId,
                                                  java.lang.String sessionId,
                                                  int wishListId,
                                                  int languageId,
                                                  S_AddToWishListOptions options)
                                           throws java.rmi.RemoteException
If options is set to null, this method is identical to getWishListWithItems(). Otherwise the functionality differs depending on the combination of options set. The sessionId may be left null if a temporary customer id (negative number) is added to the options object. An exception will be thrown if the wish list doesn't belong to the logged in customer or customer referenced by customer id, and is private.

Returns a fully populated WishList object that may contain an array of WishListItem objects. An exception will be thrown if the wish list doesn't belong to the logged in customer and is private.

Each WishListItem object will have a populated product attribute and populated opts attribute if the WishListItem contains options. The items will be ordered by priority with the highest priority first.

Specified by:
getWishListWithItemsWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user. It may be null if the user isn't logged in.
wishListId - The numeric id of the wish list
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
Returns an array of WishListItem objects
Throws:
java.rmi.RemoteException

getWishList

public S_WishList getWishList(java.lang.String storeId,
                              java.lang.String sessionId,
                              int wishListId)
                       throws java.rmi.RemoteException
Returns a WishList object not populated with an array of WishListItem objects. An exception is thrown if the wish list doesn't belong to the logged in customer and is private. Null is returned if the wish list doesn't exist. The customer must be logged in with a valid sessionId when this method is called.

Specified by:
getWishList in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user. It may be null if the user isn't logged in.
wishListId - The numeric id of the wish list
Returns:
Returns a Wish List object
Throws:
java.rmi.RemoteException

getWishListWithOptions

public S_WishList getWishListWithOptions(java.lang.String storeId,
                                         java.lang.String sessionId,
                                         int wishListId,
                                         S_AddToWishListOptions options)
                                  throws java.rmi.RemoteException
Returns a WishList object not populated with an array of WishListItem objects. The sessionId may be left null if a temporary customer id (negative number) is added to the options object. An exception will be thrown if the wish list doesn't belong to the logged in customer or customer referenced by customer id, and is private. Null is returned if the wish list doesn't exist. The customer must be logged in with a valid sessionId when this method is called.

Specified by:
getWishListWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user. It may be null if the user isn't logged in.
wishListId - The numeric id of the wish list
options - An object containing options for the method. It may be set to null.
Returns:
Returns a Wish List object
Throws:
java.rmi.RemoteException

getWishListItemsWithOptions

public S_WishListItems getWishListItemsWithOptions(java.lang.String storeId,
                                                   java.lang.String sessionId,
                                                   S_DataDescriptor dataDesc,
                                                   int wishListId,
                                                   int languageId,
                                                   S_AddToWishListOptions options)
                                            throws java.rmi.RemoteException
Returns a WishListItems object containing an array of items and the number of items returned. The DataDescriptor object can be user to sort and page the returned items. The sessionId may be left null if a temporary customer id (negative number) is added to the options object. An exception will be thrown if the wish list doesn't belong to the logged in customer or customer referenced by customer id, and is private.

However, by setting the attributes of dataDesc, the following functionality may be controlled :

If the onlyShowAvailable attribute of the options object is set, then the wish list items that have quantity received equal to quantity desired, are not returned.

Specified by:
getWishListItemsWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user. It may be null if the user isn't logged in.
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
wishListId - The numeric id of the WishList object that the wish list items belong to
languageId - The numeric id of the language object
options - An object containing options for the method. It may be set to null.
Returns:
Returns a WishListItems objects
Throws:
java.rmi.RemoteException

getWishListItems

public S_WishListItems getWishListItems(java.lang.String storeId,
                                        java.lang.String sessionId,
                                        S_DataDescriptor dataDesc,
                                        int wishListId,
                                        int languageId)
                                 throws java.rmi.RemoteException
Returns a WishListItems object containing an array of items and the number of items returned. The DataDescriptor object can be user to sort and page the returned items. An exception will be thrown if the wish list doesn't belong to the logged in customer and is private.

However, by setting the attributes of dataDesc, the following functionality may be controlled :

Specified by:
getWishListItems in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user. It may be null if the user isn't logged in.
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
wishListId - The numeric id of the WishList object that the wish list items belong to
languageId - The numeric id of the language object
Returns:
Returns a WishListItems objects
Throws:
java.rmi.RemoteException

removeFromWishList

public void removeFromWishList(java.lang.String storeId,
                               java.lang.String sessionId,
                               int wishListItemId)
                        throws java.rmi.RemoteException
Remove the WishListItem object referenced by wishListItemId. The WishListItem will only be deleted if the wish list belongs to the logged in customer. If the wish list does not belong to the customer referenced by the sessionId, an exception will be thrown. The customer must be logged in with a valid sessionId when this method is called.

Specified by:
removeFromWishList in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
wishListItemId - The numeric id of the wish list item
Throws:
java.rmi.RemoteException

removeFromWishListWithOptions

public void removeFromWishListWithOptions(java.lang.String storeId,
                                          java.lang.String sessionId,
                                          int wishListItemId,
                                          S_AddToWishListOptions options)
                                   throws java.rmi.RemoteException
Remove the WishListItem object referenced by wishListItemId. The sessionId may be left null if a temporary customer id (negative number) is added to the options object. The WishListItem will only be deleted if the wish list belongs to the logged in customer or the customer referenced by the customer id. If the wish list does not belong to the customer referenced by the sessionId or customer id, an exception will be thrown.

Specified by:
removeFromWishListWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
wishListItemId - The numeric id of the wish list item
options - An object containing options for the method. It may be set to null.
Throws:
java.rmi.RemoteException

mergeWishListsWithOptions

public void mergeWishListsWithOptions(java.lang.String storeId,
                                      java.lang.String sessionId,
                                      int customerFromId,
                                      int languageId,
                                      S_AddToWishListOptions options)
                               throws java.rmi.RemoteException
Add all items from the wish list of customerFrom to the wish list of customerTo which is retrieved from the sessionId. This is done when a customer logs in, to move his temporary wish list to his permanent wish list.

The currently logged in customer may have more than one wish list. The one used is the first one found of listType == 0.

Specified by:
mergeWishListsWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId -
customerFromId -
languageId -
options -
Throws:
java.rmi.RemoteException

searchForWishLists

public S_WishLists searchForWishLists(java.lang.String storeId,
                                      java.lang.String sessionId,
                                      S_DataDescriptor dataDesc,
                                      S_CustomerSearch customerSearch)
                               throws java.rmi.RemoteException
All wish lists matching the search criteria will be returned. They will be grouped by customerId. Note that in order to retrieve the wish list items, you must call the getWishListWithItems() method, passing it the id of the wish list. This will also populate the final price attributes of the wish list.

If customerSearch is null, then only the wish lists of the logged in customer will be returned. If dataDesc is set to null, a default DataDescriptor will be used.

Only the following attributes of the CustomerSearchIf object will be used to search:

The custom fields of the dataDesc object will also be used in the search if not set to null.

Specified by:
searchForWishLists in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user. It may be null if the user isn't logged in.
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
customerSearch - Used to search for customers
Returns:
Returns a WishListsIf object containing an array of wishList objects and paging information.
Throws:
java.rmi.RemoteException

getStore

public S_Store getStore(java.lang.String storeId)
                 throws java.rmi.RemoteException
Returns the store that this KonaKart engine is connected to.

Specified by:
getStore in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
Returns a Store object or null if the store isn't found
Throws:
java.rmi.RemoteException

addCustomDataToSession

public void addCustomDataToSession(java.lang.String storeId,
                                   java.lang.String sessionId,
                                   java.lang.String data,
                                   int position)
                            throws java.rmi.RemoteException
A sessionId is created when a customer logs in to KonaKart using the login() API call. This sessionId is persisted in the database in a table which has 5 custom fields. This method allows you to store data in these custom fields which can later be retrieved by using the sessionId as the key.

Specified by:
addCustomDataToSession in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The sessionId
data - The data to be saved
position - This must be in the range of 1-5 to identify custom1 to custom5
Throws:
java.rmi.RemoteException

getCustomDataFromSession

public java.lang.String getCustomDataFromSession(java.lang.String storeId,
                                                 java.lang.String sessionId,
                                                 int position)
                                          throws java.rmi.RemoteException
A sessionId is created when a customer logs in to KonaKart using the login() API call. This sessionId is persisted in the database in a table which has 5 custom fields. This method allows you to retrieve the data in these custom fields by passing the sessionId as the key and a pointer to identify the custom field to be used.

Specified by:
getCustomDataFromSession in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The sessionId
position - This must be in the range of 1-5 to identify custom1 to custom5
Returns:
Returns the custom data
Throws:
java.rmi.RemoteException

setCookie

public void setCookie(java.lang.String storeId,
                      S_KKCookie cookie)
               throws java.rmi.RemoteException
Saves the cookie in the database. If it already exists, it is edited.

The cookie object passed in as a parameter must have the following attributes set:

The unique key for the cookie is the customerUuid together with the attributeId. The customerUuid is the value that should be saved and retrieved from the browser cookie and then used to look up the attributes saved in the KonaKart database. It can be created using the java.util.UUID class.

Specified by:
setCookie in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
cookie - A KKCookie object to be persisted in the database
Throws:
java.rmi.RemoteException

getCookie

public S_KKCookie getCookie(java.lang.String storeId,
                            java.lang.String customerUuid,
                            java.lang.String attrId)
                     throws java.rmi.RemoteException
Fetches the cookie object from the database that is referenced by the customerUuid and attrId parameters. If the cookie object doesn't exist, null is returned.

When this method is called, the last_read date of the returned cookie in the database, is updated.

Specified by:
getCookie in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerUuid - A random string used to identify the customer that owns the cookies
attrId - An identifier for the cookie
Returns:
Returns a KKCookie object
Throws:
java.rmi.RemoteException

getAllCookies

public S_KKCookie[] getAllCookies(java.lang.String storeId,
                                  java.lang.String customerUuid)
                           throws java.rmi.RemoteException
Fetches all of the cookie object from the database that are referenced by the customerUuid parameter. If no cookies exist, an empty array is returned.

When this method is called, the last_read date for each returned cookies in the database, is updated.

Specified by:
getAllCookies in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerUuid - A random string used to identify the customer that owns the cookies
Returns:
Returns an array of KKCookie objects
Throws:
java.rmi.RemoteException

deleteCookie

public void deleteCookie(java.lang.String storeId,
                         java.lang.String customerUuid,
                         java.lang.String attrId)
                  throws java.rmi.RemoteException
Deletes the cookie object from the database that is referenced by the customerUuid and attrId parameters.

Specified by:
deleteCookie in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerUuid - A random string used to identify the customer that owns the cookies
attrId - An identifier for the cookie
Throws:
java.rmi.RemoteException

getGeoZonesPerZone

public S_GeoZone[] getGeoZonesPerZone(java.lang.String storeId,
                                      S_Zone zone)
                               throws java.rmi.RemoteException
Returns an array of GeoZone objects (tax areas) for the zone passed in as a parameter. There may be multiple tax areas for a physical zone, which is why an array of GeoZone objects is returned. An example of this is state tax and federal tax.

Specified by:
getGeoZonesPerZone in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
zone - The physical zone
Returns:
Return an array of GeoZone objects
Throws:
java.rmi.RemoteException

insertCustomerTag

public void insertCustomerTag(java.lang.String storeId,
                              java.lang.String sessionId,
                              S_CustomerTag tag)
                       throws java.rmi.RemoteException
Assigns a customer tag to the customer referenced by the sessionId.

If a tag already exists with this name, then the value is replaced with the new value. The compulsory tag fields are:

Note that a customer tag with name tag.getName() must exist in the database since it is used to validate tag.getValue().

Specified by:
insertCustomerTag in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
tag - Customer Tag
Throws:
java.rmi.RemoteException

insertCustomerTagForGuest

public void insertCustomerTagForGuest(java.lang.String storeId,
                                      int customerId,
                                      S_CustomerTag tag)
                               throws java.rmi.RemoteException
Assigns a customer tag to the guest customer referenced by the customerId which must have a negative value.

If a tag already exists with this name, then the value is replaced with the new value. The compulsory tag fields are:

Note that a customer tag with name tag.getName() must exist in the database since it is used to validate tag.getValue().

Specified by:
insertCustomerTagForGuest in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The id of the guest customer which has a negative value.
tag - Customer Tag
Throws:
java.rmi.RemoteException

addToCustomerTag

public void addToCustomerTag(java.lang.String storeId,
                             java.lang.String sessionId,
                             java.lang.String tagName,
                             int tagValue)
                      throws java.rmi.RemoteException
This method is used for customer tags where the value is of type com.konakart.app.CustomerTag.MULTI_INT_TYPE. This customer tag type is used to store a series of integers and is useful for cases where you want to store information such as the last 5 product ids that a customer looked at.

If the customer tag doesn't yet exist for the customer referenced by the sessionId, then a new customer tag is added with the value in the tagValue parameter. Otherwise the new value is added. When the number of integers stored reaches the maximum value defined for the customer tag, then the new value is added and the oldest value is removed.

Specified by:
addToCustomerTag in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
tagName - Name of the customer tag
tagValue - Value of the customer tag
Throws:
java.rmi.RemoteException

addToCustomerTagForGuest

public void addToCustomerTagForGuest(java.lang.String storeId,
                                     int customerId,
                                     java.lang.String tagName,
                                     int tagValue)
                              throws java.rmi.RemoteException
This method is used for customer tags where the value is of type com.konakart.app.CustomerTag.MULTI_INT_TYPE. This customer tag type is used to store a series of integers and is useful for cases where you want to store information such as the last 5 product ids that a customer looked at.

If the customer tag doesn't yet exist for the guest customer referenced by the customerId (negative value), then a new customer tag is added with the value in the tagValue parameter. Otherwise the new value is added. When the number of integers stored reaches the maximum value defined for the customer tag, then the new value is added and the oldest value is removed.

Specified by:
addToCustomerTagForGuest in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The id of the guest customer which has a negative value.
tagName - Name of the customer tag
tagValue - Value of the customer tag
Throws:
java.rmi.RemoteException

getCustomerTag

public S_CustomerTag getCustomerTag(java.lang.String storeId,
                                    java.lang.String sessionId,
                                    java.lang.String tagName)
                             throws java.rmi.RemoteException
A CustomerTag object referenced by the parameter tagName is returned. The value attribute of the tag is populated for the customer referenced by the sessionId. If sessionId is set to null, then a customer tag object with a null value is returned.

The CustomerTag object contains utility methods to convert the tag string into its original type (i.e. Date, boolean, int etc.).

Specified by:
getCustomerTag in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
tagName - Name of the customer tag
Returns:
Returns a CustomerTag object, populated with the value.
Throws:
java.rmi.RemoteException

getCustomerTagForGuest

public S_CustomerTag getCustomerTagForGuest(java.lang.String storeId,
                                            int customerId,
                                            java.lang.String tagName)
                                     throws java.rmi.RemoteException
A CustomerTag object referenced by the parameter tagName is returned. The value attribute of the tag is populated for the guest customer referenced by the negative customerId.

The CustomerTag object contains utility methods to convert the tag string into its original type (i.e. Date, boolean, int etc.).

Specified by:
getCustomerTagForGuest in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The id of the guest customer which has a negative value.
tagName - Name of the customer tag
Returns:
Returns a CustomerTag object, populated with the value.
Throws:
java.rmi.RemoteException

getCustomerTagValue

public java.lang.String getCustomerTagValue(java.lang.String storeId,
                                            java.lang.String sessionId,
                                            java.lang.String tagName)
                                     throws java.rmi.RemoteException
A string is returned containing the value of the customer tag referenced by the parameter tagName and for the customer referenced by the sessionId. This method is faster than the getCustomerTag method, but the actual CustomerTag object isn't available to convert the String into a more usable form such as boolean or date.

Specified by:
getCustomerTagValue in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
tagName - Name of the customer tag
Returns:
Returns a string containing the tag value
Throws:
java.rmi.RemoteException

getCustomerTagValueForGuest

public java.lang.String getCustomerTagValueForGuest(java.lang.String storeId,
                                                    int customerId,
                                                    java.lang.String tagName)
                                             throws java.rmi.RemoteException
A string is returned containing the value of the customer tag referenced by the parameter tagName and for the guest customer referenced by the negative customerId. This method is faster than the getCustomerTag method, but the actual CustomerTag object isn't available to convert the String into a more usable form such as boolean or date.

Specified by:
getCustomerTagValueForGuest in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The id of the guest customer which has a negative value.
tagName - Name of the customer tag
Returns:
Returns a string containing the tag value
Throws:
java.rmi.RemoteException

deleteCustomerTag

public void deleteCustomerTag(java.lang.String storeId,
                              java.lang.String sessionId,
                              java.lang.String tagName)
                       throws java.rmi.RemoteException
This method deletes the customer tag referenced by the parameter tagName and for the customer referenced by the sessionId.

Specified by:
deleteCustomerTag in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
tagName - Name of the customer tag
Throws:
java.rmi.RemoteException

deleteCustomerTagForGuest

public void deleteCustomerTagForGuest(java.lang.String storeId,
                                      int customerId,
                                      java.lang.String tagName)
                               throws java.rmi.RemoteException
This method deletes the customer tag referenced by the parameter tagName and for the guest customer referenced by the negative customerId.

Specified by:
deleteCustomerTagForGuest in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The id of the guest customer which has a negative value.
tagName - Name of the customer tag
Throws:
java.rmi.RemoteException

getCustomerTags

public S_CustomerTag[] getCustomerTags(java.lang.String storeId,
                                       java.lang.String sessionId)
                                throws java.rmi.RemoteException
This method fetches all of the customer tags for the customer referenced by the sessionId.

An empty array is returned if no tags exist.

Specified by:
getCustomerTags in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
Returns:
Returns an array of CustomerTag objects
Throws:
java.rmi.RemoteException

getCustomerTagsForGuest

public S_CustomerTag[] getCustomerTagsForGuest(java.lang.String storeId,
                                               int customerId)
                                        throws java.rmi.RemoteException
This method fetches all of the customer tags for the guest customer referenced by the customerId which must have a negative value.

An empty array is returned if no tags exist.

Specified by:
getCustomerTagsForGuest in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The id of the guest customer which has a negative value.
Returns:
Returns an array of CustomerTag objects
Throws:
java.rmi.RemoteException

evaluateExpression

public boolean evaluateExpression(java.lang.String storeId,
                                  java.lang.String sessionId,
                                  int expressionId,
                                  java.lang.String expressionName)
                           throws java.rmi.RemoteException
An expression object is retrieved from the database and evaluated for the customer referenced by the sessionId. If the expressionName parameter is not set to null, then the Expression is searched for by name. Otherwise it is searched for by the id contained in the expressionId parameter.

Specified by:
evaluateExpression in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
expressionId - Numeric Id of the expression
expressionName - Name of expression
Returns:
Returns true or false
Throws:
java.rmi.RemoteException

evaluateExpressionForGuest

public boolean evaluateExpressionForGuest(java.lang.String storeId,
                                          int customerId,
                                          int expressionId,
                                          java.lang.String expressionName)
                                   throws java.rmi.RemoteException
An expression object is retrieved from the database and evaluated for the guest customer referenced by the negative customerId. If the expressionName parameter is not set to null, then the Expression is searched for by name. Otherwise it is searched for by the id contained in the expressionId parameter.

Specified by:
evaluateExpressionForGuest in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The id of the guest customer which has a negative value.
expressionId - Numeric Id of the expression
expressionName - Name of expression
Returns:
Returns true or false
Throws:
java.rmi.RemoteException

getExpression

public S_Expression getExpression(java.lang.String storeId,
                                  java.lang.String sessionId,
                                  int expressionId,
                                  java.lang.String expressionName)
                           throws java.rmi.RemoteException
An Expression object, fully populated with an array of Expression Variables is returned. If the expressionName parameter is not set to null, then the Expression is searched for by name. Otherwise it is searched for by the id contained in the expressionId parameter.

If the sessionId parameter is null we get the expression variables without any customer tag values. Otherwise the expression variables will be populated with the customer tag values for the customer referenced by sessionId. other

Specified by:
getExpression in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
expressionId - Numeric Id of the expression
expressionName - Name of expression
Returns:
Returns a fully populated Expression object
Throws:
java.rmi.RemoteException

getExpressionForGuest

public S_Expression getExpressionForGuest(java.lang.String storeId,
                                          int customerId,
                                          int expressionId,
                                          java.lang.String expressionName)
                                   throws java.rmi.RemoteException
An Expression object, fully populated with an array of Expression Variables is returned. If the expressionName parameter is not set to null, then the Expression is searched for by name. Otherwise it is searched for by the id contained in the expressionId parameter.

The expression variables will be populated with the customer tag values for the guest customer referenced by customerId.

Specified by:
getExpressionForGuest in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
customerId - The id of the guest customer which has a negative value.
expressionId - Numeric Id of the expression
expressionName - Name of expression
Returns:
Returns a fully populated Expression object
Throws:
java.rmi.RemoteException

pointsAvailable

public int pointsAvailable(java.lang.String storeId,
                           java.lang.String sessionId)
                    throws java.rmi.RemoteException
Calculates the number of reward points available for the customer identified by the sessionId parameter.

Specified by:
pointsAvailable in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
Returns:
Returns the number of points available for spending
Throws:
java.rmi.RemoteException

addPoints

public int addPoints(java.lang.String storeId,
                     java.lang.String sessionId,
                     int points,
                     java.lang.String code,
                     java.lang.String description)
              throws java.rmi.RemoteException
Adds a number of reward points to the total for customer identified by the sessionId parameter.

Specified by:
addPoints in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
points - Number of points to add
code - An optional code to categorize the reason for awarding the points
description - An optional description describing why the points were awarded
Returns:
Returns the new number of points available for spending
Throws:
java.rmi.RemoteException

deletePoints

public int deletePoints(java.lang.String storeId,
                        java.lang.String sessionId,
                        int points,
                        java.lang.String code,
                        java.lang.String description)
                 throws java.rmi.RemoteException
Deletes a number of reward points from the total for the customer identified by the sessionId parameter.

Specified by:
deletePoints in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
points - Number of points to delete
code - An optional code to categorize the reason for redeeming the points
description - An optional description describing how the points were redeemed
Returns:
Returns the new number of points available for spending
Throws:
java.rmi.RemoteException

reservePoints

public int reservePoints(java.lang.String storeId,
                         java.lang.String sessionId,
                         int points)
                  throws java.rmi.RemoteException
Removes a number of reward points from the total for the customer identified by the sessionId parameter. The removed points are not deleted but reserved, so that they are no longer available for spending but may be deleted once the order has been paid for or shipped. If the order is never fulfilled, then the reserved points may be freed and returned to the available total.

Specified by:
reservePoints in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
points - Number of points to reserve
Returns:
Returns the reservation id of the reserved points
Throws:
java.rmi.RemoteException

deleteReservedPoints

public void deleteReservedPoints(java.lang.String storeId,
                                 java.lang.String sessionId,
                                 int reservationId,
                                 java.lang.String code,
                                 java.lang.String description)
                          throws java.rmi.RemoteException
Verifies that the reservationId parameter exists and that it belongs to the customer identified by the sessionId parameter. The reserved points are normally deleted once the order has been paid for or shipped. If the order is never fulfilled, then the reserved points may be freed and returned to the available total. Once deleted. the points can no longer be returned to the total.

Specified by:
deleteReservedPoints in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
reservationId - Numeric identifier of the reservation
code - An optional code to categorize the reason for redeeming the points
description - An optional description describing how the points were redeemed
Throws:
java.rmi.RemoteException

freeReservedPoints

public int freeReservedPoints(java.lang.String storeId,
                              java.lang.String sessionId,
                              int reservationId)
                       throws java.rmi.RemoteException
Verifies that the reservationId parameter exists and that it belongs to the customer identified by the sessionId parameter. The reserved points may be freed and returned to the available total using this API call. The method checks to see whether some or all of the points have expired while they were in the reserved state.

Specified by:
freeReservedPoints in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
reservationId - Numeric identifier of the reservation
Returns:
Returns the number of points available for spending
Throws:
java.rmi.RemoteException

setRewardPointReservationId

public void setRewardPointReservationId(java.lang.String storeId,
                                        java.lang.String sessionId,
                                        int orderId,
                                        int reservationId)
                                 throws java.rmi.RemoteException
Verifies that the order belongs to the customer identified by the sessionId parameter and then updates the reservation id on the order.

Specified by:
setRewardPointReservationId in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId -
orderId -
reservationId -
Throws:
java.rmi.RemoteException

getRewardPoints

public S_RewardPoints getRewardPoints(java.lang.String storeId,
                                      java.lang.String sessionId,
                                      S_DataDescriptor dataDesc)
                               throws java.rmi.RemoteException
Gets an array of reward point objects for a customer identified by the sessionId parameter. The most recent objects are returned first.

Specified by:
getRewardPoints in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset and limit the number of items returned
Returns:
Returns a RewardPoints object
Throws:
java.rmi.RemoteException

insertSubscription

public int insertSubscription(java.lang.String storeId,
                              java.lang.String sessionId,
                              S_Subscription subscription)
                       throws java.rmi.RemoteException
A Subscription object is inserted into the database. The following subscription attributes are compulsory: The customer id of the Subscription object is fetched from the sessionId. The id of the new object is returned.

Specified by:
insertSubscription in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
subscription - The subscription object to be inserted
Returns:
Returns the id of the Subscription object
Throws:
java.rmi.RemoteException

getPaymentSchedule

public S_PaymentSchedule getPaymentSchedule(java.lang.String storeId,
                                            int id)
                                     throws java.rmi.RemoteException
Returns the payment schedule object for the id parameter, or Null if the payment schedule object doesn't exist in the DB.

Specified by:
getPaymentSchedule in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
id - The id of the payment schedule object
Returns:
Returns a payment schedule object
Throws:
java.rmi.RemoteException

getSubscriptionsPerCustomer

public S_Subscription[] getSubscriptionsPerCustomer(java.lang.String storeId,
                                                    java.lang.String sessionId)
                                             throws java.rmi.RemoteException
Returns an array of Subscription objects for a customer referred to by the sessionId parameter.

Specified by:
getSubscriptionsPerCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
Returns:
Returns an array of Subscription objects
Throws:
java.rmi.RemoteException

getProductPerSkuWithOptions

public S_Product getProductPerSkuWithOptions(java.lang.String storeId,
                                             java.lang.String sessionId,
                                             java.lang.String sku,
                                             int languageId,
                                             S_FetchProductOptions options)
                                      throws java.rmi.RemoteException
Get a product from its SKU. If the SKU refers to a particular configuration of the product (i.e. Blue shirt, size small) then the product object is only populated with the options that match the SKU and with the ProductQuantity object that matches the SKU. When a product is retrieved based on its id or when the SKU is for a product without attributes, then all of the options and product quantities are populated.

Specified by:
getProductPerSkuWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
sku - The product SKU
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
Returns the product matching the SKU or null if no product is found
Throws:
java.rmi.RemoteException

getProductPerSku

public S_Product getProductPerSku(java.lang.String storeId,
                                  java.lang.String sessionId,
                                  java.lang.String sku,
                                  int languageId)
                           throws java.rmi.RemoteException
Get a product from its SKU. If the SKU refers to a particular configuration of the product (i.e. Blue shirt, size small) then the product object is only populated with the options that match the SKU and with the ProductQuantity object that matches the SKU. When a product is retrieved based on its id or when the SKU is for a product without attributes, then all of the options and product quantities are populated.

Specified by:
getProductPerSku in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
sku - The product SKU
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns the product matching the SKU or null if no product is found
Throws:
java.rmi.RemoteException

getIpnHistory

public S_IpnHistory[] getIpnHistory(java.lang.String storeId,
                                    java.lang.String sessionId,
                                    int orderId)
                             throws java.rmi.RemoteException
Retrieve an array of IpnHistory objects for an order. The order must belong to the customer referenced by the sessionId.

Specified by:
getIpnHistory in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
orderId - The numeric id of the order
Returns:
Returns an array of IpnHistory objects for the order
Throws:
java.rmi.RemoteException

getPdf

public S_PdfResult getPdf(java.lang.String storeId,
                          java.lang.String sessionId,
                          S_PdfOptions options)
                   throws java.rmi.RemoteException
Creates a PDF document. For the case where the options object points to an order, the method ensures that the order belongs to the customer referenced by the sessionId.

Specified by:
getPdf in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
options - The PdfOptions object that defines the PDF document to create
Returns:
Returns a PdfResult object
Throws:
java.rmi.RemoteException

getDigitalDownloadById

public S_DigitalDownload getDigitalDownloadById(java.lang.String storeId,
                                                java.lang.String sessionId,
                                                int digitalDownloadId)
                                         throws java.rmi.RemoteException
Returns a Digital Download object for the digital download id. Returns null if no object exists. A check is made to verify that the digital download object belongs to the customer identified by the sessionId.

Specified by:
getDigitalDownloadById in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
digitalDownloadId - The numeric id of the digital download object
Returns:
Returns a DigitalDownload object
Throws:
java.rmi.RemoteException

editDigitalDownload

public void editDigitalDownload(java.lang.String storeId,
                                java.lang.String sessionId,
                                S_DigitalDownload digitalDownload)
                         throws java.rmi.RemoteException
Edits the digital download object if it belongs to the customer identified by the sessionId. Otherwise an exception is thrown.

Specified by:
editDigitalDownload in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
digitalDownload - The digital download object to be edited
Throws:
java.rmi.RemoteException

getMsgValue

public java.lang.String getMsgValue(java.lang.String storeId,
                                    java.lang.String key,
                                    int type,
                                    java.lang.String locale)
                             throws java.rmi.RemoteException
Get an Application Message Value. If locale is null, the default locale is used.

Specified by:
getMsgValue in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
key - the message key
type - the message type (should use KKConstants.MSG_TYP_APPLICATION for application messages)
locale - the message locale (eg. "en_GB"). Default is used if left null.
Returns:
The message for the key, type and locale. If the message isn't found the String "[key:type:locale]" is returned.
Throws:
java.rmi.RemoteException

getMessages

public S_NameValue[] getMessages(java.lang.String storeId,
                                 int type,
                                 java.lang.String locale)
                          throws java.rmi.RemoteException
Used to fetch a message catalog for a locale and message type. If locale is null, the default locale is used.

Specified by:
getMessages in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
type - the message type (should use KKConstants.MSG_TYP_APPLICATION for application messages)
locale - the message locale (eg. "en_GB"). Default is used if left null.
Returns:
Returns and array of NameValue objects containing the message catalog
Throws:
java.rmi.RemoteException

postMessageToQueue

public void postMessageToQueue(java.lang.String storeId,
                               java.lang.String sessionId,
                               S_MqOptions options)
                        throws java.rmi.RemoteException
Post a message to a specified queue. Use the options parameter to define the message text, credentials and the destination queue.

Specified by:
postMessageToQueue in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - the sessionId
options - the MQ options
Throws:
java.rmi.RemoteException

readMessageFromQueue

public S_MqResponse readMessageFromQueue(java.lang.String storeId,
                                         java.lang.String sessionId,
                                         S_MqOptions options)
                                  throws java.rmi.RemoteException
Read a single message from a specified queue. Use the options parameter to define credentials, a timeout value and the name of the queue to read.

Specified by:
readMessageFromQueue in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - the sessionId
options - the MQ options
Returns:
an object describing the response from this call. Usually it will contain the text of the message that was read, but if there was a timeout the message will be null and the timedout attribute will be true.
Throws:
java.rmi.RemoteException

insertCustomerEvent

public void insertCustomerEvent(java.lang.String storeId,
                                S_CustomerEvent event)
                         throws java.rmi.RemoteException
The customer event is written to a queue and control is immediately returned to the caller. The queue is emptied by a thread that persists the event to the database. The database where the event is stored is defined in the properties file and for performance reasons may be different to the database containing the standard KonaKart tables.

The DateAdded attribute of the event object is added by the engine if left null. The storeId attribute of the event object is added by the engine.

Specified by:
insertCustomerEvent in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
event - A customer event object
Throws:
java.rmi.RemoteException

getSuggestedSearchItems

public S_SuggestedSearchItem[] getSuggestedSearchItems(java.lang.String storeId,
                                                       java.lang.String sessionId,
                                                       S_SuggestedSearchOptions options)
                                                throws java.rmi.RemoteException
An array of SuggestedSearchItems is returned for search text within the options parameter. This method is useful for creating a dynamic search entry field that shows a list of suggested search items every time a character is entered in the search entry field.

Specified by:
getSuggestedSearchItems in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - the sessionId which may be left null if the customer isn't logged in
options - A SuggestedSearchOptions object containing all parameters necessary to configure the SuggestedSearch operation
Returns:
Returns an array of SuggestedSearchItems
Throws:
java.rmi.RemoteException

getProductsFromIdsWithOptions

public S_Product[] getProductsFromIdsWithOptions(java.lang.String storeId,
                                                 java.lang.String sessionId,
                                                 S_DataDescriptor dataDesc,
                                                 int[] prodIdArray,
                                                 int languageId,
                                                 S_FetchProductOptions options)
                                          throws java.rmi.RemoteException
An array of products is returned that corresponds to an array of productIds passed in as a parameter. The dataDesc parameter may be used to sort the products and to determine whether to return the description and the options parameter may be used for advanced functionality such as determining where to read the price and quantity information from.

Specified by:
getProductsFromIdsWithOptions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - the sessionId which may be left null if the customer isn't logged in
dataDesc - Can be used to add sort by information and to set whether to return the description of the products.
prodIdArray - An array of product ids
languageId - The id for the language that will be used. Value of -1 selects the default language.
options - An object containing options for the method. It may be set to null.
Returns:
Returns an array of products
Throws:
java.rmi.RemoteException

getBookingsPerProduct

public S_Bookings getBookingsPerProduct(java.lang.String storeId,
                                        S_DataDescriptor dataDesc,
                                        int productId,
                                        S_BookableProductOptions options)
                                 throws java.rmi.RemoteException
Get an array of bookings for a bookable product. The DatDescriptor object may be used to add constraints on the custom fields and to add order by criteria. The following OrderBy criteria are implemented:

Specified by:
getBookingsPerProduct in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
dataDesc - Can be used to add sort by information and constraints on the custom fields
productId - The numeric id of the product
options - Not used at the moment. May be left null.
Returns:
Returns a Bookings object containing the bookings
Throws:
java.rmi.RemoteException

getBookingsPerCustomer

public S_Bookings getBookingsPerCustomer(java.lang.String storeId,
                                         java.lang.String sessionId,
                                         S_DataDescriptor dataDesc,
                                         S_BookableProductOptions options)
                                  throws java.rmi.RemoteException
Get an array of bookings for a logged in customer. The DataDescriptor object may be used to add constraints on the custom fields and to add order by criteria. The following OrderBy criteria are implemented:

Specified by:
getBookingsPerCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The sessionId of the logged in customer
dataDesc - Can be used to add sort by information and constraints on the custom fields
options - Not used at the moment. May be left null.
Returns:
Returns a Bookings object
Throws:
java.rmi.RemoteException

insertBooking

public int insertBooking(java.lang.String storeId,
                         java.lang.String sessionId,
                         S_Booking booking,
                         S_BookableProductOptions options)
                  throws java.rmi.RemoteException
Inserts a Booking object into the database. The customer must be logged in with a valid session id. The id of the logged in customer is written into the customerId attribute of the Booking object before it is saved. The Booking must be associated with an existing product through the productId attribute.

Specified by:
insertBooking in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The sessionId of the logged in customer
booking - A booking object
options - Options allowing an exception to be thrown for exceeding the maximum number of bookings
Returns:
Returns the id of the inserted object
Throws:
java.rmi.RemoteException

getBookableProductConflict

public S_Product[] getBookableProductConflict(java.lang.String storeId,
                                              java.lang.String sessionId,
                                              S_Product bookableProd,
                                              S_BookableProductOptions options)
                                       throws java.rmi.RemoteException
This method checks to see whether the bookable product passed in as a parameter conflicts with any bookable products that the customer identified by the sessionId has already signed up for.
If no conflicts are found, null is returned. If a conflict is found then an array of conflicting bookable products is returned.

Specified by:
getBookableProductConflict in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The sessionId of the logged in customer
bookableProd - The bookable product being checked
options - Not used at the moment. May be left null.
Returns:
Returns null for no conflict. Otherwise an array of conflicting products is returned.
Throws:
java.rmi.RemoteException

getOrderStatus

public int getOrderStatus(java.lang.String storeId,
                          java.lang.String sessionId,
                          int orderId)
                   throws java.rmi.RemoteException
Get the order status for an order. The order doesn't have to belong to the logged in customer.

Specified by:
getOrderStatus in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - The session id of the logged in user
orderId - The numeric id of the order
Returns:
Returns the order status. Returns -1 if the order doesn't exist.
Throws:
java.rmi.RemoteException

getAllOrderStatuses

public S_OrderStatus[] getAllOrderStatuses(java.lang.String storeId,
                                           int languageId)
                                    throws java.rmi.RemoteException
Returns an array of order status objects for the language defined by languageId.

Specified by:
getAllOrderStatuses in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
languageId - The id for the language that will be used to determine the customer group name and description. Value of -1 selects the default language.
Returns:
An array of order status objects.
Throws:
java.rmi.RemoteException

saveSSOToken

public java.lang.String saveSSOToken(java.lang.String storeId,
                                     S_SSOToken token)
                              throws java.rmi.RemoteException
Saves the SSOToken in the database and returns a UUID secret key identifier.

Specified by:
saveSSOToken in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
token - The SSO token to be saved
Returns:
Returns a UUID secret key identifier for the token
Throws:
java.rmi.RemoteException

getSSOToken

public S_SSOToken getSSOToken(java.lang.String storeId,
                              java.lang.String secretKey,
                              boolean deleteToken)
                       throws java.rmi.RemoteException
Returns an SSOToken object for the secretKey (UUID). Null is returned if no token is found. If the deleteToken parameter is set to true, the token is deleted from the database after having been read.

Specified by:
getSSOToken in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
secretKey - The UUID secretKey used to identify the token
deleteToken - The token is deleted from the database after being read
Returns:
Returns an SSOToken
Throws:
java.rmi.RemoteException

enableCustomer

public void enableCustomer(java.lang.String storeId,
                           java.lang.String secretKey)
                    throws java.rmi.RemoteException
This method reads the SSO token using the Secret Key. Once read, the token is deleted. The customer id read from the token is used to identify and enable the customer. An exception is thrown if a customer doesn't exist for the customer id found in the token.
This method is normally used to verify a customer's email before enabling a customer. i.e. When the customer registers, the registration is made but the customer remains disabled. An SSO token is saved containing the id of the new customer. At this point an eMail is sent to the customer, prompting him to click on a link containing the SSO token secret key. The link calls an application method that uses the secret key to enable the customer by calling this API call.

Specified by:
enableCustomer in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
secretKey -
Throws:
java.rmi.RemoteException

checkCoupon

public int checkCoupon(java.lang.String storeId,
                       java.lang.String couponCode)
                throws java.rmi.RemoteException
This method is used to verify whether a coupon code actually exists and if it does, whether the coupon is still active. Valid return values for this method are: Even if the coupon exists and is active, it won't actually do anything if it isn't connected to a valid promotion and any rules associated with the promotion are also satisfied. However, this method may still be used to at least warn a customer that he may have mistyped the coupon code or that it is no longer valid.

Specified by:
checkCoupon in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
couponCode - The coupon code
Returns:
Returns an integer
Throws:
java.rmi.RemoteException

getAllPromotions

public S_Promotion[] getAllPromotions(java.lang.String storeId)
                               throws java.rmi.RemoteException
Returns an array of all active promotions. If a promotion is disabled or the current date is not within the start and end dates of the promotion, then it is not returned. Also if an OrderTotal module is not installed, then none of the promotions for that OrderTotal module are returned.

Specified by:
getAllPromotions in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
Returns:
Returns an array of all active promotions
Throws:
java.rmi.RemoteException

getPromotionsPerProducts

public S_Product[] getPromotionsPerProducts(java.lang.String storeId,
                                            java.lang.String sessionId,
                                            int customerId,
                                            S_Product[] products,
                                            S_Promotion[] promotions,
                                            java.lang.String[] couponCodes,
                                            S_PromotionOptions options)
                                     throws java.rmi.RemoteException
This method is used to calculate a discount on individual products so that the discount can be displayed without having to add the product to the cart.
The method receives an array of products and returns an array of products with attached PromotionResult objects that contain the results of one or more of the promotions passed in as a parameter. The PromotionResult contains the value of the discount, whether it is an amount or a percentage discount and also information regarding the promotion it applies to. If a product has an array of ProductQuantity objects (one for each SKU) each one of these may have an array of PromotionResult objects since a promotion may only apply to one product configuration and not to another (i.e. blue shirt and not red shirt).
The PromotionOptions object can be configured so that the values of the promotions for a product are subtracted from the product price. The options allow you to set rules that determine whether in this case the promotions need to be cumulative or whether the largest or smallest should be chosen. The calculation is only made for products with a single array of PromotionResult objects. It is not calculated for products that have an array of PromotionResult objects for each ProductQuantity.

Specified by:
getPromotionsPerProducts in interface KKRMIEngServerIf
Parameters:
storeId - the storeId
sessionId - Only used if the customer is logged in. Otherwise set to null.
customerId - If the sessionId is set to null then the customerId should contain the id of the temporary user which is a negative number. The temporary user id can be used for evaluating expression rules.
products - An array of products to be processed
promotions - The promotions which will be applied to the products if all rules are matched.
couponCodes - Coupon codes to use. If none of the promotions require coupons, it should be set to null
options - An object containing information to configure the calculation for applying one or more promotion results to the product price.
Returns:
Returns the same array of products passed in as a parameter with attached PromotionResult objects if applicable
Throws:
java.rmi.RemoteException


Copyright © 2011 DS Data Systems UK Ltd.