com.konakartadmin.bl
Class KKAdmin

java.lang.Object
  extended by com.konakartadmin.bl.KKAdminBase
      extended by com.konakartadmin.bl.KKAdmin
All Implemented Interfaces:
KKAdminIf

public class KKAdmin
extends KKAdminBase
implements KKAdminIf

This implements the server side of the KonaKart Admin Application. It contains an implementation of all of the methods defined in com.konakartadmin.appif.KKAdminIf


Field Summary
static java.lang.String DEFAULT_KONAKARTADMIN_PROPERTIES_FILE_NAME
          Default KonaKart Admin properties file name
 
Fields inherited from class com.konakartadmin.bl.KKAdminBase
adminEng, allConfig, configFile, configFileURL, engConf, globalInit, kkCartInit, kkConfig, kkInstanceId, konakartAdminPropsFileName, konakartAdminPropsFilePath, log, log4jInit, logMgr, mgrFactory, mutex, torqueConfig, torqueInit
 
Constructor Summary
KKAdmin()
          Deprecated. From version 2.2.7.0, you should use the constructor that receives an AdminEngineConfig object
KKAdmin(AdminEngineConfig engConf)
          Constructor with an EngineConfig object.
KKAdmin(java.lang.String propertiesFileName)
          Deprecated. From version 2.2.7.0, you should use the constructor that receives an AdminEngineConfig object
 
Method Summary
 void addAddressesToProduct(java.lang.String sessionId, AdminAddress[] addresses, int productId)
          Associate an array of addresses to a product.
 void addAllProductsToSearchEngine(java.lang.String sessionId, boolean async)
          Add all products in the KonaKart database to the search engine.
 void addApiCallsToRole(java.lang.String sessionId, AdminApiCall[] apiCalls, int roleId)
          Adds the array of AdminApiCall objects to the role identified by the roleId parameter.
 void addCategoriesToPromotion(java.lang.String sessionId, AdminCategory[] categories, int promotionId, int rule)
          Add the array of categories to the promotion identified by promotionId.
 void addCategoriesToTagGroups(java.lang.String sessionId, int tagGroupId, int[] categories)
          Add the array of categories to the tagGroup specified.
 void addCouponsToPromotion(java.lang.String sessionId, AdminCoupon[] coupons, int promotionId)
          Add the array of coupons to the promotion identified by promotionId.
 void addCustomDataToSession(java.lang.String sessionId, java.lang.String data, int position)
          A sessionId is created when a customer logs in to the KonaKart Admin App using the login() API call.
 void addCustomerGroupsToPromotion(java.lang.String sessionId, int[] groupIds, int promotionId, int rule)
          Add the array of customer groups (identified by the group ids) to the promotion identified by promotionId.
 void addCustomersToPromotion(java.lang.String sessionId, AdminCustomer[] customers, int promotionId, int rule, int maxUse)
          Add the array of customers to the promotion identified by promotionId.
 void addCustomersToPromotionPerOrdersMade(java.lang.String sessionId, java.util.Calendar lastOrderDate, boolean havePlacedOrder, int promotionId, int rule, int maxUse)
          Add to the promotion identified by promotionId, the customers who have or haven't placed an order since the lastOrderDate passed in as a parameter.
 void addExpressionsToPromotion(java.lang.String sessionId, AdminExpression[] expressions, int promotionId)
          Add the array of expressions to the promotion identified by promotionId.
 void addGiftCertificatesToPromotion(java.lang.String sessionId, AdminProduct[] giftCertificates, int promotionId)
          Add the array of gift certificate products to the promotion.
 void addManufacturersToPromotion(java.lang.String sessionId, AdminManufacturer[] manufacturers, int promotionId, int rule)
          Add the array of manufacturers to the promotion identified by promotionId.
 void addPanelsToRole(java.lang.String sessionId, AdminPanel[] panels, int roleId)
          Adds the array of AdminPanel objects to the role identified by the roleId parameter.
 int addPoints(java.lang.String sessionId, int customerId, int points, java.lang.String code, java.lang.String description)
          Adds a number of reward points to the total for the customer identified by the customerId parameter.
 void addProdAttrDescsToTemplate(java.lang.String sessionId, AdminProdAttrDesc[] attrDescs, int templateId)
          Add the array of AdminProdAttrDesc objects to the template.
 void addProductsToPromotion(java.lang.String sessionId, AdminProduct[] products, int promotionId, int rule)
          Add the array of products to the promotion.
 void addProductToSearchEngine(java.lang.String sessionId, int productId)
          Add the product referenced by productId to the search engine.
 void addPromotionsToCoupon(java.lang.String sessionId, AdminPromotion[] promotions, int couponId)
          Add the array of promotions to the coupon identified by couponId.
 void addRelatedProducts(java.lang.String sessionId, AdminProduct[] products, int productId, int relationType)
          Add the array of products to the product defined by productId.
 void addRolesToUser(java.lang.String sessionId, AdminRole[] roles, int userId)
          Adds the array of AdminRole objects to the user identified by the userId parameter.
 void addTagGroupsToCategory(java.lang.String sessionId, AdminTagGroup[] tagGroups, int categoryId)
          Add the array of AdminTagGroups to the category identified by categoryId.
 void addTagsToProduct(java.lang.String sessionId, AdminTag[] tags, int productId)
          Add the array of AdminTags to the product identified by productId.
 com.konakart.app.NameValue[] callPaymentModule(java.lang.String sessionId, java.lang.String moduleClassName, com.konakart.app.PaymentOptions options)
          This method is used to call a payment module from the Admin App.
 void changePassword(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.
 boolean checkDataIntegrity(java.lang.String sessionId, AdminDataIntegrityOptions dataIntegrityOptions)
          Checks the integrity of data in the specified area in the KonaKart database
 int checkSession(java.lang.String sessionId)
          The given sessionId is checked to see whether it exists and whether it is has timed out.
protected  void checkStoreStatus(int customerId)
          Check that the store should continue to execute API functions.
protected  void checkStoreStatus(java.lang.String sessId)
          Check that the store should continue to execute API functions.
 void cloneStore(java.lang.String sessionId, AdminNewStoreOptions options, java.lang.String storeToCloneId, AdminStore newStore)
          Insert a new store into the mall by cloning a specified store.
 int copyProductToStore(java.lang.String sessionId, int productId, java.lang.String storeIdFrom, java.lang.String storeIdTo, AdminCopyProductOptions options)
          Copies a product from the store referenced by storeIdFrom to the store referenced by storeIdTo .
 java.lang.String custom(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 sessionId, java.lang.String input1, java.lang.String input2)
          A custom interface that you have to provide an implementation for.
 void deleteAddress(java.lang.String sessionId, int addressId)
          Deletes an AdminAddress.
 int deleteAddressFormat(java.lang.String sessionId, int id)
          Delete an AdminAddressFormat object referenced by it's id.
 void deleteApiCall(java.lang.String sessionId, int apiCallId)
          Deletes the apiCall identified by the apiCallId parameter.
 void deleteAuditData(java.lang.String sessionId, AdminAuditSearch delSearch)
          Delete audit data from the database.
 void deleteBooking(java.lang.String sessionId, int bookingId, AdminBookableProductOptions options)
          Delete the booking with the specified bookingId.
 void deleteCatalog(java.lang.String sessionId, int catalogId)
          Delete a Catalog definition from the database
 void deleteCategoryTree(java.lang.String sessionId, int categoryId, int options)
          Delete the category referenced to by categoryId.
 int deleteCountry(java.lang.String sessionId, int id)
          Delete a Country.
 void deleteCoupon(java.lang.String sessionId, int couponId)
          Delete the coupon referenced by couponId.
 int deleteCurrency(java.lang.String sessionId, int currId)
          Delete a Currency.
 int deleteCustomer(java.lang.String sessionId, int custId)
          Delete a Customer.
 int deleteCustomerGroup(java.lang.String sessionId, int custGroupId)
          Delete a Customer Group.
 int deleteCustomerTag(java.lang.String sessionId, int id)
          Delete a Customer tag
 void deleteCustomerTagForCustomer(java.lang.String sessionId, int customerId, java.lang.String tagName)
          Deletes the value of the customer tag referenced by tagName for the customer referenced by customerId.
 int deleteExpiredSessions(java.lang.String sessionId)
          Deletes all sessions that have expired.
 int deleteExpression(java.lang.String sessionId, int id)
          Deletes the Expression object referenced by id.
 int deleteExpressionVariable(java.lang.String sessionId, int id)
          Deletes the ExpressionVariable object referenced by id.
 void deleteExpressionVariablesForExpression(java.lang.String sessionId, int expressionId)
          Deletes all of the AdminExpressionVariable objects belonging to the AdminExpression referenced by expressionId.
 boolean deleteFile(java.lang.String sessionId, java.lang.String fileName)
          Delete the file.
 int deleteGeoZone(java.lang.String sessionId, int id)
          Delete a GeoZone.
 int deleteLanguage(java.lang.String sessionId, int langId)
          Delete a Language.
 void deleteMallStore(java.lang.String sessionId, java.lang.String storeId)
          Deletes an AdminStore object.
 void deleteManufacturer(java.lang.String sessionId, int manufacturerId, boolean deleteProducts)
          Delete the manufacturer and manufacturer info records.
 void deleteMiscItem(java.lang.String sessionId, int miId)
          Delete an AdminMiscItem.
 void deleteMiscItemType(java.lang.String sessionId, int miTypeId, boolean deleteChildren)
          Delete an AdminMiscItemType.
 void deleteMsg(java.lang.String sessionId, java.lang.String key, int type, java.lang.String locale)
          Delete a Message from the database
 int deleteOrder(java.lang.String sessionId, int ordId)
          Deletes an order and all associated records (eg addresses, status history etc).
 void deleteOrderReturn(java.lang.String sessionId, int orderRetId)
          Delete the AdminOrderReturn object and any associated AdminOrderReturnProduct objects.
 int deleteOrderStatusName(java.lang.String sessionId, int id)
          Delete an OrderStatusName object.
 void deletePanel(java.lang.String sessionId, int panelId)
          Deletes the panel identified by the panelId parameter.
 int deletePaymentSchedule(java.lang.String sessionId, int id)
          Delete a Payment Schedule Object
 int deletePoints(java.lang.String sessionId, int customerId, 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 customerId parameter.
 int deleteProdAttrDesc(java.lang.String sessionId, int id)
          Delete an AdminProdAttrDesc
 int deleteProdAttrTemplate(java.lang.String sessionId, int id)
          Delete an AdminProdAttrTemplate object.
 void deleteProduct(java.lang.String sessionId, int productId)
          Delete the product referenced by the productId parameter.
 void deleteProductAttribute(java.lang.String sessionId, int productAttributeId)
          Delete the productAttribute.
 void deleteProductAttributesPerProduct(java.lang.String sessionId, int productId)
          Delete the productAttributes Per product.
 void deleteProductNotification(java.lang.String sessionId, AdminProductNotification apn)
          Delete a Product Notification record for the specified customer and product if it's found.
 void deleteProductOptions(java.lang.String sessionId, int productOptionId)
          Delete a product option record for all languages and all of its records in the options values to options table and all of its values.
 void deleteProductOptionValues(java.lang.String sessionId, int productOptionValueId)
          Delete a product option value record for all languages and all of its records in the options values to options table.
 void deletePromotion(java.lang.String sessionId, int promotionId)
          Delete the promotion referenced by promotionId.
 void deleteReview(java.lang.String sessionId, int reviewId)
          Delete the review and all entries in the reviews description table.
 void deleteRole(java.lang.String sessionId, int roleId)
          Deletes the role identified by the roleId parameter.
 void deleteSingleCategory(java.lang.String sessionId, int categoryId)
          Delete a single category and its descriptions.
 void deleteSpecial(java.lang.String sessionId, int specialId)
          Deletes the special referenced by the special id
 int deleteSubscription(java.lang.String sessionId, int id)
          Delete a Subscription Object
 int deleteSubZone(java.lang.String sessionId, int id)
          Delete a SubZone.
 void deleteTag(java.lang.String sessionId, int id)
          Delete a Tag object.
 void deleteTagGroup(java.lang.String sessionId, int id)
          Delete a TagGroup object
 int deleteTaxClass(java.lang.String sessionId, int id)
          Delete an AdminTaxClass object referenced by it's id.
 int deleteTaxRate(java.lang.String sessionId, int id)
          Delete an AdminTaxRate object referenced by it's id.
 void deleteWishList(java.lang.String sessionId, int wishListId)
          Delete a wish list and all of its wish list items.
 void deleteWishListItem(java.lang.String sessionId, int wishListItemId)
          Delete a wish list and all of its wish list items.
 int deleteZone(java.lang.String sessionId, int id)
          Delete an AdminZone object referenced by it's id.
 boolean doesCustomerExistForEmail(java.lang.String sessionId, java.lang.String emailAddr)
          Checks to see whether a customer already exists with this email address.
 boolean doesMallStoreExist(java.lang.String storeId)
          Does the specified store exist?
 boolean doesProductExist(java.lang.String sessionId, int productId)
          Is there a product in the database with the specified productId
 void editApiCall(java.lang.String sessionId, AdminApiCall apiCall)
          Edit an ApiCall.
 void editCategory(java.lang.String sessionId, AdminCategory cat)
          The category is edited.
 void editCoupon(java.lang.String sessionId, AdminCoupon coupon)
          Edits the coupon, replacing existing data with data in the coupon parameter.
 void editManufacturer(java.lang.String sessionId, AdminManufacturer manu)
          Edits the manufacturer, replacing existing data with data in the manu parameter.
 void editOrder(java.lang.String sessionId, AdminOrder order)
          Edit an existing order.
 void editOrderReturn(java.lang.String sessionId, AdminOrderReturn orderRet)
          Edits the orderReturn, replacing existing data with data in the orderRet parameter.
 void editPanel(java.lang.String sessionId, AdminPanel panel)
          Edit a Panel.
 void editProduct(java.lang.String sessionId, AdminProduct product)
          Edits the product, replacing existing data with data in the product parameter.
 void editProductAttribute(java.lang.String sessionId, AdminProductAttribute prodAttr)
          Edits the product attribute, replacing existing data with data in the prodAttr parameter.
 void editProductOption(java.lang.String sessionId, AdminProductOption productOption)
          Edits the product option, replacing existing data with data in the productOption parameter.
 void editProductOptionValue(java.lang.String sessionId, AdminProductOptionValue productOptionValue)
          Edits the product option value, replacing existing data with data in the productOptionValue parameter.
 void editProductWithOptions(java.lang.String sessionId, AdminProduct product, AdminProductMgrOptions mgrOptions)
          Edit a product and its product description objects.
 void editPromotion(java.lang.String sessionId, AdminPromotion promotion)
          Edits the promotion, replacing existing data with data in the promotion parameter.
 void editReview(java.lang.String sessionId, AdminReview review)
          Edits the review, replacing existing data with data in the review parameter.
 void editRole(java.lang.String sessionId, AdminRole role)
          Edit a Role.
 void editSpecial(java.lang.String sessionId, AdminSpecial special)
          Edits the special, replacing existing data with data in the special parameter.
 boolean evaluateExpression(java.lang.String sessionId, int customerId, int expressionId, java.lang.String expressionName)
          An expression object is retrieved from the database and evaluated for the customer referenced by the customerId.
 java.lang.String execute(java.lang.String sessionId, java.lang.String className, java.lang.String methodName, java.lang.String[] paramArray)
          Executes a method with name methodName of a class with name className with the parameters of type String in paramArray.
 java.lang.String exportMsgs(int type, java.lang.String locale)
          Export Messages from the database
 com.konakart.app.ExportOrderResponse exportOrder(java.lang.String sessionId, com.konakart.app.ExportOrderOptions options)
          Exports the Order
 int forceRegisterCustomer(java.lang.String sessionId, AdminCustomerRegistration custReg)
          Register a new customer.
 AdminAddress getAddressById(java.lang.String sessionId, int addressId)
          Get Addresses defined by the search criteria
 AdminAddressSearchResult getAddresses(java.lang.String sessionId, AdminAddressSearch search, int offset, int size)
          Get Addresses defined by the search criteria
 AdminAddressFormatSearchResult getAddressFormats(AdminAddressFormatSearch search)
          This returns an AdminAddressFormatSearchResult object.
 AdminAddressFormat[] getAllAddressFormats()
          This returns an array of all the address formats
 AdminApiCall[] getAllApiCalls(java.lang.String sessionId)
          Returns an array of all apiCalls in the database.
 AdminConfigurationGroup[] getAllConfigurationGroups(java.lang.String sessionId)
          Returns an array of all the Configuration Group objects.
 KKConfiguration[] getAllConfigurations(java.lang.String sessionId)
          Returns an array of all the Configuration objects.
 AdminCountry[] getAllCountriesFull()
          Returns an array of all Country objects in the database.
 AdminGeoZone[] getAllGeoZones()
          Returns an array of all GeoZones in the database.
 AdminLanguage[] getAllLanguages()
          Get all of the languages in the database.
 AdminManufacturer[] getAllManufacturers()
          Get all manufacturers ordered by name.
 AdminOrderStatusName[] getAllOrderStatuses(int languageId)
          Returns an array of AdminOrderStatusNames for the specified languageId.
 AdminPanel[] getAllPanels(java.lang.String sessionId)
          Returns an array of all panels in the database.
 AdminProductOption[] getAllProductOptions(int languageId)
          Return all product options in the database for any given language.
 AdminProductOptionValue[] getAllProductOptionValues(java.lang.String sessionId, int languageId)
          Get an array of all the product option value objects for the specified language.
 AdminReviews getAllReviews(java.lang.String sessionId, AdminDataDescriptor dataDesc)
          Returns all reviews.
 AdminRole[] getAllRoles(java.lang.String sessionId)
          Returns an array of all Roles in the database.
 AdminProducts getAllSpecials(java.lang.String sessionId, AdminDataDescriptor dataDesc, int languageId)
          Returns an AdminProducts object containing an array of product objects which are all specials.
 AdminTaxClass[] getAllTaxClassesFull()
          Returns an array of all AdminTaxClass objects in the database.
 AdminTaxRateSearchResult getAllTaxRates()
          This returns an AdminTaxRateSearchResult object.
 AdminApiCall getApiCall(java.lang.String sessionId, int apiCallId)
          Returns the AdminApiCall referenced by the apiCallId.
 AdminApiCall[] getApiCallsPerRole(java.lang.String sessionId, int roleId)
          Retrieves an array of AdminApiCall objects for the role identified by the roleId parameter.
 AdminAuditSearchResult getAuditData(java.lang.String sessionId, AdminAuditSearch retSearch, int offset, int size)
          Retrieve audit data from the database.
 AdminBookingSearchResult getBookings(java.lang.String sessionId, AdminBookingSearch search, int offset, int size, AdminBookableProductOptions options)
          Search for bookings.
 AdminProduct getBundleProductDetails(java.lang.String sessionId, int bundleId, AdminProduct[] bundledProducts, AdminDiscount discount)
          This method is used to calculate some attributes of a bundle product based on the products that the bundle contains.
 AdminCatalog getCatalogById(java.lang.String sessionId, int catalogId)
          Fetch a catalog from the database referenced by the catalog id
 AdminCatalogSearchResult getCatalogs(java.lang.String sessionId, AdminCatalogSearch search, int offset, int size)
          Get an array of catalogs matching the search criteria from the database.
 AdminCategory[] getCategoriesPerPromotion(java.lang.String sessionId, int promotionId, int languageId)
          Returns all of the categories for the promotion identified by promotionId.
 int[] getCategoriesPerTagGroup(java.lang.String sessionId, int tagGroupId)
          Return an array of Category Ids linked to the specified tag group.
 AdminCategoryToTagGroup[] getCategoriesToTagGroups(java.lang.String sessionId)
          Return an array of all of the AdminCategoryToTagGroup records.
 AdminCategory getCategory(int categoryId, boolean getChildren, int languageId)
          Returns either a single category object or a tree of category objects if getChildren is set to true.
 AdminCategory[] getCategoryTree(int languageId, boolean getNumProducts)
          Returns the complete category tree.
 AdminConfigData[] getConfigData(java.lang.String sessionId, java.lang.String key)
          Returns the AdminConfigData items with the specified key or all AdminConfigData items if the key is null
 AdminFile[] getConfigFiles(java.lang.String sessionId)
          Gets the Config files defined in konakart_config_files.xml
 KKConfiguration getConfigurationByKey(java.lang.String sessionId, java.lang.String key)
          Returns a KKConfiguration object with the specified key.
 AdminConfigurationGroup[] getConfigurationGroupsByTitle(java.lang.String sessionId, java.lang.String title)
          Returns an array of AdminConfigurationGroup objects with the specified title.
 java.lang.String[] getConfigurationInfo(java.lang.String sessionId, java.lang.String[] validationKeys)
          Get the configuration values for the given keys.
 KKConfiguration[] getConfigurationsByGroup(java.lang.String sessionId, int configGroup)
          Get the configuration elements for the specified group
 AdminCountrySearchResult getCountries(AdminCountrySearch search, int offset, int count)
          This returns an AdminCountrySearchResult object.
 AdminCouponSearchResult getCoupons(java.lang.String sessionId, AdminCouponSearch search, int offset, int size)
          This returns an AdminCouponSearchResult object containing an array of AdminCoupons.
 AdminCoupon[] getCouponsPerPromotion(java.lang.String sessionId, int promotionId)
          Returns an array of Admin Coupon objects associated with the promotion identified by the promotionId parameter.
 AdminCurrencySearchResult getCurrencies(AdminCurrencySearch search)
          Returns an AdminCurrencySearchResult object.
 AdminCurrency getCurrency(java.lang.String currencyCode)
          Return the currency object for the specified currency code.
 java.lang.String getCustomDataFromSession(java.lang.String sessionId, int position)
          A sessionId is created when a customer logs in to KonaKart Admin App using the login() API call.
 AdminCustomer getCustomerForEmail(java.lang.String sessionId, java.lang.String emailAddress)
          Find and return a customer with an email address matching the emailAddress parameter.
 AdminCustomer getCustomerForId(java.lang.String sessionId, int customerId)
          Returns the customer object for the customer defined by the given id.
 AdminCustomerGroupSearchResult getCustomerGroups(AdminCustomerGroupSearch search)
          Return AdminCustomerGroups matching search criteria.
 AdminCustomerGroup[] getCustomerGroupsPerPromotion(java.lang.String sessionId, int promotionId, int languageId)
          Returns all of the customer groups for the promotion identified by promotionId.
 AdminCustomerSearchResult getCustomers(java.lang.String sessionId, AdminCustomerSearch search, int offset, int size)
          Returns a set of Customers that match the search criteria.
 int getCustomersCount(java.lang.String sessionId, AdminCustomerSearch search)
          Returns a count of the number of Customers matching the specified search.
 int getCustomersCountWhoHaventPlacedAnOrderSince(java.lang.String sessionId, java.util.Calendar lastOrderDate)
          Return the count of the number of customers who haven't placed an order since the lastOrderDate passed in as a parameter.
 int getCustomersCountWhoHavePlacedAnOrderSince(java.lang.String sessionId, java.util.Calendar lastOrderDate)
          Return the count of the number of customers who have placed an order since the lastOrderDate passed in as a parameter.
 AdminCustomerSearchResult getCustomersLite(java.lang.String sessionId, AdminCustomerSearch search, int offset, int size)
          Returns a set of "Lite" Customers that match the search criteria.
 AdminCustomerTag getCustomerTag(java.lang.String sessionId, int id)
          Returns the AdminCustomerTag object for the id parameter, or Null if the customer tag doesn't exist in the DB.
 AdminCustomerTag getCustomerTagForCustomer(java.lang.String sessionId, int customerId, java.lang.String tagName)
          Returns the customer tag object for the tagName parameter, or Null if the customer tag doesn't exist in the DB.
 AdminCustomerTag getCustomerTagForName(java.lang.String sessionId, java.lang.String tagName)
          Returns the customer tag object for the tagName parameter, or Null if the customer tag doesn't exist in the DB.
 AdminCustomerTagSearchResult getCustomerTags(java.lang.String sessionId, AdminCustomerTagSearch search, int offset, int size)
          Returns an AdminCustomerTagSearchResult object.
 AdminCustomerTag[] getCustomerTagsForCustomer(java.lang.String sessionId, int customerId)
          This method fetches all of the customer tags for the customer referenced by the customerId parameter.
 AdminCustomValidatorSet getCustomValidatorSet()
          Gets an AdminCustomValidatorSet.
protected  AdminEngineConfig getDefaultAdminEngConfig()
           
 AdminCurrency getDefaultCurrency()
          The default currency is referenced by a configuration variable called DEFAULT_CURRENCY.
 AdminLanguage getDefaultLanguage()
          Returns the default language.
 AdminExpression getExpression(java.lang.String sessionId, int id)
          Returns the AdminExpression object for the id parameter, or Null if the AdminExpression doesn't exist in the DB.
 AdminExpression getExpressionForName(java.lang.String sessionId, java.lang.String expName)
          Returns the AdminExpression object for the expName parameter, or Null if the AdminExpression doesn't exist in the DB.
 AdminExpressionSearchResult getExpressions(java.lang.String sessionId, AdminExpressionSearch search, int offset, int size)
          This returns an AdminExpressionSearchResult object.
 AdminExpression[] getExpressionsPerPromotion(java.lang.String sessionId, int promotionId)
          Fetch an array of Expression objects linked to the promotion referenced by promotionId
 AdminExpressionVariable getExpressionVariable(java.lang.String sessionId, int id)
          Returns the AdminExpressionVariable object for the id parameter, or Null if the AdminExpressionVariable doesn't exist in the DB.
 AdminExpressionVariable[] getExpressionVariablesForExpression(java.lang.String sessionId, int expressionId)
          Returns an array of AdminExpressionVariable objects for the AdminExpression identified by the id parameter.
 java.lang.String getFileContents(java.lang.String sessionId, java.lang.String fileName)
          Get the file contents.
 byte[] getFileContentsAsByteArray(java.lang.String sessionId, java.lang.String fileName)
          Get the file contents as a byte array.
 AdminFile[] getFiles(java.lang.String sessionId, java.lang.String directory, java.lang.String extension)
          Returns an array of files found in the directory.
 AdminGeoZoneSearchResult getGeoZones(AdminGeoZoneSearch search, int offset, int size)
          This returns an AdminGeoZoneSearchResult object.
 AdminProducts getGiftCertificatesPerPromotion(java.lang.String sessionId, AdminProductSearch search, int offset, int size)
          Get an array of Admin product gift certificate objects for a promotion.
 java.lang.String getHelpMsg(java.lang.String msgKey, java.lang.String languageCode)
          Return the help message for the specified language and the specified key.
 java.lang.String getHtml(java.lang.String sessionId, int htmlType, int id, int languageId, java.lang.String arg1)
          Retrieve the HTML string for the specified HTML type, in the specified language.
 java.lang.String getKonaKartAdminVersion()
          Return the version number of KonaKart Admin that is contained within the konakart.jar
 java.lang.String getKonakartPropertyValue(java.lang.String sessionId, java.lang.String section, java.lang.String propertyName)
          Returns the property value from the properties file in the specified section
 AdminLanguage getLanguageByCode(java.lang.String code)
          Returns the language referenced by the two letter lower case code (e.g.
 AdminLanguage getLanguageById(int id)
          Returns the language referenced by language ID.
 AdminLanguage getLanguageForLocale(java.lang.String locale)
          Retrieves the language for the locale
 int getLanguageIdForLocale(java.lang.String locale)
          Retrieves the language Id for the locale
 AdminLanguageSearchResult getLanguages(AdminLanguageSearch search)
          This returns an AdminLanguageSearchResult object.
 AdminStoreSearchResult getMallStores(AdminStoreSearch search, int offset, int size)
          Get the stores in the mall supported by the server - Multi-Store Single DB only.
 AdminManufacturer getManufacturer(int manufacturerId)
          Get a fully populated manufacturer
 AdminManufacturerSearchResult getManufacturers(java.lang.String sessionId, AdminManufacturerSearch search, int offset, int size)
          Returns an AdminManufacturerSearchResult object.
 AdminManufacturer[] getManufacturersPerPromotion(java.lang.String sessionId, int promotionId)
          Returns all of the manufacturers for the promotion identified by promotionId.
 AdminMiscItemSearchResult getMiscItems(java.lang.String sessionId, AdminSearch search, int offset, int size)
          Return the AdminMiscItem objects defined by the search criteria.
 AdminMiscItemType[] getMiscItemTypes(java.lang.String sessionId, AdminSearch search, int offset, int size)
          Return the AdminMiscItemType objects defined by the search criteria.
 KKModule[] getModules(java.lang.String sessionId, int moduleType)
          Get the available modules of the specified type.
 AdminMessageSet getMsgs(java.lang.String languageCode)
          Return a set of admin application messages for the specified language.
 java.lang.String getMsgValue(java.lang.String key, int type, java.lang.String locale)
          Get a Message Value from the database
 int getNextProductOptionId(java.lang.String sessionId)
          Get the next id to use when inserting a ProductOption record.
 int getNextProductOptionValuesId(java.lang.String sessionId)
          Get the next id to use when inserting a ProductOptionValue record.
 AdminOrder getOrderForOrderId(java.lang.String sessionId, int orderId)
          Retrieve an order for an orderId, using the default language
 AdminOrder getOrderForOrderIdAndLangId(java.lang.String sessionId, int orderId, int languageId)
          Returns an order for an orderId and a languageId.
 AdminOrderReturnSearchResult getOrderReturns(java.lang.String sessionId, AdminOrderReturnSearch retSearch, int offset, int size)
          Search for OrderReturn objects with search criteria and order by criteria.
 AdminOrderSearchResult getOrders(java.lang.String sessionId, AdminOrderSearch search, int offset, int size, int languageId)
          Returns a set of Orders that match the search criteria.
 int getOrdersCount(java.lang.String sessionId, int orderStatus)
          Returns a count of the Orders with the specified status.
 AdminOrder[] getOrdersCreatedSince(java.lang.String sessionId, java.util.Calendar since, int languageId)
          Deprecated. 
 AdminOrderSearchResult getOrdersLite(java.lang.String sessionId, AdminOrderSearch search, int offset, int size, int languageId)
          Returns a set of Orders matching the specified search criteria.
 AdminOrderStatusNameSearchResult getOrderStatusNames(AdminOrderStatusNameSearch search)
          Returns an AdminOrderStatusNameSearchResult object.
 AdminPanel getPanel(java.lang.String sessionId, int panelId)
          Returns the AdminPanel referenced by the panelId.
 AdminPanel[] getPanelsPerRole(java.lang.String sessionId, int roleId)
          Retrieves an array of AdminPanel objects for the role identified by the roleId parameter.
 AdminPaymentSchedule getPaymentSchedule(java.lang.String sessionId, int id)
          Returns the payment schedule object for the id parameter, or Null if the payment schedule object doesn't exist in the DB.
 AdminPaymentScheduleSearchResult getPaymentSchedules(java.lang.String sessionId, AdminPaymentScheduleSearch search, int offset, int size)
          This returns an AdminPaymentScheduleSearchResult object.
 com.konakart.app.PdfResult getPdf(java.lang.String sessionId, com.konakart.app.PdfOptions options)
          Create the PDF document and return the URL, File name or bytes as defined by the input options.
 AdminProdAttrDesc getProdAttrDesc(java.lang.String sessionId, int id)
          Returns the AdminProdAttrDesc object for the id parameter, or Null if the AdminProdAttrDesc doesn't exist in the DB.
 AdminProdAttrDescSearchResult getProdAttrDescs(java.lang.String sessionId, AdminProdAttrDescSearch search, int offset, int size)
          This returns an AdminProdAttrDescSearchResult object that contains an array of AdminProdAttrDesc objects.
 AdminProdAttrDesc[] getProdAttrDescsForTemplate(java.lang.String sessionId, int templateId)
          This method fetches all of the AdminProdAttrDesc objects for the template referenced by the templateId parameter.
 AdminProdAttrTemplate getProdAttrTemplate(java.lang.String sessionId, int id)
          Returns the AdminProdAttrTemplate object for the id parameter, or Null if the AdminProdAttrTemplate doesn't exist in the DB.
 AdminProdAttrTemplateSearchResult getProdAttrTemplates(java.lang.String sessionId, AdminProdAttrTemplateSearch search, int offset, int size)
          This returns an AdminProdAttrTemplateSearchResult object containing an array of AdminProdAttrTemplate objects.
 AdminProduct getProduct(java.lang.String sessionId, int productId)
          Get the product referenced by this product id, from the database.
 AdminProductAttribute[] getProductAttributesPerProduct(java.lang.String sessionId, int productId)
          Gets all of the product attributes for the product.
 java.util.Calendar getProductAvailability(java.lang.String sessionId, java.lang.String sku, int id)
          A method that directly returns the date when a product will be available.
 java.util.Calendar getProductAvailabilityWithOptions(java.lang.String sessionId, java.lang.String sku, int id, AdminProductMgrOptions mgrOptions)
          A method that directly returns the date when a product will be available.
 int getProductCountPerAddress(java.lang.String sessionId, int addressId)
          Returns the number of products using the address identified by addressId.
 int getProductCountPerProdAttrDesc(java.lang.String sessionId, int attrDescId)
          Returns the number of products using the product attribute descriptor.
 int getProductCountPerTemplate(java.lang.String sessionId, int templateId)
          Returns the number of products using the custom product attribute template.
 AdminProductNotification[] getProductNotificationsForCustomer(java.lang.String sessionId, int customerId)
          Get an array of product notifications for the customer.
 AdminProductOptionSearchResult getProductOptions(java.lang.String sessionId, AdminProductOptionSearch search, int offset, int size)
          This returns an AdminProductOptionSearchResult object.
 AdminProductOption[] getProductOptionsPerId(java.lang.String sessionId, int productOptionId)
          Returns an array of AdminProductOption objects.
 AdminProductOption[] getProductOptionsPerName(java.lang.String sessionId, java.lang.String name, int langId)
          Returns an array of productOptions with the specified name and languageId.
 AdminProductOptionValue[] getProductOptionValuesPerId(java.lang.String sessionId, int productOptionValueId)
          Returns an array of productOptionValues.
 AdminProductOptionValue[] getProductOptionValuesPerName(java.lang.String sessionId, java.lang.String name, int languageId)
          Get an array of product option value objects with the specified name and language.
 AdminProductOptionValue[] getProductOptionValuesPerOption(int productOptionId, int languageId)
          Return an array of product option value objects for a product option object
 AdminProdOptionValToProdOption[] getProductOptionValueToProductOptions(java.lang.String sessionId, AdminProdOptionValToProdOption prodOptValToProdOpt)
          Gets an array of AdminProdOptionValToProdOption objects that have the specified optionId and OptionValueId.
 int getProductQuantity(java.lang.String sessionId, java.lang.String sku, int id)
          A method that allows you to directly retrieve the quantity of a product.
 int getProductQuantityWithOptions(java.lang.String sessionId, java.lang.String sku, int id, AdminProductMgrOptions mgrOptions)
          A method that allows you to directly retrieve the quantity of a product.
 AdminProducts getProductsPerPromotion(java.lang.String sessionId, AdminProductSearch search, int offset, int size)
          Get an array of Admin product objects for a promotion.
 AdminProductToStore[] getProductsToStores(java.lang.String sessionId, AdminDataDescriptor dataDesc, AdminSearch search)
          Returns an array of AdminProductToStore objects for the specified store
 AdminProducts getProductsToSynchronize(java.lang.String sessionId, java.lang.String storeIdFrom, java.lang.String storeIdTo, AdminDataDescriptor dataDesc, int languageId, AdminSynchProductsOptions options, AdminProductMgrOptions mgrOptions)
          This API call is used to get a list of products that are out of sync between two stores.
 AdminProduct getProductWithOptions(java.lang.String sessionId, int productId, AdminProductMgrOptions mgrOptions)
          Get the product referenced by this product id, from the database.
 AdminPromotion getPromotion(java.lang.String sessionId, int id, boolean includeCoupons, boolean includeStats)
          Get a promotion object and an array of associated coupon objects when applicable.
 AdminPromotionSearchResult getPromotions(java.lang.String sessionId, AdminPromotionSearch search, int offset, int size)
          This returns an AdminPromotionSearchResult object containing an array of AdminPromotions.
 int getPromotionsCount(java.lang.String sessionId, AdminPromotionSearch search)
          Returns a count of the number of AdminPromotions.
 AdminPromotion[] getPromotionsPerCoupon(java.lang.String sessionId, int couponId)
          Get an array of Admin promotion objects for a coupon.
 AdminProducts getRelatedProducts(java.lang.String sessionId, AdminDataDescriptor dataDesc, int productId, int relationType, int languageId)
          Find products related to the product defined by the productId parameter.
 AdminProducts getRelatedProductsWithOptions(java.lang.String sessionId, AdminDataDescriptor dataDesc, int productId, int relationType, int languageId, AdminProductMgrOptions mgrOptions)
          Find products related to the product defined by the productId parameter.
 AdminReport[] getReports(java.lang.String sessionId)
          Retrieves the reports as an array of AdminReport objects that define the set of reports currently defined on the system.
 AdminReview getReview(java.lang.String sessionId, int reviewId)
          Returns the review referenced by the review Id
 AdminReviews getReviews(java.lang.String sessionId, AdminDataDescriptor dataDesc, AdminReviewSearch revSearch)
          Returns the reviews for the given search criteria.
 AdminReviews getReviewsPerProduct(java.lang.String sessionId, AdminDataDescriptor dataDesc, int productId)
          Returns the reviews for a product.
 AdminRewardPointSearchResult getRewardPoints(java.lang.String sessionId, AdminRewardPointSearch search, int offset, int size)
          The Reward Point transactions can be filtered by the creation dates and sorted by: AdminDataDescriptor.ORDER_BY_DATE_ADDED_ASCENDING AdminDataDescriptor.ORDER_BY_DATE_ADDED_DESCENDING
 AdminRole getRole(java.lang.String sessionId, int roleId)
          Returns the AdminRole referenced by the roleId.
 AdminRole[] getRolesPerSessionId(java.lang.String sessionId)
          Retrieves an array of AdminRole objects for the user logged in with the session id.
 AdminRole[] getRolesPerUser(java.lang.String sessionId, int userId)
          Retrieves an array of AdminRole objects for the user identified by the userId parameter.
 AdminSearchRule[] getSearchRules()
          Reads the search rules from a properties file and returns them as an array.
 java.lang.String getSku(java.lang.String sessionId, AdminOrderProduct orderProd)
          Get the SKU for an orderProduct object.
 java.lang.String[] getSkus(java.lang.String sessionId, AdminOrderProduct[] orderProds)
          Get the SKUs for an array AdminOrderProduct objects.
 AdminSpecial getSpecial(java.lang.String sessionId, int specialId)
          Returns a special referenced by the id parameter
 AdminProducts getSpecialsPerCategory(java.lang.String sessionId, AdminDataDescriptor dataDesc, int categoryId, boolean searchInSubCats, int languageId)
          Returns an AdminProducts object containing an array of specials for a category.
 AdminStore[] getStores()
          Get the stores supported by the server.
 AdminSubscription getSubscription(java.lang.String sessionId, int id)
          Returns the subscription object for the id parameter, or Null if the subscription object doesn't exist in the DB.
 AdminSubscriptionSearchResult getSubscriptions(java.lang.String sessionId, AdminSubscriptionSearch search, int offset, int size)
          This returns an AdminSubscriptionSearchResult object.
 AdminSubZoneSearchResult getSubZones(AdminSubZoneSearch search, int offset, int size)
          This returns an AdminSubZoneSearchResult object.
 AdminTagGroupSearchResult getTagGroups(java.lang.String sessionId, AdminSearch search, int offset, int size)
          Return the TagGroup objects defined by the search criteria.
 AdminTagGroup[] getTagGroupsPerCategory(java.lang.String sessionId, int categoryId, int languageId)
          Return an array of AdminTagGroup objects for a category.
 AdminTagGroupToTag[] getTagGroupToTags(java.lang.String sessionId, AdminSearch search, int offset, int size)
          Return the TagGroupToTag objects defined by the search criteria.
 AdminTagSearchResult getTags(java.lang.String sessionId, AdminSearch search, int offset, int size)
          Return the Tag objects defined by the search criteria.
 AdminTag[] getTagsPerProduct(java.lang.String sessionId, int productId, int languageId)
          Fetches all of the tags associated with a product.
 AdminTaxClassSearchResult getTaxClasses(AdminTaxClassSearch search)
          This returns an AdminTaxClassSearchResult object.
 AdminTaxRateSearchResult getTaxRates(AdminTaxRateSearch search, int offset, int size)
          This returns an AdminTaxRateSearchResult object.
 int getTemplateCountPerProdAttrDesc(java.lang.String sessionId, int attrDescId)
          Returns the number of templates using the product attribute descriptor.
 AdminCategory[] getTopLevelCategories(int languageId, AdminDataDescriptor dataDesc)
          Returns all of the top level categories which are those that have a parentId = 0.
 AdminWishLists getWishLists(java.lang.String sessionId, AdminWishListSearch search, int offset, int size)
          Return the WishList objects defined by the search criteria.
 AdminZoneSearchResult getZones(AdminZoneSearch search, int offset, int size)
          This returns an AdminZoneSearchResult object.
 AdminZone[] getZonesById(int countryId)
          Returns an array of fully-populated AdminZones for the specified countryId.
 int importAudit(java.lang.String sessionId, AdminAudit audit)
          Imports an audit object.
 int importDigitalDownload(java.lang.String sessionId, AdminDigitalDownload digDownload)
          Import a new digital download record.
 void importMsgs(java.lang.String sessionId, int type, java.lang.String locale, java.lang.String msgString, boolean replace)
          Import Messages into the database
 int insertAddress(java.lang.String sessionId, AdminAddress address)
          Insert an AdminAddress.
 int insertAddressFormat(java.lang.String sessionId, AdminAddressFormat insertObj)
          Insert an AdminAddressFormat object
 int insertApiCall(java.lang.String sessionId, AdminApiCall apiCall)
          Insert a new ApiCall.
 int insertBooking(java.lang.String sessionId, AdminBooking booking, AdminBookableProductOptions options)
          Insert a new booking.
 int insertCatalog(java.lang.String sessionId, AdminCatalog catalog)
          Insert a new catalog
 int insertCategory(java.lang.String sessionId, AdminCategory cat)
          Inserts a new category into the database.
 void insertConfigs(java.lang.String sessionId, KKConfiguration[] configs)
          Insert one or more new configuration parameters
 int insertConfiguration(java.lang.String sessionId, KKConfiguration config)
          Insert a configuration object.
 int insertConfigurationGroup(java.lang.String sessionId, AdminConfigurationGroup configGroup)
          Insert a configuration group.
 int insertCountry(java.lang.String sessionId, AdminCountry country)
          Insert an AdminCountry object.
 int insertCoupon(java.lang.String sessionId, AdminCoupon coupon)
          Inserts a coupon.
 int insertCouponForPromotion(java.lang.String sessionId, AdminCoupon coupon, int promotionId)
          Inserts a coupon and also a record in the promotion_to_coupon table to associate the coupon to a promotion.
 int insertCurrency(java.lang.String sessionId, AdminCurrency curr)
          Insert a Currency.
 int insertCustomerGroup(java.lang.String sessionId, AdminCustomerGroup custGroup)
          Insert a Customer Group.
 int insertCustomerGroups(java.lang.String sessionId, AdminCustomerGroup[] custGroups)
          Insert an array of AdminCustomerGroup objects.
 int insertCustomerTag(java.lang.String sessionId, AdminCustomerTag tag)
          Inserts an AdminCustomerTag object into the database.
 void insertCustomerTagForCustomer(java.lang.String sessionId, int customerId, AdminCustomerTag tag)
          Assigns a customer tag to the customer referenced by the customerId.
 void insertDigitalDownload(java.lang.String sessionId, int customerId, int productId)
          Create and insert a digital download record for the product identified by the productId and the customer identified by the sessionId.
 int insertExpression(java.lang.String sessionId, AdminExpression exp)
          Inserts an AdminExpression object.
 int insertExpressionVariables(java.lang.String sessionId, AdminExpressionVariable[] expVarArray)
          Inserts an array of ExpressionVariable objects that should all belong to the same expression.
 int insertGeoZone(java.lang.String sessionId, AdminGeoZone insertObj)
          Insert an AdminGeoZone object.
 int insertIpnHistory(java.lang.String sessionId, AdminIpnHistory ipnHistory)
          Save the AdminIpnHistory object in the database.
 int insertLanguage(java.lang.String sessionId, AdminLanguage lang)
          Insert a Language.
 void insertMallStore(java.lang.String sessionId, AdminStore store)
          Insert a new store into the mall.
 int insertManufacturer(java.lang.String sessionId, AdminManufacturer manu)
          Insert a manufacturer
 int insertMiscItems(java.lang.String sessionId, AdminMiscItem[] mItems)
          Insert an array of AdminMiscItem objects
 int insertMiscItemType(java.lang.String sessionId, AdminMiscItemType[] miTypes)
          Insert an array of AdminMiscItemType objects
 void insertMsg(java.lang.String sessionId, java.lang.String key, int type, java.lang.String locale, java.lang.String value)
          Insert a Message into the database
 int insertOrder(java.lang.String sessionId, AdminOrder order)
          Insert an order.
 int insertOrderReturn(java.lang.String sessionId, AdminOrderReturn orderRet)
          Insert an AdminOrderReturn object and its array of AdminOrderReturnProduct objects
 int insertOrderStatusName(java.lang.String sessionId, AdminOrderStatusName obj)
          Insert an OrderStatusName object.
 int insertOrderStatusNames(java.lang.String sessionId, AdminOrderStatusName[] ordStats)
          Insert an array of AdminOrderStatusName objects.
 int insertPanel(java.lang.String sessionId, AdminPanel panel)
          Insert a new Panel.
 int insertPaymentSchedule(java.lang.String sessionId, AdminPaymentSchedule ps)
          An AdminPaymentSchedule object is inserted into the database.
 int insertProdAttrDesc(java.lang.String sessionId, AdminProdAttrDesc attrDesc)
          An AdminProdAttrDesc object is inserted into the database.
 int insertProdAttrTemplate(java.lang.String sessionId, AdminProdAttrTemplate template)
          An AdminProdAttrTemplate object is inserted into the database.
 int insertProduct(java.lang.String sessionId, AdminProduct product)
          Insert the product.
 int insertProductAttribute(java.lang.String sessionId, AdminProductAttribute prodAttr)
          Inserts the product attribute.
 void insertProductNotification(java.lang.String sessionId, AdminProductNotification apn)
          Insert a Product Notification record for the specified customer and product.
 void insertProductOption(java.lang.String sessionId, AdminProductOption productOption)
          Insert a product option.
 int insertProductOptions(java.lang.String sessionId, AdminProductOption[] productOptions)
          The array of product options will all be inserted with the same id which is calculated by the system.
 void insertProductOptionValue(java.lang.String sessionId, AdminProductOptionValue productOptionValue, int productOptionId)
          Insert a product option value for a product option
 int insertProductOptionValues(java.lang.String sessionId, AdminProductOptionValue[] productOptionValues, int productOptionId)
          The array of product option values will all be inserted with the same id which is calculated by the system.
 int insertProductsOptionsValuesToProductsOptions(java.lang.String sessionId, AdminProdOptionValToProdOption prodOptValToProdOpt)
          Insert a product option value to product option record.
 void insertProductsToStores(java.lang.String sessionId, AdminProductToStore[] productToStores)
          Inserts an array of AdminProductToStore objects
 int insertProductWithOptions(java.lang.String sessionId, AdminProduct product, AdminProductMgrOptions mgrOptions)
          Insert the product.
 int insertPromotion(java.lang.String sessionId, AdminPromotion prom)
          Inserts a promotion.
 int insertReview(java.lang.String sessionId, AdminReview review)
          A new review is inserted
 int insertRole(java.lang.String sessionId, AdminRole role)
          Insert a new Role.
 int insertSpecial(java.lang.String sessionId, AdminSpecial special)
          Inserts a new special
 int insertSubscription(java.lang.String sessionId, AdminSubscription subscription)
          An AdminSubscription object is inserted into the database.
 int insertSubZone(java.lang.String sessionId, AdminSubZone insertObj)
          Insert an AdminSubZone object.
 int insertTag(java.lang.String sessionId, AdminTag tag)
          Insert a new Tag object
 int insertTagGroup(java.lang.String sessionId, AdminTagGroup tagGroup)
          Insert a new TagGroup object
 int insertTagGroups(java.lang.String sessionId, AdminTagGroup[] tagGroup)
          Insert an array of TagGroup objects - provide a TagGroup object for each language
 void insertTagGroupToTags(java.lang.String sessionId, AdminTagGroupToTag tagGroupToTag)
          Insert an AdminTagGroupToTag record
 int insertTags(java.lang.String sessionId, AdminTag[] tag)
          Insert an array of Tag objects - provide a Tag record for each supported language.
 int insertTaxClass(java.lang.String sessionId, AdminTaxClass insertObj)
          Insert an AdminTaxClass object
 int insertTaxRate(java.lang.String sessionId, AdminTaxRate insertObj)
          Insert an AdminTaxRate object
 int insertWishList(java.lang.String sessionId, AdminWishList wishList)
          Insert a wish list and any attached wish list items.
 int insertWishListItem(java.lang.String sessionId, AdminWishListItem wishListItem)
          Insert an AdminWishListItem.
 int insertZone(java.lang.String sessionId, AdminZone insertObj)
          Insert an AdminZone object
 java.lang.String login(java.lang.String user, java.lang.String password)
          Used to log into the Admin application and get a session Id.
 void logMsg(int level, java.lang.String message)
          For debugging the client - it writes out the String that's sent if we are logging at the specified level or above
 void logout(java.lang.String sessionId)
          Used to logout the user with the specified sessionId.
 void moveCategory(java.lang.String sessionId, int categoryId, int newParentId)
          The category referenced by categoryId is moved to a new parent referenced by newParentId.
 int pointsAvailable(java.lang.String sessionId, int customerId)
          Calculates the number of reward points available for the customer identified by the customerId parameter.
 void publishProducts(java.lang.String sessionId, AdminPublishConfig adminPublishConfig)
          Publish Products to the Data Feed.
 java.lang.String readFromUrl(java.lang.String sessionId, java.lang.String url)
          Reads the resource at the given URL and returns it as a string.
 int registerCustomer(java.lang.String sessionId, AdminCustomerRegistration custReg)
          Register a new customer.
 void reloadReports(java.lang.String sessionId)
          Reloads the reports
 void removeAddressFromProduct(java.lang.String sessionId, int addressId, int productId)
          Remove the relationship between the address and the product.
 void removeAllProductsFromSearchEngine(java.lang.String sessionId, boolean async)
          Remove all products from the search engine.
 void removeApiCallsFromRole(java.lang.String sessionId, AdminApiCall[] apiCalls, int roleId)
          Removes the array of AdminApiCall objects from the role identified by the roleId parameter.
 void removeCategoriesFromPromotion(java.lang.String sessionId, AdminCategory[] categories, int promotionId)
          Remove an array of categories from the promotion identified by the promotionId parameter.
 void removeConfigs(java.lang.String sessionId, java.lang.String[] configKeys)
          Remove one or more configuration parameters
 void removeCouponsFromPromotion(java.lang.String sessionId, AdminCoupon[] coupons, int promotionId)
          Remove an array of coupons from the promotion identified by the promotionId parameter.
 void removeCustomerGroupsFromPromotion(java.lang.String sessionId, int[] groupIds, int promotionId)
          Remove an array of customer groups from the promotion identified by the promotionId parameter.
 void removeCustomersFromPromotion(java.lang.String sessionId, AdminCustomer[] customers, int promotionId)
          Remove an array of customers from the promotion identified by the promotionId parameter.
 void removeExpressionsFromPromotion(java.lang.String sessionId, AdminExpression[] expressions, int promotionId)
          Remove an array of expressions from the promotion identified by the promotionId parameter.
 void removeGiftCertificatesFromPromotion(java.lang.String sessionId, AdminProduct[] giftCertificates, int promotionId)
          Remove an array of gift certificate products from the promotion identified by the promotionId parameter.
 void removeManufacturersFromPromotion(java.lang.String sessionId, AdminManufacturer[] manufacturers, int promotionId)
          Remove an array of manufacturers from the promotion identified by the promotionId parameter.
 void removePanelsFromRole(java.lang.String sessionId, AdminPanel[] panels, int roleId)
          Removes the array of AdminPanel objects from the role identified by the roleId parameter.
 void removeProdAttrDescsFromTemplate(java.lang.String sessionId, AdminProdAttrDesc[] attrDescs, int templateId)
          Remove an array of ProdAttrDesc objects from the template.
 void removeProductFromSearchEngine(java.lang.String sessionId, int productId)
          Remove the product referenced by productId from the search engine.
 void removeProductsFromPromotion(java.lang.String sessionId, AdminProduct[] products, int promotionId)
          Remove an array of products from the promotion identified by the promotionId parameter.
 void removeProductsToStores(java.lang.String sessionId, AdminProductToStore[] productToStores)
          Removes an array of AdminProductToStore objects
 void removePromotionsFromCoupon(java.lang.String sessionId, AdminPromotion[] promotions, int couponId)
          Remove an array of promotions from the coupon identified by the couponId parameter.
 void removeRelatedProducts(java.lang.String sessionId, int productId, int relationType)
          Removes related products from the product defined by productId.
 void removeRolesFromUser(java.lang.String sessionId, AdminRole[] roles, int userId)
          Removes the array of AdminRole objects from the user identified by the userId parameter.
 void removeTagGroupsFromCategory(java.lang.String sessionId, AdminTagGroup[] tagGroups, int categoryId)
          If associations exist between the AdminTagGroups and the category identified by categoryId, then they are removed.
 void removeTagsFromProduct(java.lang.String sessionId, AdminTag[] tags, int productId)
          If associations exist between the AdminTags and the product identified by productId, then they are removed.
 void resetCustomerPassword(java.lang.String sessionId, int custId)
          Reset a customer's password.
 void resetCustomerPasswordSpecifyingEmail(java.lang.String sessionId, int custId, java.lang.String eMailAddress)
          Reset a customer's password using the eMail address specified.
 void saveConfigs(java.lang.String sessionId, KKConfiguration[] configs, KKConfiguration[] origConfigs)
          Saves an array of KKConfiguration objects to the database.
 void saveFileContents(java.lang.String sessionId, java.lang.String fileName, java.lang.String fileContents)
          Writes the specified file contents into the specified file.
 AdminDigitalDownloadSearchResult searchDigitalDownloads(java.lang.String sessionId, AdminDigitalDownloadSearch search, int offset, int size)
          Retrieve the Digital Download records matching the search criteria
 AdminIpnHistories searchForIpnHistory(java.lang.String sessionId, AdminDataDescriptor dataDesc, AdminIpnSearch ipnSearch)
          Search for IpnHistory records with search criteria and order by criteria.
 AdminProducts searchForProducts(java.lang.String sessionId, AdminDataDescriptor dataDesc, AdminProductSearch prodSearch, int languageId)
          Search for products.
 AdminProducts searchForProductsWithOptions(java.lang.String sessionId, AdminDataDescriptor dataDesc, AdminProductSearch prodSearch, int languageId, AdminProductMgrOptions mgrOptions)
          Search for products.
 AdminKkMsgSearchResult searchMsg(AdminKkMsgSearch search, int groupSize, int offset)
          Retrieve all the messages from the database that match the specified search criteria
 boolean sendEmail(java.lang.String sessionId, AdminEmail adminEmailData)
          Send an email as defined in the specified AdminEmail object.
 void sendTemplateEmailToCustomers(java.lang.String sessionId, AdminCustomerSearch custSearch, java.lang.String templateName, java.lang.Object obj1, java.lang.Object obj2, java.lang.Object obj3, java.lang.Object obj4, java.lang.Object obj5, int numEmailThreads)
          An email is sent to the customers which are found based on the selection criteria set in the AdminCustomerSearch object.
 void sendTemplateEmailToCustomers1(java.lang.String sessionId, AdminCustomerSearch custSearch, java.lang.String templateName, java.lang.String message, AdminProduct[] products, AdminOrder[] orders, AdminManufacturer[] manufacturers, AdminCategory[] categories, int numEmailThreads)
          An email is sent to the customers which are found based on the selection criteria set in the AdminCustomerSearch object.
 void sendTemplateEmailToCustomers1WithOptions(java.lang.String sessionId, AdminCustomerSearch custSearch, java.lang.String templateName, java.lang.String message, AdminProduct[] products, AdminOrder[] orders, AdminManufacturer[] manufacturers, AdminCategory[] categories, int numEmailThreads, AdminEmailOptions options)
          This method has the same functionality as sendTemplateEmailToCustomers1() except that it includes an extra options object to enhance the available functionality.
 void sendTemplateEmailToCustomersWithOptions(java.lang.String sessionId, AdminCustomerSearch custSearch, java.lang.String templateName, java.lang.Object obj1, java.lang.Object obj2, java.lang.Object obj3, java.lang.Object obj4, java.lang.Object obj5, int numEmailThreads, AdminEmailOptions options)
          This method has the same functionality as sendTemplateEmailToCustomers() except that it includes an extra options object to enhance the available functionality.
 boolean setConfigurationValue(java.lang.String sessionId, java.lang.String key, java.lang.String value)
          Sets a Configuration Value for the specified key
 void setCreditCardDetailsOnOrder(java.lang.String sessionId, AdminCreditCard creditCard)
          Set Credit Card details on an existing order.
 void setCustomerPassword(java.lang.String sessionId, int custId, java.lang.String newPassword)
          Set a customer's password.
 void setEndpoint(java.lang.String wsEndpoint)
          Set the Web Service endpoint for the engine.
 void setProductAvailability(java.lang.String sessionId, java.lang.String sku, int id, java.util.Calendar dateAvailable)
          A method that allows you to modify the date when a product will be available, through the API without needing to fetch the complete product and edit it.
 void setProductAvailabilityWithOptions(java.lang.String sessionId, java.lang.String sku, int id, java.util.Calendar dateAvailable, AdminProductMgrOptions mgrOptions)
          A method that allows you to modify the date when a product will be available, through the API without needing to fetch the complete product and edit it.
 void setProductQuantity(java.lang.String sessionId, java.lang.String sku, int id, int quantity, int operation)
          A method that allows you to modify the quantity of a product through the API without needing to fetch the complete product and edit it.
 void setProductQuantityWithOptions(java.lang.String sessionId, java.lang.String sku, int id, int quantity, int operation, AdminProductMgrOptions mgrOptions)
          A method that allows you to modify the quantity of a product through the API without needing to fetch the complete product and edit it.
 AdminDBConnector testDB(AdminDBConnector connector)
          The connector parameter isn't currently used.
 void updateAddress(java.lang.String sessionId, AdminAddress address)
          Updates an AdminAddress.
 int updateAddressFormat(java.lang.String sessionId, AdminAddressFormat updateObj)
          Update an AdminAddressFormat object
 void updateBooking(java.lang.String sessionId, AdminBooking booking, AdminBookableProductOptions options)
          Update the booking
 void updateCachedConfigurations(java.lang.String sessionId)
          Wherever in the engine any configurations have been cached, they are refreshed when this method is called.
 void updateCatalog(java.lang.String sessionId, AdminCatalog catalog)
          Update an existing catalog
 void updateConfiguration(java.lang.String sessionId, KKConfiguration newConf)
          Updates a KKConfiguration object.
 void updateConfigurationGroup(java.lang.String sessionId, AdminConfigurationGroup newConf)
          Updates an AdminConfigurationGroup object.
 int updateCountry(java.lang.String sessionId, AdminCountry country)
          Update an AdminCountry object.
 int updateCurrency(java.lang.String sessionId, AdminCurrency curr)
          Update a Currency.
 void updateCustomer(java.lang.String sessionId, AdminCustomer customer)
          Update a Customer.
 int updateCustomerGroup(java.lang.String sessionId, AdminCustomerGroup custGroup)
          Update a customer group.
 int updateCustomerTag(java.lang.String sessionId, AdminCustomerTag tag)
          Update an AdminCustomerTag object.
 int updateExpression(java.lang.String sessionId, AdminExpression exp)
          Updates the expression.
 int updateExpressionVariable(java.lang.String sessionId, AdminExpressionVariable expVar)
          Updates the ExpressionVariable object passed in as a parameter.
 int updateGeoZone(java.lang.String sessionId, AdminGeoZone updateObj)
          Update an AdminGeoZone object.
 int updateLanguage(java.lang.String sessionId, AdminLanguage lang)
          Update a Language.
 void updateMallStore(java.lang.String sessionId, AdminStore store)
          Updates an AdminStore object.
 void updateMiscItems(java.lang.String sessionId, AdminMiscItem[] mItems)
          Update an array of AdminMiscItem objects.
 void updateMiscItemType(java.lang.String sessionId, AdminMiscItemType[] miTypes)
          Update an array of AdminMiscItemType objects.
 void updateMsg(java.lang.String sessionId, java.lang.String key, int type, java.lang.String locale, java.lang.String value)
          Update a Message in the database.
 void updateOrder(java.lang.String sessionId, int orderId, int orderStatus, java.lang.String comments, boolean notifyCustomer, AdminOrderUpdate updateOrder)
          Update the order status with optional comments.
 void updateOrderStatus(java.lang.String sessionId, int orderId, int orderStatus, java.lang.String comments, boolean notifyCustomer)
          Deprecated. 
 int updateOrderStatusName(java.lang.String sessionId, AdminOrderStatusName obj)
          Update an OrderStatusName object
 int updatePaymentSchedule(java.lang.String sessionId, AdminPaymentSchedule ps)
          Update an AdminPaymentSchedule object.
 int updateProdAttrDesc(java.lang.String sessionId, AdminProdAttrDesc attrDesc)
          Update an AdminProdAttrDesc object.
 int updateProdAttrTemplate(java.lang.String sessionId, AdminProdAttrTemplate template)
          Update an AdminProdAttrTemplate object.
 int updateProductsUsingProdAttrDesc(java.lang.String sessionId, int attrDescId)
          When custom attributes are converted to an XML string and saved within the product object, some metadata fields of the custom attribute are saved along with the value of the attribute itself.
 int updateProductsUsingTemplates(java.lang.String sessionId, int[] templateIds)
          When custom attributes are converted to an XML string and saved within the product object, some metadata fields of the custom attribute are saved along with the value of the attribute itself.
 int updateSubscription(java.lang.String sessionId, AdminSubscription subscription)
          Update an AdminSubscription object.
 int updateSubZone(java.lang.String sessionId, AdminSubZone updateObj)
          Update an AdminSubZone object.
 int updateTag(java.lang.String sessionId, AdminTag tag)
          Update an existing Tag object - only the Name and the SortOrder can be updated
 int updateTagGroup(java.lang.String sessionId, AdminTagGroup tagGroup)
          Update an existing TagGroup object - You can update the name, description and the set of tags associated to the tag group
 int updateTaxClass(java.lang.String sessionId, AdminTaxClass updateObj)
          Update an AdminTaxClass object
 int updateTaxRate(java.lang.String sessionId, AdminTaxRate updateObj)
          Update an AdminTaxRate object
 int updateZone(java.lang.String sessionId, AdminZone updateObj)
          Update an AdminZone object
 
Methods inherited from class com.konakartadmin.bl.KKAdminBase
auditDeletes, auditDeletes, auditDeletes, auditDeletesForArray, auditEdits, auditEdits, auditEdits, auditInserts, auditInserts, auditInserts, auditInserts, auditReads, auditReads, checkEnterpriseForExtPriceOrExtQuantity, checkManagerExists, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCategoryMgr, getAdminConfigurationMgr, getAdminCurrencyMgr, getAdminCustomerMgr, getAdminCustomerTagMgr, getAdminDataIntegrityMgr, getAdminEmailMgr, getAdminEng, getAdminExecuteMgr, getAdminFileMgr, getAdminHtmlMgr, getAdminLanguageMgr, getAdminManufacturerMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProductMgr, getAdminPromotionMgr, getAdminPublishProductMgr, getAdminRemoteAccessMgr, getAdminReportMgr, getAdminReviewMgr, getAdminRewardPointMgr, getAdminSearchRuleMgr, getAdminSecurityMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminWishListMgr, getConfigFile, getDbVersion, getEngConf, getEngineId, getExceptionMessage, getKkInstanceId, getKonakartAdminPropsFileName, getKonakartAdminPropsFilePath, getKonaKartBuildDate, getKonakartPropertyValue, getKonakartTimeStamp, getKonakartTimeStampDate, getKonaKartVersion, getLogMgr, getModulesMgr, init, initKonakart, initLog4j, initMultiStoreMultiDB, initMultiStoreSingleDB, initSingleStore, initTorque, isSingleStoreMode, isTorqueInit, manageThrowable, setAdminEng, setEngConf, setKonakartAdminPropsFileName, setKonakartAdminPropsFilePath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.konakartadmin.appif.KKAdminIf
getEngConf, getKonakartAdminPropsFilePath
 

Field Detail

DEFAULT_KONAKARTADMIN_PROPERTIES_FILE_NAME

public static final java.lang.String DEFAULT_KONAKARTADMIN_PROPERTIES_FILE_NAME
Default KonaKart Admin properties file name

See Also:
Constant Field Values
Constructor Detail

KKAdmin

public KKAdmin(AdminEngineConfig engConf)
        throws KKAdminException
Constructor with an EngineConfig object.

Parameters:
engConf -
Throws:
KKAdminException

KKAdmin

@Deprecated
public KKAdmin()
        throws KKAdminException
Deprecated. From version 2.2.7.0, you should use the constructor that receives an AdminEngineConfig object

Constructor with no specified properties file. It searches for one called konakartadmin.properties.

Throws:
KKAdminException

KKAdmin

@Deprecated
public KKAdmin(java.lang.String propertiesFileName)
        throws KKAdminException
Deprecated. From version 2.2.7.0, you should use the constructor that receives an AdminEngineConfig object

The input parameter must contain the file name of the properties file. It must be placed on the classpath.

Parameters:
propertiesFileName - name of the properties file that will be found on the classpath
Throws:
KKAdminException
Method Detail

getDefaultAdminEngConfig

protected AdminEngineConfig getDefaultAdminEngConfig()
Returns:
a default AdminEngConfig object

checkStoreStatus

protected void checkStoreStatus(java.lang.String sessId)
                         throws java.lang.Exception
Check that the store should continue to execute API functions. If we're in multi-store single-db mode and the store has been deleted, is Under Maintenance or is disabled, we throw an exception unless the user has a super-user role.

Parameters:
sessId - the sessionId of the user making the API call
Throws:
java.lang.Exception

checkStoreStatus

protected void checkStoreStatus(int customerId)
                         throws KKAdminException
Check that the store should continue to execute API functions. If we're in multi-store single-db mode and the store has been deleted, is Under Maintenance or is disabled, we throw an exception unless the user has a super-user role.

Parameters:
customerId - the customerId of the user making the API call
Throws:
KKAdminException

testDB

public AdminDBConnector testDB(AdminDBConnector connector)
                        throws KKAdminException
Description copied from interface: KKAdminIf
The connector parameter isn't currently used. An attempt is made to connect to the DB using the DB connection parameters configured in the properties file. A partially filled AdminDBConnector object is returned. If the connection is successful then the connected parameter of the return object is set to true. Otherwise it is set to false.

Specified by:
testDB in interface KKAdminIf
Returns:
An AdminDBConnector object with details about the DB connection
Throws:
KKAdminException

logMsg

public void logMsg(int level,
                   java.lang.String message)
            throws KKAdminException
Description copied from interface: KKAdminIf
For debugging the client - it writes out the String that's sent if we are logging at the specified level or above

Specified by:
logMsg in interface KKAdminIf
Parameters:
level - the logging level (0=OFF,1=SEVERE,2=ERROR,4=WARNING,6=INFO,8=DEBUG)
message - the message to log
Throws:
KKAdminException

getDefaultLanguage

public AdminLanguage getDefaultLanguage()
                                 throws KKAdminException
Description copied from interface: KKAdminIf
Returns the default language. The default language is defined by the DEFAULT_LANGUAGE configuration variable.

Specified by:
getDefaultLanguage in interface KKAdminIf
Returns:
the default language
Throws:
KKAdminException

getLanguageByCode

public AdminLanguage getLanguageByCode(java.lang.String code)
                                throws KKAdminException
Description copied from interface: KKAdminIf
Returns the language referenced by the two letter lower case code (e.g. es, de, en)

Specified by:
getLanguageByCode in interface KKAdminIf
Parameters:
code - the language code
Returns:
the language by language code
Throws:
KKAdminException

getLanguageById

public AdminLanguage getLanguageById(int id)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Returns the language referenced by language ID. If the language is KKConstants.NOT_SET then the default language is returned.

Specified by:
getLanguageById in interface KKAdminIf
Parameters:
id - the language id
Returns:
the language by language id
Throws:
KKAdminException

getLanguageIdForLocale

public int getLanguageIdForLocale(java.lang.String locale)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Retrieves the language Id for the locale

Specified by:
getLanguageIdForLocale in interface KKAdminIf
Parameters:
locale - a 2 or 4 character locale (eg. en, de, es)
Returns:
Returns the languageId of the matching language or the languageId of the default language if no matching language was found.
Throws:
KKAdminException

getLanguageForLocale

public AdminLanguage getLanguageForLocale(java.lang.String locale)
                                   throws KKAdminException
Description copied from interface: KKAdminIf
Retrieves the language for the locale

Specified by:
getLanguageForLocale in interface KKAdminIf
Parameters:
locale - a 2 or 4 character locale (eg. en, de, es)
Returns:
Returns the language of the matching language or the default language if no matching language was found.
Throws:
KKAdminException

getAllLanguages

public AdminLanguage[] getAllLanguages()
                                throws KKAdminException
Description copied from interface: KKAdminIf
Get all of the languages in the database. Does not return the display-only languages.

Specified by:
getAllLanguages in interface KKAdminIf
Returns:
Returns all of the languages
Throws:
KKAdminException

getLanguages

public AdminLanguageSearchResult getLanguages(AdminLanguageSearch search)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminLanguageSearchResult object. It allows you to search criteria for code and name and also to define whether or not you want to retrieve the display-only languages in addition to the data languages by setting the includeDisplayOnlyLangs attribute of the AdmnLanguageSearch object to true. The default behaviour is not to return the display-only languages.

Specified by:
getLanguages in interface KKAdminIf
Parameters:
search - the search object that defines the search parameters and sort order
Returns:
Returns an AdminLanguageSearchResult
Throws:
KKAdminException

getAllAddressFormats

public AdminAddressFormat[] getAllAddressFormats()
                                          throws KKAdminException
Description copied from interface: KKAdminIf
This returns an array of all the address formats

Specified by:
getAllAddressFormats in interface KKAdminIf
Returns:
Returns an array of all the address formats
Throws:
KKAdminException

getDefaultCurrency

public AdminCurrency getDefaultCurrency()
                                 throws KKAdminException
Description copied from interface: KKAdminIf
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 KKAdminIf
Returns:
Returns a currency object
Throws:
KKAdminException

getCurrency

public AdminCurrency getCurrency(java.lang.String currencyCode)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Return the currency object for the specified currency code.

Specified by:
getCurrency in interface KKAdminIf
Parameters:
currencyCode - the currency Code to look up
Returns:
Returns a currency object
Throws:
KKAdminException

getCurrencies

public AdminCurrencySearchResult getCurrencies(AdminCurrencySearch search)
                                        throws KKAdminException
Description copied from interface: KKAdminIf
Returns an AdminCurrencySearchResult object.

Specified by:
getCurrencies in interface KKAdminIf
Parameters:
search - the search object that defines the search parameters and sort order
Returns:
Returns an AdminLanguageSearchResult
Throws:
KKAdminException

getOrderStatusNames

public AdminOrderStatusNameSearchResult getOrderStatusNames(AdminOrderStatusNameSearch search)
                                                     throws KKAdminException
Description copied from interface: KKAdminIf
Returns an AdminOrderStatusNameSearchResult object.

Specified by:
getOrderStatusNames in interface KKAdminIf
Parameters:
search - the search object that defines the search parameters and sort order. If languageId is not set (or set to AdminLanguageMgr.DEFAULT_LANG) the default language is used. If the languageId is set to AdminLanguageMgr.ALL_LANGUAGES all languages are returned.
Returns:
Returns an AdminOrderStatusNameSearchResult
Throws:
KKAdminException

getCustomerGroups

public AdminCustomerGroupSearchResult getCustomerGroups(AdminCustomerGroupSearch search)
                                                 throws KKAdminException
Description copied from interface: KKAdminIf
Return AdminCustomerGroups matching search criteria.

Specified by:
getCustomerGroups in interface KKAdminIf
Parameters:
search - An AdminCustomerGroupSearch object containing the search criteria
Returns:
Returns an AdminCustomerGroupSearchResult object
Throws:
KKAdminException

getCountries

public AdminCountrySearchResult getCountries(AdminCountrySearch search,
                                             int offset,
                                             int count)
                                      throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminCountrySearchResult object.

Specified by:
getCountries in interface KKAdminIf
Parameters:
search - an AdminCountrySearch object
offset - the offset in the database
count - the number of records from the specified offset
Returns:
Returns an AdminCountrySearchResult object
Throws:
KKAdminException

getAllOrderStatuses

public AdminOrderStatusName[] getAllOrderStatuses(int languageId)
                                           throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of AdminOrderStatusNames for the specified languageId. Use AdminLanguageMgr.ALL_LANGUAGES to retrieve the Order Status Names for All languages.

Specified by:
getAllOrderStatuses in interface KKAdminIf
Returns:
an array of AdminOrderStatusNames for the specified languageId.
Throws:
KKAdminException

getAllCountriesFull

public AdminCountry[] getAllCountriesFull()
                                   throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of all Country objects in the database. The objects are fully-populated.

Specified by:
getAllCountriesFull in interface KKAdminIf
Returns:
Returns an array of Countries - fully-populated
Throws:
KKAdminException

getAllTaxClassesFull

public AdminTaxClass[] getAllTaxClassesFull()
                                     throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of all AdminTaxClass objects in the database. The objects are fully-populated.

Specified by:
getAllTaxClassesFull in interface KKAdminIf
Returns:
Returns an array of AdminTaxClass objects - fully-populated
Throws:
KKAdminException

getTaxRates

public AdminTaxRateSearchResult getTaxRates(AdminTaxRateSearch search,
                                            int offset,
                                            int size)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminTaxRateSearchResult object.

Specified by:
getTaxRates in interface KKAdminIf
Parameters:
search - the definition of the search - can be null
offset - the offset in the database
size - the number of records from the specified offset
Returns:
Returns an AdminTaxRateSearchResult object
Throws:
KKAdminException

getAllTaxRates

public AdminTaxRateSearchResult getAllTaxRates()
                                        throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminTaxRateSearchResult object.

Specified by:
getAllTaxRates in interface KKAdminIf
Returns:
Returns an AdminTaxRateSearchResult object
Throws:
KKAdminException

getZones

public AdminZoneSearchResult getZones(AdminZoneSearch search,
                                      int offset,
                                      int size)
                               throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminZoneSearchResult object.

Specified by:
getZones in interface KKAdminIf
Parameters:
search - the definition of the search - can be null
offset - the offset in the database
size - the number of records from the specified offset
Returns:
Returns an AdminZoneSearchResult object
Throws:
KKAdminException

getTaxClasses

public AdminTaxClassSearchResult getTaxClasses(AdminTaxClassSearch search)
                                        throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminTaxClassSearchResult object.

Specified by:
getTaxClasses in interface KKAdminIf
Parameters:
search - the definition of the search - can be null
Returns:
Returns an AdminTaxClassSearchResult object
Throws:
KKAdminException

getAddressFormats

public AdminAddressFormatSearchResult getAddressFormats(AdminAddressFormatSearch search)
                                                 throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminAddressFormatSearchResult object.

Specified by:
getAddressFormats in interface KKAdminIf
Parameters:
search - the definition of the search - can be null
Returns:
Returns an AdminAddressFormatSearchResult object
Throws:
KKAdminException

getZonesById

public AdminZone[] getZonesById(int countryId)
                         throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of fully-populated AdminZones for the specified countryId.

Specified by:
getZonesById in interface KKAdminIf
Parameters:
countryId - the countryId
Returns:
Returns an array of AdminZones for the specified countryId - fully-populated
Throws:
KKAdminException

getAllGeoZones

public AdminGeoZone[] getAllGeoZones()
                              throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of all GeoZones in the database.

Specified by:
getAllGeoZones in interface KKAdminIf
Returns:
Returns an array of all GeoZones - fully-populated
Throws:
KKAdminException

getGeoZones

public AdminGeoZoneSearchResult getGeoZones(AdminGeoZoneSearch search,
                                            int offset,
                                            int size)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminGeoZoneSearchResult object.

Specified by:
getGeoZones in interface KKAdminIf
Parameters:
search - the definition of the search - can be null
offset - the offset in the database
size - the number of records from the specified offset
Returns:
Returns an AdminGeoZoneSearchResult object
Throws:
KKAdminException

getSubZones

public AdminSubZoneSearchResult getSubZones(AdminSubZoneSearch search,
                                            int offset,
                                            int size)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminSubZoneSearchResult object.

Specified by:
getSubZones in interface KKAdminIf
Parameters:
search - the definition of the search - can be null
offset - the offset in the database
size - the number of records from the specified offset
Returns:
Returns an AdminZoneSearchResult object
Throws:
KKAdminException

getCategory

public AdminCategory getCategory(int categoryId,
                                 boolean getChildren,
                                 int languageId)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Returns either a single category object or a tree of category objects if getChildren is set to true. The top level category has a populated description array whereas the children do not. They use the languageId to determine which language to use.

Specified by:
getCategory in interface KKAdminIf
Parameters:
categoryId - The numeric id of the category
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
Returns an AdminCategory object
Throws:
KKAdminException

getCategoryTree

public AdminCategory[] getCategoryTree(int languageId,
                                       boolean getNumProducts)
                                throws KKAdminException
Description copied from interface: KKAdminIf
Returns the complete category tree. If getNumProducts is set to true, then each category has a number defining how many products it contains.

Specified by:
getCategoryTree in interface KKAdminIf
Parameters:
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
Returns an array of AdminCategory objects
Throws:
KKAdminException

getTopLevelCategories

public AdminCategory[] getTopLevelCategories(int languageId,
                                             AdminDataDescriptor dataDesc)
                                      throws KKAdminException
Description copied from interface: KKAdminIf
Returns all of the top level categories which are those that have a parentId = 0. An AdminDataDescriptor object may be supplied in order to add constraints and control the number of categories returned.

Specified by:
getTopLevelCategories in interface KKAdminIf
Parameters:
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
dataDesc - Used to control the data offset, limit the number of categories returned and to set constraints on the custom fields. May be set to null;
Returns:
Array of Category Objects
Throws:
KKAdminException

getAllManufacturers

public AdminManufacturer[] getAllManufacturers()
                                        throws KKAdminException
Description copied from interface: KKAdminIf
Get all manufacturers ordered by name.

Specified by:
getAllManufacturers in interface KKAdminIf
Returns:
Return an array of all manufacturers
Throws:
KKAdminException

getManufacturer

public AdminManufacturer getManufacturer(int manufacturerId)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Get a fully populated manufacturer

Specified by:
getManufacturer in interface KKAdminIf
Parameters:
manufacturerId - The numeric id of the manufacturer
Returns:
Return a fully populated manufacturer
Throws:
KKAdminException

getAllProductOptions

public AdminProductOption[] getAllProductOptions(int languageId)
                                          throws KKAdminException
Description copied from interface: KKAdminIf
Return all product options in the database for any given language.

Specified by:
getAllProductOptions in interface KKAdminIf
Parameters:
languageId - specifies that the product options should be returned for this language. Can specify com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to specify the default language, or specify com.konakartadmin.bl.AdminLanguageMgr.ALL_LANGUAGES to specify all languages
Returns:
An array of all product options, each containing an array of product values
Throws:
KKAdminException

getProductOptionValuesPerOption

public AdminProductOptionValue[] getProductOptionValuesPerOption(int productOptionId,
                                                                 int languageId)
                                                          throws KKAdminException
Description copied from interface: KKAdminIf
Return an array of product option value objects for a product option object

Specified by:
getProductOptionValuesPerOption in interface KKAdminIf
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language or specify com.konakartadmin.bl.AdminLanguageMgr.ALL_LANGUAGES to specify all languages
Returns:
Return an array of productOptionValue objects
Throws:
KKAdminException

getStores

public AdminStore[] getStores()
                       throws KKAdminException
Description copied from interface: KKAdminIf
Get the stores supported by the server.

Specified by:
getStores in interface KKAdminIf
Returns:
an array of AdminStore objects
Throws:
KKAdminException

login

public java.lang.String login(java.lang.String user,
                              java.lang.String password)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Used to log into the Admin application and get a session Id.

Specified by:
login in interface KKAdminIf
Parameters:
user - Admin username
password - Admin password
Returns:
SessionId if successful which is used on subsequent calls to the Admin interface, otherwise null
Throws:
KKAdminException

logout

public void logout(java.lang.String sessionId)
            throws KKAdminException
Description copied from interface: KKAdminIf
Used to logout the user with the specified sessionId.

Specified by:
logout in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Throws:
KKAdminException

setEndpoint

public void setEndpoint(java.lang.String wsEndpoint)
                 throws KKAdminException
Description copied from interface: KKAdminIf
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 KKAdminIf
Parameters:
wsEndpoint - A String representing the web service endpoint
Throws:
KKAdminException

getMsgs

public AdminMessageSet getMsgs(java.lang.String languageCode)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Return a set of admin application messages for the specified language. This is used to facilitate internationalization of the KonaKart Admin application - but it could also be used to internationalize any application via the KonaKart Admin API.

For file-based messages (where the configuration parameter USE_DB_FOR_MESSAGES = false) the messages are retrieved from a message properties file on the classpath that best-matches the specified language parameter. The name of the file starts with 'AdminMessages' and may have a language code or locale specification appended to it, and '.properties' added to the end. An example of such a file would be AdminMessages_de.properties. It first tries to find a file that matches the language_code exactly (this could be a full locale description such as 'de_DE' or 'pt_BR') and if no such file is found it tries to find one that matches just the first two characters (in this case 'de' and 'pt' respectively). When the specified language code is 'en' a file without any language or locale specification is used instead.

For database-based messages the language code specified must be the locale specified in the database. By default these will be the full locale names (eg. en_GB, de_DE, pt_BR etc). file for the locale or language code.

Specified by:
getMsgs in interface KKAdminIf
Parameters:
languageCode - See above... Either specify the full language locale or the 2-character language code. If null, the language code of the default language will be used.
Returns:
An AdminMessageSet - an object containing all the messages for the chosen language
Throws:
KKAdminException

getHelpMsg

public java.lang.String getHelpMsg(java.lang.String msgKey,
                                   java.lang.String languageCode)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Return the help message for the specified language and the specified key.

For file-based messages (where the configuration parameter USE_DB_FOR_MESSAGES = false) the message is retrieved from a message properties file on the classpath that best-matches the specified language parameter. The name of the file starts with 'AdminHelpMessages' and may have a language code or locale specification appended to it, and '.properties' added to the end. An example of such a file would be AdminHelpMessages_de.properties. It first tries to find a file that matches the language_code exactly (this could be a full locale description such as 'de_DE' or 'pt_BR') and if no such file is found it tries to find one that matches just the first two characters (in this case 'de' and 'pt' respectively). When the specified language code is 'en' a file without any language or locale specification is used instead.

For database-based messages the language code specified must be the locale specified in the database. By default these will be the full locale names (eg. en_GB, de_DE, pt_BR etc). file for the locale or language code.

For properties in the 'AdminHelpMessages' properties files that contain substitution definitions, this call will translate these into their substituted values.

Specified by:
getHelpMsg in interface KKAdminIf
Parameters:
msgKey - the key of the help message in the properties file. If null, a null help message is returned.
languageCode - the language code (if null it uses the current default language)
Returns:
the help message for the specified message key and in the specified language. If no message is found for the specified non-null key, a message is returned identifying the missing key to assist in debugging the translation process.
Throws:
KKAdminException

getCustomValidatorSet

public AdminCustomValidatorSet getCustomValidatorSet()
                                              throws KKAdminException
Description copied from interface: KKAdminIf
Gets an AdminCustomValidatorSet. If the property file value does not allow use of the cache the custom validation properties file is re-read every time this is called (useful in development). Otherwise the custom validation properties file is read just once the first time this is called.

Specified by:
getCustomValidatorSet in interface KKAdminIf
Returns:
an AdminCustomValidatorSet object
Throws:
KKAdminException

getSearchRules

public AdminSearchRule[] getSearchRules()
                                 throws KKAdminException
Description copied from interface: KKAdminIf
Reads the search rules from a properties file and returns them as an array. If the properties file isn't found, then an empty array is returned.

Specified by:
getSearchRules in interface KKAdminIf
Returns:
Returns an array of Search Rule Objects
Throws:
KKAdminException

checkSession

public int checkSession(java.lang.String sessionId)
                 throws KKAdminException
Description copied from interface: KKAdminIf
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 and the customer id is returned. An exception is thrown if the session is invalid.

Specified by:
checkSession in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Returns:
Customer Id if successful
Throws:
KKAdminException - Thrown if the session is invalid

setConfigurationValue

public boolean setConfigurationValue(java.lang.String sessionId,
                                     java.lang.String key,
                                     java.lang.String value)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Sets a Configuration Value for the specified key

Specified by:
setConfigurationValue in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
key - key whose value will be set
value - value to set
Returns:
returns true if the value is set correctly, false if the key wasn't found
Throws:
KKAdminException

deleteCurrency

public int deleteCurrency(java.lang.String sessionId,
                          int currId)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Currency.

Specified by:
deleteCurrency in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
currId - A currency id
Returns:
returns the id of the deleted currency
Throws:
KKAdminException

insertCurrency

public int insertCurrency(java.lang.String sessionId,
                          AdminCurrency curr)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Insert a Currency.

Specified by:
insertCurrency in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
curr - A currency object
Returns:
returns the id of the inserted currency
Throws:
KKAdminException

updateCurrency

public int updateCurrency(java.lang.String sessionId,
                          AdminCurrency curr)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Update a Currency.

Specified by:
updateCurrency in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
curr - A currency object
Returns:
returns the id of the updated currency
Throws:
KKAdminException

deleteOrderStatusName

public int deleteOrderStatusName(java.lang.String sessionId,
                                 int id)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Delete an OrderStatusName object.

Specified by:
deleteOrderStatusName in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
id - An OrderStatus id
Returns:
returns the id of the deleted OrderStatusName object
Throws:
KKAdminException

insertOrderStatusName

public int insertOrderStatusName(java.lang.String sessionId,
                                 AdminOrderStatusName obj)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Insert an OrderStatusName object.

Specified by:
insertOrderStatusName in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
obj - An OrderStatusName object
Returns:
returns the id of the inserted object
Throws:
KKAdminException

insertOrderStatusNames

public int insertOrderStatusNames(java.lang.String sessionId,
                                  AdminOrderStatusName[] ordStats)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Insert an array of AdminOrderStatusName objects. We use the same id for all of the items in the array.

Specified by:
insertOrderStatusNames in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
ordStats - An AdminOrderStatusName array object
Returns:
returns the id of the last inserted AdminOrderStatusName objects
Throws:
KKAdminException

updateOrderStatusName

public int updateOrderStatusName(java.lang.String sessionId,
                                 AdminOrderStatusName obj)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Update an OrderStatusName object

Specified by:
updateOrderStatusName in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
obj - An OrderStatusName object
Returns:
returns the id of the updated object
Throws:
KKAdminException

deleteCountry

public int deleteCountry(java.lang.String sessionId,
                         int id)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Country.

Specified by:
deleteCountry in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
id - A Country id
Returns:
returns the id of the deleted Country
Throws:
KKAdminException

insertCountry

public int insertCountry(java.lang.String sessionId,
                         AdminCountry country)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Insert an AdminCountry object.

Specified by:
insertCountry in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
country - An AdminCountry object
Returns:
returns the id of the inserted AdminCountry object
Throws:
KKAdminException

updateCountry

public int updateCountry(java.lang.String sessionId,
                         AdminCountry country)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminCountry object.

Specified by:
updateCountry in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
country - An AdminCountry object
Returns:
returns the id of the updated AdminCountry object
Throws:
KKAdminException

deleteLanguage

public int deleteLanguage(java.lang.String sessionId,
                          int langId)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Language.

Specified by:
deleteLanguage in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
langId - A Language id
Returns:
returns the id of the deleted Language
Throws:
KKAdminException

insertLanguage

public int insertLanguage(java.lang.String sessionId,
                          AdminLanguage lang)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Insert a Language.

Specified by:
insertLanguage in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
lang - A Language object
Returns:
returns the id of the inserted Language
Throws:
KKAdminException

insertCustomerGroup

public int insertCustomerGroup(java.lang.String sessionId,
                               AdminCustomerGroup custGroup)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Insert a Customer Group. If the id of the Customer Group object is set to a negative number then it is calculated by the insert method. Otherwise an insert is attempted with the value passed into the method so you must ensure that the id / language combination is unique.

Specified by:
insertCustomerGroup in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
custGroup - A Customer Group object
Returns:
returns the id of the inserted Customer Group
Throws:
KKAdminException

insertCustomerGroups

public int insertCustomerGroups(java.lang.String sessionId,
                                AdminCustomerGroup[] custGroups)
                         throws KKAdminException
Description copied from interface: KKAdminIf
Insert an array of AdminCustomerGroup objects. We calculate and use the same id for all of the items in the array so you must ensure that each item has a unique language id, otherwise the DB will throw an exception. The id's of the AdminCustomerGroups are ignored.

Specified by:
insertCustomerGroups in interface KKAdminIf
custGroups - An array of AdminCustomerGroup objects
Returns:
returns the id of the inserted objects
Throws:
KKAdminException

updateLanguage

public int updateLanguage(java.lang.String sessionId,
                          AdminLanguage lang)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Update a Language.

Specified by:
updateLanguage in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
lang - A Language object
Returns:
returns the id of the updated Language
Throws:
KKAdminException

sendEmail

public boolean sendEmail(java.lang.String sessionId,
                         AdminEmail adminEmailData)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Send an email as defined in the specified AdminEmail object.

Specified by:
sendEmail in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
adminEmailData - the Email object to fill out to define the email to send
Returns:
true if the email is sent successfully, and exception is raised in other cases
Throws:
KKAdminException - typically when the email could not be sent

getOrdersCount

public int getOrdersCount(java.lang.String sessionId,
                          int orderStatus)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Returns a count of the Orders with the specified status.

Specified by:
getOrdersCount in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
orderStatus - the order status Id
Returns:
the count of the number of orders with the specified status.
Throws:
KKAdminException

getOrdersLite

public AdminOrderSearchResult getOrdersLite(java.lang.String sessionId,
                                            AdminOrderSearch search,
                                            int offset,
                                            int size,
                                            int languageId)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
Returns a set of Orders matching the specified search criteria.

The orders returned are sparsely-populated with:

The returned orders may be sorted by:

Specified by:
getOrdersLite in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
search - the Orders search criteria object (String sessionId, can be null)
offset - offset in the database
size - max number of records to return from the offset
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
A set of Orders that match the specified search criteria within an AdminOrderSearchResult object
Throws:
KKAdminException

getOrders

public AdminOrderSearchResult getOrders(java.lang.String sessionId,
                                        AdminOrderSearch search,
                                        int offset,
                                        int size,
                                        int languageId)
                                 throws KKAdminException
Description copied from interface: KKAdminIf
Returns a set of Orders that match the search criteria.

The returned orders may be sorted by:

Specified by:
getOrders in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
search - the definition of the search for orders - can be null
offset - the offset in the database
size - the number of records from the specified offset
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
a set of orders matching the search criteria within an AdminOrderSearchResult object
Throws:
KKAdminException

getOrderForOrderId

public AdminOrder getOrderForOrderId(java.lang.String sessionId,
                                     int orderId)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Retrieve an order for an orderId, using the default language

Specified by:
getOrderForOrderId in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
orderId - The numeric id of the AdminOrder object
Returns:
Returns an AdminOrder object
Throws:
KKAdminException

getOrderForOrderIdAndLangId

public AdminOrder getOrderForOrderIdAndLangId(java.lang.String sessionId,
                                              int orderId,
                                              int languageId)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
Returns an order for an orderId and a languageId. If the languageId is set to -1 then the default language is used.

Specified by:
getOrderForOrderIdAndLangId in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
orderId - The numeric id of the AdminOrder object
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
Returns an AdminOrder object
Throws:
KKAdminException

getOrdersCreatedSince

@Deprecated
public AdminOrder[] getOrdersCreatedSince(java.lang.String sessionId,
                                                     java.util.Calendar since,
                                                     int languageId)
                                   throws KKAdminException
Deprecated. 

Description copied from interface: KKAdminIf
Returns a set of Orders created since the specified date.

Specified by:
getOrdersCreatedSince in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
since - the date to use to define the range of orders to return
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
a set of orders placed since the specified date. If there are no orders then an empty array is returned
Throws:
KKAdminException

updateOrder

public void updateOrder(java.lang.String sessionId,
                        int orderId,
                        int orderStatus,
                        java.lang.String comments,
                        boolean notifyCustomer,
                        AdminOrderUpdate updateOrder)
                 throws KKAdminException
Description copied from interface: KKAdminIf
Update the order status with optional comments. If the locale attribute of the order is not null, it will be used to read the email template in the customer's preferred language. Otherwise the default language will be used.

Specified by:
updateOrder in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
orderId - the order id
orderStatus - the new Order Status
comments - if not null, these comments are added
notifyCustomer - if true the customer will be notified by email
updateOrder - contains order update data such as who updated the order
Throws:
KKAdminException

updateOrderStatus

@Deprecated
public void updateOrderStatus(java.lang.String sessionId,
                                         int orderId,
                                         int orderStatus,
                                         java.lang.String comments,
                                         boolean notifyCustomer)
                       throws KKAdminException
Deprecated. 

Description copied from interface: KKAdminIf
Update the order status with optional comments. If the locale attribute of the order is not null, it will be used to read the email template in the customer's preferred language. Otherwise the default language will be used.

Specified by:
updateOrderStatus in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
orderId - the order id
orderStatus - the new Order Status
comments - if not null, these comments are added
notifyCustomer - if true the customer will be notified by email
Throws:
KKAdminException

getHtml

public java.lang.String getHtml(java.lang.String sessionId,
                                int htmlType,
                                int id,
                                int languageId,
                                java.lang.String arg1)
                         throws KKAdminException
Description copied from interface: KKAdminIf
Retrieve the HTML string for the specified HTML type, in the specified language. Typically used to get a section of formatted HTML that can be inserted into a page of some kind.

"HTML types" can be one of:

Specified by:
getHtml in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
htmlType - the HTML type eg. KonakartAdminConstants.HTML_ORDER_DETAIL
id - a record Id the use is dependent on the htmlType
languageId - the languageId for the language that the HTML should be in
arg1 - an argument whose use is dependent on the htmlType
Returns:
a String of HTML
Throws:
KKAdminException

getPdf

public com.konakart.app.PdfResult getPdf(java.lang.String sessionId,
                                         com.konakart.app.PdfOptions options)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Create the PDF document and return the URL, File name or bytes as defined by the input options.

Specified by:
getPdf in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
options - the options that define the PDF report to be produced and what is returned from this interface.
Returns:
a PdfResult object containing information that is defined in the options specified on input.
Throws:
KKAdminException

getCustomersCount

public int getCustomersCount(java.lang.String sessionId,
                             AdminCustomerSearch search)
                      throws KKAdminException
Description copied from interface: KKAdminIf
Returns a count of the number of Customers matching the specified search.

Specified by:
getCustomersCount in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
search - the definition of the search for customers - can be null
Returns:
A count of the number of Customers
Throws:
KKAdminException

getCustomersCountWhoHaventPlacedAnOrderSince

public int getCustomersCountWhoHaventPlacedAnOrderSince(java.lang.String sessionId,
                                                        java.util.Calendar lastOrderDate)
                                                 throws KKAdminException
Description copied from interface: KKAdminIf
Return the count of the number of customers who haven't placed an order since the lastOrderDate passed in as a parameter.

Specified by:
getCustomersCountWhoHaventPlacedAnOrderSince in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
lastOrderDate - The date when the last order was placed
Returns:
The customer count
Throws:
KKAdminException

getCustomersCountWhoHavePlacedAnOrderSince

public int getCustomersCountWhoHavePlacedAnOrderSince(java.lang.String sessionId,
                                                      java.util.Calendar lastOrderDate)
                                               throws KKAdminException
Description copied from interface: KKAdminIf
Return the count of the number of customers who have placed an order since the lastOrderDate passed in as a parameter.

Specified by:
getCustomersCountWhoHavePlacedAnOrderSince in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
lastOrderDate - The date when the last order was placed
Returns:
The customer count
Throws:
KKAdminException

updateCustomer

public void updateCustomer(java.lang.String sessionId,
                           AdminCustomer customer)
                    throws KKAdminException
Description copied from interface: KKAdminIf
Update a Customer.

Specified by:
updateCustomer in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
customer - A customer
Throws:
KKAdminException

updateCustomerGroup

public int updateCustomerGroup(java.lang.String sessionId,
                               AdminCustomerGroup custGroup)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Update a customer group. Note that the id and the languageId cannot be modified since they are key values.

Specified by:
updateCustomerGroup in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
custGroup - A customer group object
Returns:
Returns the id of the customer group
Throws:
KKAdminException

deleteCustomer

public int deleteCustomer(java.lang.String sessionId,
                          int custId)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Customer.

Specified by:
deleteCustomer in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
custId - A customer id
Returns:
returns the id of the deleted customer
Throws:
KKAdminException

deleteCustomerGroup

public int deleteCustomerGroup(java.lang.String sessionId,
                               int custGroupId)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Customer Group. The method may actually delete multiple database records if the customer group has entries for different languages.

Specified by:
deleteCustomerGroup in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
custGroupId - The id of a customer group object
Returns:
returns the id of the deleted customer group
Throws:
KKAdminException

deleteOrder

public int deleteOrder(java.lang.String sessionId,
                       int ordId)
                throws KKAdminException
Description copied from interface: KKAdminIf
Deletes an order and all associated records (eg addresses, status history etc).

Specified by:
deleteOrder in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
ordId - Order id of the order to delete
Returns:
return the order id of the deleted order
Throws:
KKAdminException

getCustomers

public AdminCustomerSearchResult getCustomers(java.lang.String sessionId,
                                              AdminCustomerSearch search,
                                              int offset,
                                              int size)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
Returns a set of Customers that match the search criteria.

Specified by:
getCustomers in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
search - the definition of the search for customers - can be null
offset - the offset in the database
size - the number of records from the specified offset
Returns:
a set of customers matching the search criteria within an AdminCustomerSearchResult object
Throws:
KKAdminException

getCustomersLite

public AdminCustomerSearchResult getCustomersLite(java.lang.String sessionId,
                                                  AdminCustomerSearch search,
                                                  int offset,
                                                  int size)
                                           throws KKAdminException
Description copied from interface: KKAdminIf
Returns a set of "Lite" Customers that match the search criteria. Only a few attributes are populated on "Lite" Customers.

Specified by:
getCustomersLite in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
search - the definition of the search for customers - can be null
offset - the offset in the database
size - the number of records from the specified offset
Returns:
a set of customers matching the search criteria within an AdminCustomerSearchResult object
Throws:
KKAdminException

getCustomerForId

public AdminCustomer getCustomerForId(java.lang.String sessionId,
                                      int customerId)
                               throws KKAdminException
Description copied from interface: KKAdminIf
Returns the customer object for the customer defined by the given id.

Specified by:
getCustomerForId in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
customerId - The numeric id of the customer
Returns:
Customer Object or Null if the customer doesn't exist.
Throws:
KKAdminException

getProductNotificationsForCustomer

public AdminProductNotification[] getProductNotificationsForCustomer(java.lang.String sessionId,
                                                                     int customerId)
                                                              throws KKAdminException
Description copied from interface: KKAdminIf
Get an array of product notifications for the customer.

Specified by:
getProductNotificationsForCustomer in interface KKAdminIf
Parameters:
sessionId - session Id
customerId - Id of the customer whose product notifications will be returned
Returns:
an array of product notifications for the customer
Throws:
KKAdminException

deleteTaxRate

public int deleteTaxRate(java.lang.String sessionId,
                         int id)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Delete an AdminTaxRate object referenced by it's id.

Specified by:
deleteTaxRate in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
id - A TaxRate id
Returns:
returns the id of the deleted TaxRate
Throws:
KKAdminException

insertTaxRate

public int insertTaxRate(java.lang.String sessionId,
                         AdminTaxRate insertObj)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Insert an AdminTaxRate object

Specified by:
insertTaxRate in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
insertObj - An AdminTaxRate object
Returns:
returns the id of the inserted AdminTaxRate object
Throws:
KKAdminException

updateTaxRate

public int updateTaxRate(java.lang.String sessionId,
                         AdminTaxRate updateObj)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminTaxRate object

Specified by:
updateTaxRate in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
updateObj - An AdminTaxRate object
Returns:
returns the id of the updated AdminTaxRate object
Throws:
KKAdminException

deleteZone

public int deleteZone(java.lang.String sessionId,
                      int id)
               throws KKAdminException
Description copied from interface: KKAdminIf
Delete an AdminZone object referenced by it's id.

Specified by:
deleteZone in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
id - A Zone id
Returns:
returns the id of the deleted Zone
Throws:
KKAdminException

insertZone

public int insertZone(java.lang.String sessionId,
                      AdminZone insertObj)
               throws KKAdminException
Description copied from interface: KKAdminIf
Insert an AdminZone object

Specified by:
insertZone in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
insertObj - An AdminZone object
Returns:
returns the id of the inserted AdminZone object
Throws:
KKAdminException

updateZone

public int updateZone(java.lang.String sessionId,
                      AdminZone updateObj)
               throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminZone object

Specified by:
updateZone in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
updateObj - An AdminZone object
Returns:
returns the id of the updated AdminZone object
Throws:
KKAdminException

deleteTaxClass

public int deleteTaxClass(java.lang.String sessionId,
                          int id)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Delete an AdminTaxClass object referenced by it's id.

Specified by:
deleteTaxClass in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
id - A TaxClass id
Returns:
returns the id of the deleted TaxClass
Throws:
KKAdminException

insertTaxClass

public int insertTaxClass(java.lang.String sessionId,
                          AdminTaxClass insertObj)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Insert an AdminTaxClass object

Specified by:
insertTaxClass in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
insertObj - An AdminTaxClass object
Returns:
returns the id of the inserted AdminTaxClass object
Throws:
KKAdminException

updateTaxClass

public int updateTaxClass(java.lang.String sessionId,
                          AdminTaxClass updateObj)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminTaxClass object

Specified by:
updateTaxClass in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
updateObj - An AdminTaxClass object
Returns:
returns the id of the updated AdminTaxClass object
Throws:
KKAdminException

deleteAddressFormat

public int deleteAddressFormat(java.lang.String sessionId,
                               int id)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Delete an AdminAddressFormat object referenced by it's id.

Specified by:
deleteAddressFormat in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
id - A AddressFormat id
Returns:
returns the id of the deleted AddressFormat
Throws:
KKAdminException

insertAddressFormat

public int insertAddressFormat(java.lang.String sessionId,
                               AdminAddressFormat insertObj)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Insert an AdminAddressFormat object

Specified by:
insertAddressFormat in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
insertObj - An AdminAddressFormat object
Returns:
returns the id of the inserted AdminAddressFormat object
Throws:
KKAdminException

updateAddressFormat

public int updateAddressFormat(java.lang.String sessionId,
                               AdminAddressFormat updateObj)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminAddressFormat object

Specified by:
updateAddressFormat in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
updateObj - An AdminAddressFormat object
Returns:
returns the id of the updated AdminAddressFormat object
Throws:
KKAdminException

deleteGeoZone

public int deleteGeoZone(java.lang.String sessionId,
                         int id)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Delete a GeoZone. The Geo Zone (or "Tax Area") with the specified Id is deleted and, to maintain data integrity, so are any tax rates and tax area to zone mappings that use the geo zone.

Specified by:
deleteGeoZone in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
id - A GeoZone id
Returns:
returns the id of the deleted GeoZone
Throws:
KKAdminException

insertGeoZone

public int insertGeoZone(java.lang.String sessionId,
                         AdminGeoZone insertObj)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Insert an AdminGeoZone object.

Specified by:
insertGeoZone in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
insertObj - An AdminGeoZone object
Returns:
returns the id of the inserted AdminGeoZone object
Throws:
KKAdminException

updateGeoZone

public int updateGeoZone(java.lang.String sessionId,
                         AdminGeoZone updateObj)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminGeoZone object.

Specified by:
updateGeoZone in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
updateObj - An AdminGeoZone object
Returns:
returns the id of the updated AdminGeoZone object
Throws:
KKAdminException

deleteSubZone

public int deleteSubZone(java.lang.String sessionId,
                         int id)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Delete a SubZone.

Specified by:
deleteSubZone in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
id - A SubZone id
Returns:
returns the id of the deleted Zone
Throws:
KKAdminException

insertSubZone

public int insertSubZone(java.lang.String sessionId,
                         AdminSubZone insertObj)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Insert an AdminSubZone object.

Specified by:
insertSubZone in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
insertObj - An AdminSubZone object
Returns:
returns the id of the inserted AdminSubZone object
Throws:
KKAdminException

updateSubZone

public int updateSubZone(java.lang.String sessionId,
                         AdminSubZone updateObj)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminSubZone object.

Specified by:
updateSubZone in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
updateObj - An AdminSubZone object
Returns:
returns the id of the updated AdminSubZone object
Throws:
KKAdminException

getConfigurationInfo

public java.lang.String[] getConfigurationInfo(java.lang.String sessionId,
                                               java.lang.String[] validationKeys)
                                        throws KKAdminException
Description copied from interface: KKAdminIf
Get the configuration values for the given keys.

Specified by:
getConfigurationInfo in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
validationKeys - an array of configuration keys
Returns:
Returns an array of Configuration key values - typically used for validation on the UI
Throws:
KKAdminException

getAllConfigurations

public KKConfiguration[] getAllConfigurations(java.lang.String sessionId)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of all the Configuration objects.

Specified by:
getAllConfigurations in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Returns:
An array of Configuration objects
Throws:
KKAdminException

getAllConfigurationGroups

public AdminConfigurationGroup[] getAllConfigurationGroups(java.lang.String sessionId)
                                                    throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of all the Configuration Group objects.

Specified by:
getAllConfigurationGroups in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Returns:
An array of Configuration Group objects
Throws:
KKAdminException

updateConfiguration

public void updateConfiguration(java.lang.String sessionId,
                                KKConfiguration newConf)
                         throws KKAdminException
Description copied from interface: KKAdminIf
Updates a KKConfiguration object.

Specified by:
updateConfiguration in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
newConf - the KKConfiguration to update
Throws:
KKAdminException

updateConfigurationGroup

public void updateConfigurationGroup(java.lang.String sessionId,
                                     AdminConfigurationGroup newConf)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Updates an AdminConfigurationGroup object.

Specified by:
updateConfigurationGroup in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
newConf - the AdminConfigurationGroup to update
Throws:
KKAdminException

getConfigurationGroupsByTitle

public AdminConfigurationGroup[] getConfigurationGroupsByTitle(java.lang.String sessionId,
                                                               java.lang.String title)
                                                        throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of AdminConfigurationGroup objects with the specified title.

Specified by:
getConfigurationGroupsByTitle in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Returns:
An array of AdminConfigurationGroup objects
Throws:
KKAdminException

getConfigurationByKey

public KKConfiguration getConfigurationByKey(java.lang.String sessionId,
                                             java.lang.String key)
                                      throws KKAdminException
Description copied from interface: KKAdminIf
Returns a KKConfiguration object with the specified key.

Specified by:
getConfigurationByKey in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
key - the Configuration key to search for
Returns:
A KKConfiguration object with the specified key
Throws:
KKAdminException

getConfigurationsByGroup

public KKConfiguration[] getConfigurationsByGroup(java.lang.String sessionId,
                                                  int configGroup)
                                           throws KKAdminException
Description copied from interface: KKAdminIf
Get the configuration elements for the specified group

Specified by:
getConfigurationsByGroup in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
configGroup - the Configuration Group Id
Returns:
Returns an array of Configurations
Throws:
KKAdminException

saveConfigs

public void saveConfigs(java.lang.String sessionId,
                        KKConfiguration[] configs,
                        KKConfiguration[] origConfigs)
                 throws KKAdminException
Description copied from interface: KKAdminIf
Saves an array of KKConfiguration objects to the database.

Specified by:
saveConfigs in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
configs - Configuration array to save
origConfigs - Original Configuration array to compare against
Throws:
KKAdminException

insertConfigs

public void insertConfigs(java.lang.String sessionId,
                          KKConfiguration[] configs)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Insert one or more new configuration parameters

Specified by:
insertConfigs in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
configs - an array of KKConfiguration objects to insert
Throws:
KKAdminException

removeConfigs

public void removeConfigs(java.lang.String sessionId,
                          java.lang.String[] configKeys)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Remove one or more configuration parameters

Specified by:
removeConfigs in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
configKeys - an array of configuration key Strings to remove
Throws:
KKAdminException

getConfigData

public AdminConfigData[] getConfigData(java.lang.String sessionId,
                                       java.lang.String key)
                                throws KKAdminException
Description copied from interface: KKAdminIf
Returns the AdminConfigData items with the specified key or all AdminConfigData items if the key is null

Specified by:
getConfigData in interface KKAdminIf
Parameters:
sessionId - Session Id of the user.
key - Only return the AdminConfigData items with this key (if null all AdminConfigData items are returned)
Returns:
Returns an array of AdminConfigData items with the specified key or all AdminConfigData items if the key is null ordered by date added
Throws:
KKAdminException

getModules

public KKModule[] getModules(java.lang.String sessionId,
                             int moduleType)
                      throws KKAdminException
Description copied from interface: KKAdminIf
Get the available modules of the specified type.

Valid types are:

Specified by:
getModules in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
moduleType - the Configuration Group Id
Returns:
Returns an array of Configurations
Throws:
KKAdminException

registerCustomer

public int registerCustomer(java.lang.String sessionId,
                            AdminCustomerRegistration custReg)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Register a new customer. If an admin user or registered customer already exists with the same eMail address, then an exception is thrown.

Specified by:
registerCustomer in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
custReg - Customer Registration details.
Returns:
the new customer Id
Throws:
KKAdminException - If an admin user or registered customer already exists with the same eMail address

forceRegisterCustomer

public int forceRegisterCustomer(java.lang.String sessionId,
                                 AdminCustomerRegistration custReg)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Register a new customer. If an admin user already exists with the same eMail address, it is deleted. If a registered customer already exists with the same eMail address, then an exception is thrown.

This method is intended to be used when interfacing to a SSO system for logging in admin users. The idea is that admin users are registered within KonaKart if the SSO system determines that they have adequate privileges. Once registered they are given a role and then logged in by calling other API calls. The information as to which role(s) they should be allocated is also determined from information retrieved from the SSO system. When the KonaKart session expires, the process is repeated and so the admin user has to be re-registered probably using very similar information. The registerCustomer() API call would throw an exception, whereas this API call deletes the existing admin user and registers a new one.

Specified by:
forceRegisterCustomer in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
custReg - Customer Registration details
Returns:
the new customer Id
Throws:
KKAdminException - if a registered customer already exists with the same eMail address

resetCustomerPassword

public void resetCustomerPassword(java.lang.String sessionId,
                                  int custId)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Reset a customer's password. A new password is generated and an email is sent to the customer to inform him of the new password. If the locale attribute of the customer is not null, it will be used to read the email template in the customer's preferred language. Otherwise the default language will be used.

Specified by:
resetCustomerPassword in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
custId - Customer Id
Throws:
KKAdminException - if the customer is not found, or problems resetting the password or sending the email.

resetCustomerPasswordSpecifyingEmail

public void resetCustomerPasswordSpecifyingEmail(java.lang.String sessionId,
                                                 int custId,
                                                 java.lang.String eMailAddress)
                                          throws KKAdminException
Description copied from interface: KKAdminIf
Reset a customer's password using the eMail address specified. A new password is generated for the specified customer and an email is sent to the customer to inform him of this new password. If the locale attribute of the customer is not null, it will be used to read the email template in the customer's preferred language. Otherwise the default language will be used.

This API call should only be used when the emailAddress attribute of the AdminCustomer doesn't specify where the eMail should be sent.

Specified by:
resetCustomerPasswordSpecifyingEmail in interface KKAdminIf
custId - Customer Id
eMailAddress - The eMail address to override the one from the customer object
Throws:
KKAdminException - if the customer is not found, or problems resetting the password or sending the email.

setCustomerPassword

public void setCustomerPassword(java.lang.String sessionId,
                                int custId,
                                java.lang.String newPassword)
                         throws KKAdminException
Description copied from interface: KKAdminIf
Set a customer's password. The new password is set for the customer. No email notification is sent.

Specified by:
setCustomerPassword in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
custId - Customer Id
newPassword - New password (as entered by the user)
Throws:
KKAdminException

changePassword

public void changePassword(java.lang.String sessionId,
                           java.lang.String currentPassword,
                           java.lang.String newPassword)
                    throws KKAdminException
Description copied from interface: KKAdminIf
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 KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
currentPassword - current Password
newPassword - new Password
Throws:
KKAdminException - if the current password doesn't match

insertProduct

public int insertProduct(java.lang.String sessionId,
                         AdminProduct product)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Insert the product. The product must have at least one associated AdminProductDescription object.

Specified by:
insertProduct in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
product - An AdminProduct object
Returns:
Returns the id of the inserted product.
Throws:
KKAdminException

insertProductWithOptions

public int insertProductWithOptions(java.lang.String sessionId,
                                    AdminProduct product,
                                    AdminProductMgrOptions mgrOptions)
                             throws KKAdminException
Description copied from interface: KKAdminIf
Insert the product. The product must have at least one associated AdminProductDescription object. The AdminProductMgrOptions object contains options to enable the prices and quantity to be set independently for different catalogs.

Specified by:
insertProductWithOptions in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
product - An AdminProduct object
mgrOptions - Allows you to define whether the quantity and prices can have different values depending on the catalogId. May be set to null.
Returns:
Returns the id of the inserted product.
Throws:
KKAdminException

editProduct

public void editProduct(java.lang.String sessionId,
                        AdminProduct product)
                 throws KKAdminException
Description copied from interface: KKAdminIf
Edits the product, replacing existing data with data in the product parameter.

Specified by:
editProduct in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
product - AdminProduct object
Throws:
KKAdminException

editProductWithOptions

public void editProductWithOptions(java.lang.String sessionId,
                                   AdminProduct product,
                                   AdminProductMgrOptions mgrOptions)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Edit a product and its product description objects. The AdminProductMgrOptions object contains options to enable the prices and quantity to be set independently for different catalogs.

Specified by:
editProductWithOptions in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
product - AdminProduct object
mgrOptions - Allows you to define whether the quantity and prices can have different values depending on the catalogId. May be set to null.
Throws:
KKAdminException

doesProductExist

public boolean doesProductExist(java.lang.String sessionId,
                                int productId)
                         throws KKAdminException
Description copied from interface: KKAdminIf
Is there a product in the database with the specified productId

Specified by:
doesProductExist in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productId - The id of the product
Returns:
Returns true if the product exists otherwise false
Throws:
KKAdminException

getProduct

public AdminProduct getProduct(java.lang.String sessionId,
                               int productId)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Get the product referenced by this product id, from the database.

Specified by:
getProduct in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productId - The numeric id of the product
Returns:
Returns the product
Throws:
KKAdminException

getProductWithOptions

public AdminProduct getProductWithOptions(java.lang.String sessionId,
                                          int productId,
                                          AdminProductMgrOptions mgrOptions)
                                   throws KKAdminException
Description copied from interface: KKAdminIf
Get the product referenced by this product id, from the database. The MgrOptions object defines whether to use prices and quantity for the catalog defined by the catalogId.

Specified by:
getProductWithOptions in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productId - The numeric id of the product
mgrOptions - It defines whether to use prices and quantity for the catalog defined by the catalogId.
Returns:
Returns the product
Throws:
KKAdminException

searchForProducts

public AdminProducts searchForProducts(java.lang.String sessionId,
                                       AdminDataDescriptor dataDesc,
                                       AdminProductSearch prodSearch,
                                       int languageId)
                                throws KKAdminException
Description copied from interface: KKAdminIf
Search for products.

The AdminDataDescriptor allows you to:

The AdminProductSearch product allows you to enter additional search parameters.

The Products may be sorted by :

Specified by:
searchForProducts in interface KKAdminIf
Parameters:
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 - An object containing the search criteria
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
Return a Products object
Throws:
KKAdminException

searchForProductsWithOptions

public AdminProducts searchForProductsWithOptions(java.lang.String sessionId,
                                                  AdminDataDescriptor dataDesc,
                                                  AdminProductSearch prodSearch,
                                                  int languageId,
                                                  AdminProductMgrOptions mgrOptions)
                                           throws KKAdminException
Description copied from interface: KKAdminIf
Search for products.

The AdminDataDescriptor allows you to:

The AdminProductSearch product allows you to enter additional search parameters.

The Products may be sorted by :

The MgrOptions object defines whether to use prices and quantity for the catalog defined by the catalogId.

Specified by:
searchForProductsWithOptions in interface KKAdminIf
Parameters:
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 - An object containing the search criteria
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
mgrOptions - It defines whether to use prices and quantity for the catalog defined by the catalogId.
Returns:
Return a Products object
Throws:
KKAdminException

deleteProduct

public void deleteProduct(java.lang.String sessionId,
                          int productId)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Delete the product referenced by the productId parameter.

Specified by:
deleteProduct in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productId - The numeric id of the product
Throws:
KKAdminException

deleteCategoryTree

public void deleteCategoryTree(java.lang.String sessionId,
                               int categoryId,
                               int options)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Delete the category referenced to by categoryId. The child categories and products will either be moved up a level or deleted.

The options can be set to AdminCategoryMgr.DELETE_CHILDREN or AdminCategoryMgr.ATTACH_CHILDREN_TO_PARENT . In the first case, the category and all of its children (String sessionId, categories and products) are deleted. In the second case, only the category referenced by categoryId is deleted and all of its children are attached to its parent. However, if the category is a top level category, then the products directly associated with that category will be deleted since there is no parent category to attach them to.

Specified by:
deleteCategoryTree in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
categoryId - The numeric id of the category
options - Can be set to AdminCategoryMgr.DELETE_CHILDREN or AdminCategoryMgr.ATTACH_CHILDREN_TO_PARENT
Throws:
KKAdminException

deleteSingleCategory

public void deleteSingleCategory(java.lang.String sessionId,
                                 int categoryId)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Delete a single category and its descriptions.

Specified by:
deleteSingleCategory in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
categoryId - The numeric id of the category
Throws:
KKAdminException

editCategory

public void editCategory(java.lang.String sessionId,
                         AdminCategory cat)
                  throws KKAdminException
Description copied from interface: KKAdminIf
The category is edited. The existing data is replaced with data from the category parameter.

Specified by:
editCategory in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
cat - An AdminCategory object
Throws:
KKAdminException

insertCategory

public int insertCategory(java.lang.String sessionId,
                          AdminCategory cat)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Inserts a new category into the database. It must have at least one description object associated with it.

Specified by:
insertCategory in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
cat - An AdminCategory object
Returns:
The id of the new category
Throws:
KKAdminException

moveCategory

public void moveCategory(java.lang.String sessionId,
                         int categoryId,
                         int newParentId)
                  throws KKAdminException
Description copied from interface: KKAdminIf
The category referenced by categoryId is moved to a new parent referenced by newParentId.

Specified by:
moveCategory in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
categoryId - The numeric id of the category
Throws:
KKAdminException

deleteManufacturer

public void deleteManufacturer(java.lang.String sessionId,
                               int manufacturerId,
                               boolean deleteProducts)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Delete the manufacturer and manufacturer info records. If deleteProducts is set, then all of the products associated with the manufacturer are also deleted.

Specified by:
deleteManufacturer in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
manufacturerId - The numeric id of the manufacturer
deleteProducts - Set to true to delete all of the products associated with the manufacturer
Throws:
KKAdminException

editManufacturer

public void editManufacturer(java.lang.String sessionId,
                             AdminManufacturer manu)
                      throws KKAdminException
Description copied from interface: KKAdminIf
Edits the manufacturer, replacing existing data with data in the manu parameter.

Specified by:
editManufacturer in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
manu - AdminManufacturer object
Throws:
KKAdminException

insertManufacturer

public int insertManufacturer(java.lang.String sessionId,
                              AdminManufacturer manu)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Insert a manufacturer

Specified by:
insertManufacturer in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
manu - An AdminManufacturer object
Returns:
Return the manufacturer id
Throws:
KKAdminException

deleteReview

public void deleteReview(java.lang.String sessionId,
                         int reviewId)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Delete the review and all entries in the reviews description table.

Specified by:
deleteReview in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
reviewId - NUmeric id of the review
Throws:
KKAdminException

editReview

public void editReview(java.lang.String sessionId,
                       AdminReview review)
                throws KKAdminException
Description copied from interface: KKAdminIf
Edits the review, replacing existing data with data in the review parameter.

Specified by:
editReview in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
review - AdminReview object
Throws:
KKAdminException

getAllReviews

public AdminReviews getAllReviews(java.lang.String sessionId,
                                  AdminDataDescriptor dataDesc)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Returns all reviews. The AdminDataDescriptor allows to add search constraints for the custom fields 1 to 3 and to order the result set as follows:

Specified by:
getAllReviews in interface KKAdminIf
Parameters:
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
Returns:
Return an AdminReviews object
Throws:
KKAdminException

getReview

public AdminReview getReview(java.lang.String sessionId,
                             int reviewId)
                      throws KKAdminException
Description copied from interface: KKAdminIf
Returns the review referenced by the review Id

Specified by:
getReview in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
reviewId - The numeric id of the AdminReview object
Returns:
Return an AdminReview object
Throws:
KKAdminException

getReviewsPerProduct

public AdminReviews getReviewsPerProduct(java.lang.String sessionId,
                                         AdminDataDescriptor dataDesc,
                                         int productId)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Returns the reviews for a product. The AdminDataDescriptor allows to add search constraints for the custom fields 1 to 3 and to order the result set as follows:

Specified by:
getReviewsPerProduct in interface KKAdminIf
Parameters:
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
Returns:
Return an AdminReviews object
Throws:
KKAdminException

getReviews

public AdminReviews getReviews(java.lang.String sessionId,
                               AdminDataDescriptor dataDesc,
                               AdminReviewSearch revSearch)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Returns the reviews for the given search criteria. The AdminReviewSearch object allows you search for reviews by: The AdminDataDescriptor allows to add search constraints for the custom fields 1 to 3 and to order the result set as follows:

Specified by:
getReviews in interface KKAdminIf
Parameters:
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
revSearch - The search criteria
Returns:
Return an AdminReviews object
Throws:
KKAdminException

insertReview

public int insertReview(java.lang.String sessionId,
                        AdminReview review)
                 throws KKAdminException
Description copied from interface: KKAdminIf
A new review is inserted

Specified by:
insertReview in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
review - The AdminReview object
Returns:
int : Review Primary Key
Throws:
KKAdminException

insertSpecial

public int insertSpecial(java.lang.String sessionId,
                         AdminSpecial special)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Inserts a new special

Specified by:
insertSpecial in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
special - The AdminSpecial object
Returns:
Return the primary key of the new special object
Throws:
KKAdminException

getSpecial

public AdminSpecial getSpecial(java.lang.String sessionId,
                               int specialId)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Returns a special referenced by the id parameter

Specified by:
getSpecial in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
specialId - The numeric id of the AdminSpecial object
Returns:
Return a special object
Throws:
KKAdminException

deleteSpecial

public void deleteSpecial(java.lang.String sessionId,
                          int specialId)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Deletes the special referenced by the special id

Specified by:
deleteSpecial in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
specialId - The numeric id of the special
Throws:
KKAdminException

editSpecial

public void editSpecial(java.lang.String sessionId,
                        AdminSpecial special)
                 throws KKAdminException
Description copied from interface: KKAdminIf
Edits the special, replacing existing data with data in the special parameter.

Specified by:
editSpecial in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
special - AdminSpecial object
Throws:
KKAdminException

getAllSpecials

public AdminProducts getAllSpecials(java.lang.String sessionId,
                                    AdminDataDescriptor dataDesc,
                                    int languageId)
                             throws KKAdminException
Description copied from interface: KKAdminIf
Returns an AdminProducts object containing an array of product objects which are all specials.

The Specials may be sorted by :

Specified by:
getAllSpecials in interface KKAdminIf
Parameters:
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 language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
Return an AdminProducts object containing an array of products
Throws:
KKAdminException

getSpecialsPerCategory

public AdminProducts getSpecialsPerCategory(java.lang.String sessionId,
                                            AdminDataDescriptor dataDesc,
                                            int categoryId,
                                            boolean searchInSubCats,
                                            int languageId)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
Returns an AdminProducts object containing an array of specials for a category.

The Specials may be sorted by :

Specified by:
getSpecialsPerCategory in interface KKAdminIf
Parameters:
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 language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
Returns an AdminProducts object
Throws:
KKAdminException

deleteProductOptions

public void deleteProductOptions(java.lang.String sessionId,
                                 int productOptionId)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Delete a product option record for all languages and all of its records in the options values to options table and all of its values.

Specified by:
deleteProductOptions in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productOptionId - The numeric id of the productOption
Throws:
KKAdminException

deleteProductOptionValues

public void deleteProductOptionValues(java.lang.String sessionId,
                                      int productOptionValueId)
                               throws KKAdminException
Description copied from interface: KKAdminIf
Delete a product option value record for all languages and all of its records in the options values to options table.

Specified by:
deleteProductOptionValues in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productOptionValueId - The numeric id of the productOptionValue
Throws:
KKAdminException

getProductOptionsPerId

public AdminProductOption[] getProductOptionsPerId(java.lang.String sessionId,
                                                   int productOptionId)
                                            throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of AdminProductOption objects. One for each language.

Specified by:
getProductOptionsPerId in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productOptionId - The numeric id of the AdminProductOption
Returns:
An array of all product options, for each language
Throws:
KKAdminException

getProductOptionsPerName

public AdminProductOption[] getProductOptionsPerName(java.lang.String sessionId,
                                                     java.lang.String name,
                                                     int langId)
                                              throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of productOptions with the specified name and languageId.

Specified by:
getProductOptionsPerName in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
name - Product Option Name
langId - Language Id specifies that the product option values should be returned for this language. Can specify AdminLanguageMgr.DEFAULT_LANG to specify the default language.
Returns:
An array of all product options for the specified language with the specified name
Throws:
KKAdminException

getAllProductOptionValues

public AdminProductOptionValue[] getAllProductOptionValues(java.lang.String sessionId,
                                                           int languageId)
                                                    throws KKAdminException
Description copied from interface: KKAdminIf
Get an array of all the product option value objects for the specified language.

Specified by:
getAllProductOptionValues in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
languageId - specifies that the product option values should be returned for this language. Can specify AdminLanguageMgr.DEFAULT_LANG to specify the default language, or specify AdminLanguageMgr.ALL_LANGUAGES to specify all languages
Returns:
Return an array of productOptionValue objects
Throws:
KKAdminException

getProductOptionValuesPerId

public AdminProductOptionValue[] getProductOptionValuesPerId(java.lang.String sessionId,
                                                             int productOptionValueId)
                                                      throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of productOptionValues. One for each language.

Specified by:
getProductOptionValuesPerId in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Returns:
Return an array of productOptionValues objects
Throws:
KKAdminException

getProductOptionValuesPerName

public AdminProductOptionValue[] getProductOptionValuesPerName(java.lang.String sessionId,
                                                               java.lang.String name,
                                                               int languageId)
                                                        throws KKAdminException
Description copied from interface: KKAdminIf
Get an array of product option value objects with the specified name and language.

Specified by:
getProductOptionValuesPerName in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
name - product option value name
languageId - language id (can use AdminLanguageMgr.DEFAULT_LANG to get the default language)
Returns:
Return an array of productOptionValue objects
Throws:
KKAdminException

getProductOptionValueToProductOptions

public AdminProdOptionValToProdOption[] getProductOptionValueToProductOptions(java.lang.String sessionId,
                                                                              AdminProdOptionValToProdOption prodOptValToProdOpt)
                                                                       throws KKAdminException
Description copied from interface: KKAdminIf
Gets an array of AdminProdOptionValToProdOption objects that have the specified optionId and OptionValueId.

Specified by:
getProductOptionValueToProductOptions in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
prodOptValToProdOpt - the AdminProdOptionValToProdOption to look up. Only uses the optionId and OptionValueId in this object
Returns:
Returns an array of AdminProdOptionValToProdOption objects
Throws:
KKAdminException

insertProductOption

public void insertProductOption(java.lang.String sessionId,
                                AdminProductOption productOption)
                         throws KKAdminException
Description copied from interface: KKAdminIf
Insert a product option.

Specified by:
insertProductOption in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productOption - An AdminProductOption object
Throws:
KKAdminException

editProductOption

public void editProductOption(java.lang.String sessionId,
                              AdminProductOption productOption)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Edits the product option, replacing existing data with data in the productOption parameter.

Specified by:
editProductOption in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productOption - AdminProductOption object
Throws:
KKAdminException

insertProductsOptionsValuesToProductsOptions

public int insertProductsOptionsValuesToProductsOptions(java.lang.String sessionId,
                                                        AdminProdOptionValToProdOption prodOptValToProdOpt)
                                                 throws KKAdminException
Description copied from interface: KKAdminIf
Insert a product option value to product option record.

Specified by:
insertProductsOptionsValuesToProductsOptions in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
prodOptValToProdOpt - a AdminProdOptionValToProdOption object to insert. The optionId and optionValueId defined in the object must be valid otherwise an exception is thrown.
Returns:
the key created for the inserted record
Throws:
KKAdminException

insertProductOptionValue

public void insertProductOptionValue(java.lang.String sessionId,
                                     AdminProductOptionValue productOptionValue,
                                     int productOptionId)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Insert a product option value for a product option

Specified by:
insertProductOptionValue in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productOptionValue - An AdminProductOptionValue object
productOptionId - The product option id for inserting a record into the Products_Options_Values_To_Products_Options table. If this is set to -1, no such join record is inserted.
Throws:
KKAdminException

editProductOptionValue

public void editProductOptionValue(java.lang.String sessionId,
                                   AdminProductOptionValue productOptionValue)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Edits the product option value, replacing existing data with data in the productOptionValue parameter.

Specified by:
editProductOptionValue in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productOptionValue - AdminProductOptionValue object
Throws:
KKAdminException

getNextProductOptionId

public int getNextProductOptionId(java.lang.String sessionId)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Get the next id to use when inserting a ProductOption record.

Specified by:
getNextProductOptionId in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Returns:
The next id
Throws:
KKAdminException

getNextProductOptionValuesId

public int getNextProductOptionValuesId(java.lang.String sessionId)
                                 throws KKAdminException
Description copied from interface: KKAdminIf
Get the next id to use when inserting a ProductOptionValue record.

Specified by:
getNextProductOptionValuesId in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Returns:
The next id
Throws:
KKAdminException

getProductAttributesPerProduct

public AdminProductAttribute[] getProductAttributesPerProduct(java.lang.String sessionId,
                                                              int productId)
                                                       throws KKAdminException
Description copied from interface: KKAdminIf
Gets all of the product attributes for the product.

Specified by:
getProductAttributesPerProduct in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productId - The numeric id of the product
Returns:
Returns an array of AdminProductAttributes
Throws:
KKAdminException

deleteProductAttribute

public void deleteProductAttribute(java.lang.String sessionId,
                                   int productAttributeId)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Delete the productAttribute.

Specified by:
deleteProductAttribute in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productAttributeId - The numeric id of the product attribute
Throws:
KKAdminException

deleteProductAttributesPerProduct

public void deleteProductAttributesPerProduct(java.lang.String sessionId,
                                              int productId)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
Delete the productAttributes Per product.

Specified by:
deleteProductAttributesPerProduct in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productId - The numeric id of the product
Throws:
KKAdminException

editProductAttribute

public void editProductAttribute(java.lang.String sessionId,
                                 AdminProductAttribute prodAttr)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Edits the product attribute, replacing existing data with data in the prodAttr parameter.

Specified by:
editProductAttribute in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
prodAttr - AdminProductAttribute object
Throws:
KKAdminException

insertProductAttribute

public int insertProductAttribute(java.lang.String sessionId,
                                  AdminProductAttribute prodAttr)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Inserts the product attribute.

Specified by:
insertProductAttribute in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
prodAttr - An AdminProductAttribute object
Returns:
Returns the primary key of the new product attribute
Throws:
KKAdminException

insertProductOptionValues

public int insertProductOptionValues(java.lang.String sessionId,
                                     AdminProductOptionValue[] productOptionValues,
                                     int productOptionId)
                              throws KKAdminException
Description copied from interface: KKAdminIf
The array of product option values will all be inserted with the same id which is calculated by the system. Each option value must have a different language id.

Specified by:
insertProductOptionValues in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productOptionValues - An array of AdminProductOptionValue objects
productOptionId - The numeric id of the AdminProductOption object
Returns:
Id of inserted option values
Throws:
KKAdminException

insertProductOptions

public int insertProductOptions(java.lang.String sessionId,
                                AdminProductOption[] productOptions)
                         throws KKAdminException
Description copied from interface: KKAdminIf
The array of product options will all be inserted with the same id which is calculated by the system. Each option must have a different language id.

Specified by:
insertProductOptions in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
productOptions - An array of AdminProductOption objects
Returns:
Id of inserted options
Throws:
KKAdminException

searchForIpnHistory

public AdminIpnHistories searchForIpnHistory(java.lang.String sessionId,
                                             AdminDataDescriptor dataDesc,
                                             AdminIpnSearch ipnSearch)
                                      throws KKAdminException
Description copied from interface: KKAdminIf
Search for IpnHistory records with search criteria and order by criteria. An IpnHistory record is created whenever a payment gateway makes an asynchronous callback to KonaKart with information regarding the outcome of the payment attempt.

Specified by:
searchForIpnHistory in interface KKAdminIf
Parameters:
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
ipnSearch - An object containing the search criteria
Returns:
Returns an AdminIpnHistories
Throws:
KKAdminException

insertIpnHistory

public int insertIpnHistory(java.lang.String sessionId,
                            AdminIpnHistory ipnHistory)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Save the AdminIpnHistory object in the database.

Specified by:
insertIpnHistory in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
ipnHistory - the AdminIpnHistory record to insert into the database
Returns:
Id of newly created record
Throws:
KKAdminException

deleteExpiredSessions

public int deleteExpiredSessions(java.lang.String sessionId)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Deletes all sessions that have expired. It is useful to make this call at regular intervals in order to reduce the size of the database table that retains the session information.

Specified by:
deleteExpiredSessions in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Returns:
Returns the number of remaining sessions
Throws:
KKAdminException

getConfigFiles

public AdminFile[] getConfigFiles(java.lang.String sessionId)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Gets the Config files defined in konakart_config_files.xml

Specified by:
getConfigFiles in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Returns:
an array of AdminFile objects that define the config files declared on the system
Throws:
KKAdminException

getReports

public AdminReport[] getReports(java.lang.String sessionId)
                         throws KKAdminException
Description copied from interface: KKAdminIf
Retrieves the reports as an array of AdminReport objects that define the set of reports currently defined on the system.

Specified by:
getReports in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Returns:
an array of AdminReport objects that define the reports defined on the system
Throws:
KKAdminException

reloadReports

public void reloadReports(java.lang.String sessionId)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Reloads the reports

Specified by:
reloadReports in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
Throws:
KKAdminException

getFileContents

public java.lang.String getFileContents(java.lang.String sessionId,
                                        java.lang.String fileName)
                                 throws KKAdminException
Description copied from interface: KKAdminIf
Get the file contents. Note that is uses the line terminators appropriate for the platform where the file resides.

Specified by:
getFileContents in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
fileName - the filename in the server's context
Returns:
the file contents as a String
Throws:
KKAdminException - if the file's not present or can't be read, or it's not a text file

getFileContentsAsByteArray

public byte[] getFileContentsAsByteArray(java.lang.String sessionId,
                                         java.lang.String fileName)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Get the file contents as a byte array.

Specified by:
getFileContentsAsByteArray in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
fileName - the filename in the server's context
Returns:
the file contents as a byte array
Throws:
KKAdminException - if the file's not present or can't be read

saveFileContents

public void saveFileContents(java.lang.String sessionId,
                             java.lang.String fileName,
                             java.lang.String fileContents)
                      throws KKAdminException
Description copied from interface: KKAdminIf
Writes the specified file contents into the specified file. It creates the file if it doesn't already exist.

Specified by:
saveFileContents in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
fileName - the filename in the server's context
fileContents - the file contents to write
Throws:
KKAdminException - on any Security or IO problems that prevent us from saving the data to the file.

deleteFile

public boolean deleteFile(java.lang.String sessionId,
                          java.lang.String fileName)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Delete the file.

Specified by:
deleteFile in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
fileName - the filename in the server's context
Returns:
true if the file was deleted, otherwise false.
Throws:
KKAdminException - if the file's not present or can't be deleted

addCategoriesToPromotion

public void addCategoriesToPromotion(java.lang.String sessionId,
                                     AdminCategory[] categories,
                                     int promotionId,
                                     int rule)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of categories to the promotion identified by promotionId. The rule parameter can take the following values:

Specified by:
addCategoriesToPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
categories - An array of Admin category objects
promotionId - The numeric id of the promotion
rule - An integer defining the rule for adding the categories
Throws:
KKAdminException

addCouponsToPromotion

public void addCouponsToPromotion(java.lang.String sessionId,
                                  AdminCoupon[] coupons,
                                  int promotionId)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of coupons to the promotion identified by promotionId. We assume that the coupon has already been inserted. The coupon must already exist since this method associates the coupons to the promotion rather than inserting them.

Specified by:
addCouponsToPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
coupons - An array of AdminCoupon objects
promotionId - The numeric id of the promotion
Throws:
KKAdminException

addPromotionsToCoupon

public void addPromotionsToCoupon(java.lang.String sessionId,
                                  AdminPromotion[] promotions,
                                  int couponId)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of promotions to the coupon identified by couponId. We assume that the promotion has already been inserted. The promotion must already exist since this method associates the promotions to the coupon rather than inserting them.

Specified by:
addPromotionsToCoupon in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
promotions - An array of AdminPromotion objects
couponId - The numeric id of the coupon
Throws:
KKAdminException

addCustomersToPromotion

public void addCustomersToPromotion(java.lang.String sessionId,
                                    AdminCustomer[] customers,
                                    int promotionId,
                                    int rule,
                                    int maxUse)
                             throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of customers to the promotion identified by promotionId. The maxUse parameter determines how many times the customers may use the promotion. The rule parameter can take the following values:

Specified by:
addCustomersToPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
customers - An array of AdminCustomer objects
promotionId - The numeric id of the promotion
rule - An integer defining the rule for adding the customers
maxUse - -1 for unlimited use
Throws:
KKAdminException

addCustomerGroupsToPromotion

public void addCustomerGroupsToPromotion(java.lang.String sessionId,
                                         int[] groupIds,
                                         int promotionId,
                                         int rule)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of customer groups (identified by the group ids) to the promotion identified by promotionId. The rule parameter can take the following values:

Specified by:
addCustomerGroupsToPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
groupIds - An array of integers containing the group ids
promotionId - The numeric id of the promotion
rule - An integer defining the rule for adding the customers
Throws:
KKAdminException

addCustomersToPromotionPerOrdersMade

public void addCustomersToPromotionPerOrdersMade(java.lang.String sessionId,
                                                 java.util.Calendar lastOrderDate,
                                                 boolean havePlacedOrder,
                                                 int promotionId,
                                                 int rule,
                                                 int maxUse)
                                          throws KKAdminException
Description copied from interface: KKAdminIf
Add to the promotion identified by promotionId, the customers who have or haven't placed an order since the lastOrderDate passed in as a parameter. The maxUse parameter determines how many times the customers may use the promotion. The rule parameter can take the following values:

Specified by:
addCustomersToPromotionPerOrdersMade in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
lastOrderDate - The last time a customer placed an order
havePlacedOrder - If true we add customers that have placed an order. Otherwise, those that haven't.
promotionId - The numeric id of the promotion
rule - An integer defining the rule for adding the customers
maxUse - -1 for unlimited use
Throws:
KKAdminException

addManufacturersToPromotion

public void addManufacturersToPromotion(java.lang.String sessionId,
                                        AdminManufacturer[] manufacturers,
                                        int promotionId,
                                        int rule)
                                 throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of manufacturers to the promotion identified by promotionId. The rule parameter can take the following values:

Specified by:
addManufacturersToPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
manufacturers - An array of AdminManufacturer objects
promotionId - The numeric id of the promotion
rule - An integer defining the rule for adding the manufacturers
Throws:
KKAdminException

addExpressionsToPromotion

public void addExpressionsToPromotion(java.lang.String sessionId,
                                      AdminExpression[] expressions,
                                      int promotionId)
                               throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of expressions to the promotion identified by promotionId.

Specified by:
addExpressionsToPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
expressions - An array of AdminExpression objects
promotionId - The numeric id of the promotion
Throws:
KKAdminException

addProductsToPromotion

public void addProductsToPromotion(java.lang.String sessionId,
                                   AdminProduct[] products,
                                   int promotionId,
                                   int rule)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of products to the promotion. Each product may have an array of options. When this array exists, we only add those particular options to the promotion. Otherwise we set the option and option value ids to -1. The rule parameter can take the following values:

Specified by:
addProductsToPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
products - An array of AdminProduct objects
promotionId - The numeric id of the promotion
rule - An integer defining the rule for adding the products
Throws:
KKAdminException

addGiftCertificatesToPromotion

public void addGiftCertificatesToPromotion(java.lang.String sessionId,
                                           AdminProduct[] giftCertificates,
                                           int promotionId)
                                    throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of gift certificate products to the promotion. Each product may have an array of options. When this array exists, we only add those particular options to the promotion. Otherwise we set the option and option value ids to -1.

Specified by:
addGiftCertificatesToPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
giftCertificates - An array of AdminProduct gift certificate objects
promotionId - The numeric id of the promotion
Throws:
KKAdminException

deletePromotion

public void deletePromotion(java.lang.String sessionId,
                            int promotionId)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Delete the promotion referenced by promotionId. Any coupons being used only by this promotion are also deleted. All of the relationships that the promotion may have with customers, manufacturers, categories, products and coupons are also deleted.

Specified by:
deletePromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
promotionId - The numeric id of the promotion
Throws:
KKAdminException

deleteCoupon

public void deleteCoupon(java.lang.String sessionId,
                         int couponId)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Delete the coupon referenced by couponId. Any relationships that the coupon may have with products are also deleted.

Specified by:
deleteCoupon in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
couponId - The numeric id of the coupon
Throws:
KKAdminException

editCoupon

public void editCoupon(java.lang.String sessionId,
                       AdminCoupon coupon)
                throws KKAdminException
Description copied from interface: KKAdminIf
Edits the coupon, replacing existing data with data in the coupon parameter.

Specified by:
editCoupon in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
coupon - An Admin coupon object
Throws:
KKAdminException

editPromotion

public void editPromotion(java.lang.String sessionId,
                          AdminPromotion promotion)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Edits the promotion, replacing existing data with data in the promotion parameter.

Specified by:
editPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
promotion - AdminPromotion object
Throws:
KKAdminException

getCouponsPerPromotion

public AdminCoupon[] getCouponsPerPromotion(java.lang.String sessionId,
                                            int promotionId)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of Admin Coupon objects associated with the promotion identified by the promotionId parameter. The array is null if no promotions exist.

Specified by:
getCouponsPerPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
promotionId - The numeric id of the promotion
Returns:
Returns an array of AdminCoupon objects
Throws:
KKAdminException

getCoupons

public AdminCouponSearchResult getCoupons(java.lang.String sessionId,
                                          AdminCouponSearch search,
                                          int offset,
                                          int size)
                                   throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminCouponSearchResult object containing an array of AdminCoupons.

Specified by:
getCoupons in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - the search object that defines the search parameters and sort order
offset - the offset in the database
size - the number of records from the specified offset
Returns:
AdminCoupon[]
Throws:
KKAdminException

getCategoriesPerPromotion

public AdminCategory[] getCategoriesPerPromotion(java.lang.String sessionId,
                                                 int promotionId,
                                                 int languageId)
                                          throws KKAdminException
Description copied from interface: KKAdminIf
Returns all of the categories for the promotion identified by promotionId.

Specified by:
getCategoriesPerPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
promotionId - The numeric id of the promotion
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
Array of Category Objects
Throws:
KKAdminException

getCustomerGroupsPerPromotion

public AdminCustomerGroup[] getCustomerGroupsPerPromotion(java.lang.String sessionId,
                                                          int promotionId,
                                                          int languageId)
                                                   throws KKAdminException
Description copied from interface: KKAdminIf
Returns all of the customer groups for the promotion identified by promotionId.

Specified by:
getCustomerGroupsPerPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
promotionId - The numeric id of the promotion
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
Array of Category Objects
Throws:
KKAdminException

getManufacturersPerPromotion

public AdminManufacturer[] getManufacturersPerPromotion(java.lang.String sessionId,
                                                        int promotionId)
                                                 throws KKAdminException
Description copied from interface: KKAdminIf
Returns all of the manufacturers for the promotion identified by promotionId.

Specified by:
getManufacturersPerPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
promotionId - The numeric id of the promotion
Returns:
An array of all manufacturers relevant to a promotion
Throws:
KKAdminException

getProductsPerPromotion

public AdminProducts getProductsPerPromotion(java.lang.String sessionId,
                                             AdminProductSearch search,
                                             int offset,
                                             int size)
                                      throws KKAdminException
Description copied from interface: KKAdminIf
Get an array of Admin product objects for a promotion. The AdminProductSearch object must have the promotionId set to a valid promotion.

Specified by:
getProductsPerPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - the search object that defines the search parameters and sort order
offset - the offset in the database
size - the number of records from the specified offset
Returns:
Returns an AdminProducts objects
Throws:
KKAdminException

getGiftCertificatesPerPromotion

public AdminProducts getGiftCertificatesPerPromotion(java.lang.String sessionId,
                                                     AdminProductSearch search,
                                                     int offset,
                                                     int size)
                                              throws KKAdminException
Description copied from interface: KKAdminIf
Get an array of Admin product gift certificate objects for a promotion. The AdminProductSearch object must have the promotionId set to a valid promotion.

Specified by:
getGiftCertificatesPerPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - the search object that defines the search parameters and sort order
offset - the offset in the database
size - the number of records from the specified offset
Returns:
Returns an AdminProducts objects
Throws:
KKAdminException

getPromotion

public AdminPromotion getPromotion(java.lang.String sessionId,
                                   int id,
                                   boolean includeCoupons,
                                   boolean includeStats)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Get a promotion object and an array of associated coupon objects when applicable.

Specified by:
getPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The numeric id of the AdminPromotion object
includeCoupons - If true we add a coupon array to the promotion if any coupons exist
includeStats - If true we calculate how many manufacturers, products, categories, customers, expressions and coupons are included or excluded from the promotion
Returns:
Returns an AdminPromotion object with an array of coupons if applicable
Throws:
KKAdminException

getPromotions

public AdminPromotionSearchResult getPromotions(java.lang.String sessionId,
                                                AdminPromotionSearch search,
                                                int offset,
                                                int size)
                                         throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminPromotionSearchResult object containing an array of AdminPromotions.

Specified by:
getPromotions in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - the search object that defines the search parameters and sort order
offset - the offset in the database
size - the number of records from the specified offset
Returns:
Returns an AdminPromotionSearchResult object
Throws:
KKAdminException

getPromotionsCount

public int getPromotionsCount(java.lang.String sessionId,
                              AdminPromotionSearch search)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Returns a count of the number of AdminPromotions.

Specified by:
getPromotionsCount in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - the search object that defines the search parameters and sort order
Returns:
A count of the number of Promotions
Throws:
KKAdminException

getPromotionsPerCoupon

public AdminPromotion[] getPromotionsPerCoupon(java.lang.String sessionId,
                                               int couponId)
                                        throws KKAdminException
Description copied from interface: KKAdminIf
Get an array of Admin promotion objects for a coupon. A coupon may apply to multiple promotions.

Specified by:
getPromotionsPerCoupon in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
couponId - The numeric id of the coupon
Returns:
Returns an array of AdminPromotion objects
Throws:
KKAdminException

insertCouponForPromotion

public int insertCouponForPromotion(java.lang.String sessionId,
                                    AdminCoupon coupon,
                                    int promotionId)
                             throws KKAdminException
Description copied from interface: KKAdminIf
Inserts a coupon and also a record in the promotion_to_coupon table to associate the coupon to a promotion.

Specified by:
insertCouponForPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
coupon - An AdminCoupon object
promotionId - The numeric id of the promotion
Returns:
Returns the id of the inserted coupon
Throws:
KKAdminException

insertCoupon

public int insertCoupon(java.lang.String sessionId,
                        AdminCoupon coupon)
                 throws KKAdminException
Description copied from interface: KKAdminIf
Inserts a coupon.

Specified by:
insertCoupon in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
coupon - An AdminCoupon object
Returns:
Returns the id of the inserted coupon
Throws:
KKAdminException

insertPromotion

public int insertPromotion(java.lang.String sessionId,
                           AdminPromotion prom)
                    throws KKAdminException
Description copied from interface: KKAdminIf
Inserts a promotion.

Specified by:
insertPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
prom - The AdminPromotion object
Returns:
Returns the id of the inserted promotion
Throws:
KKAdminException

removeCategoriesFromPromotion

public void removeCategoriesFromPromotion(java.lang.String sessionId,
                                          AdminCategory[] categories,
                                          int promotionId)
                                   throws KKAdminException
Description copied from interface: KKAdminIf
Remove an array of categories from the promotion identified by the promotionId parameter. If the array is null, then all categories are removed from the promotion.

Specified by:
removeCategoriesFromPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
categories - An array of AdminCategory objects
promotionId - The numeric id of the promotion
Throws:
KKAdminException

removeCouponsFromPromotion

public void removeCouponsFromPromotion(java.lang.String sessionId,
                                       AdminCoupon[] coupons,
                                       int promotionId)
                                throws KKAdminException
Description copied from interface: KKAdminIf
Remove an array of coupons from the promotion identified by the promotionId parameter. If the array is null, then all coupons are removed from the promotion.

Specified by:
removeCouponsFromPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
coupons - An array of AdminCoupon objects
promotionId - The numeric id of the promotion
Throws:
KKAdminException

removePromotionsFromCoupon

public void removePromotionsFromCoupon(java.lang.String sessionId,
                                       AdminPromotion[] promotions,
                                       int couponId)
                                throws KKAdminException
Description copied from interface: KKAdminIf
Remove an array of promotions from the coupon identified by the couponId parameter. If the array is null, then all promotions are removed from the coupon.

Specified by:
removePromotionsFromCoupon in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
promotions - An array of AdminPromotion objects
couponId - The numeric id of the coupon
Throws:
KKAdminException

removeCustomersFromPromotion

public void removeCustomersFromPromotion(java.lang.String sessionId,
                                         AdminCustomer[] customers,
                                         int promotionId)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Remove an array of customers from the promotion identified by the promotionId parameter. If the array is null, then all customers are removed from the promotion.

Specified by:
removeCustomersFromPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
customers - An array of AdminCustomer objects
promotionId - The numeric id of the promotion
Throws:
KKAdminException

removeCustomerGroupsFromPromotion

public void removeCustomerGroupsFromPromotion(java.lang.String sessionId,
                                              int[] groupIds,
                                              int promotionId)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
Remove an array of customer groups from the promotion identified by the promotionId parameter. If the array is null, then all customer groups are removed from the promotion.

Specified by:
removeCustomerGroupsFromPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
groupIds - An array of customer group ids
promotionId - The numeric id of the promotion
Throws:
KKAdminException

removeManufacturersFromPromotion

public void removeManufacturersFromPromotion(java.lang.String sessionId,
                                             AdminManufacturer[] manufacturers,
                                             int promotionId)
                                      throws KKAdminException
Description copied from interface: KKAdminIf
Remove an array of manufacturers from the promotion identified by the promotionId parameter. If the array is null, then all manufacturers are removed from the promotion.

Specified by:
removeManufacturersFromPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
manufacturers - An array of AdminManufacturer objects
promotionId - The numeric id of the promotion
Throws:
KKAdminException

removeExpressionsFromPromotion

public void removeExpressionsFromPromotion(java.lang.String sessionId,
                                           AdminExpression[] expressions,
                                           int promotionId)
                                    throws KKAdminException
Description copied from interface: KKAdminIf
Remove an array of expressions from the promotion identified by the promotionId parameter. If the array is null, then all expressions are removed from the promotion.

Specified by:
removeExpressionsFromPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
expressions - An array of AdminExpression objects
promotionId - The numeric id of the promotion
Throws:
KKAdminException

removeProductsFromPromotion

public void removeProductsFromPromotion(java.lang.String sessionId,
                                        AdminProduct[] products,
                                        int promotionId)
                                 throws KKAdminException
Description copied from interface: KKAdminIf
Remove an array of products from the promotion identified by the promotionId parameter. If the array is null, then all products are removed from the promotion.

Specified by:
removeProductsFromPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
products - An array of AdminProduct objects
promotionId - The numeric id of the promotion
Throws:
KKAdminException

removeGiftCertificatesFromPromotion

public void removeGiftCertificatesFromPromotion(java.lang.String sessionId,
                                                AdminProduct[] giftCertificates,
                                                int promotionId)
                                         throws KKAdminException
Description copied from interface: KKAdminIf
Remove an array of gift certificate products from the promotion identified by the promotionId parameter. If the array is null, then all gift certificate products are removed from the promotion.

Specified by:
removeGiftCertificatesFromPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
giftCertificates - An array of AdminProduct objects
promotionId - The numeric id of the promotion
Throws:
KKAdminException

getRelatedProducts

public AdminProducts getRelatedProducts(java.lang.String sessionId,
                                        AdminDataDescriptor dataDesc,
                                        int productId,
                                        int relationType,
                                        int languageId)
                                 throws KKAdminException
Description copied from interface: KKAdminIf
Find products related to the product defined by the productId parameter. The relationType defines the relation.

Valid values for relationType are:

Specified by:
getRelatedProducts in interface KKAdminIf
Parameters:
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 language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
AdminProducts
Throws:
KKAdminException

getRelatedProductsWithOptions

public AdminProducts getRelatedProductsWithOptions(java.lang.String sessionId,
                                                   AdminDataDescriptor dataDesc,
                                                   int productId,
                                                   int relationType,
                                                   int languageId,
                                                   AdminProductMgrOptions mgrOptions)
                                            throws KKAdminException
Description copied from interface: KKAdminIf
Find products related to the product defined by the productId parameter. The relationType defines the relation.

Valid values for relationType are:

Specified by:
getRelatedProductsWithOptions in interface KKAdminIf
Parameters:
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 language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
mgrOptions - Allows you to define whether the quantity and prices can have different values depending on the catalogId. May be set to null.
Returns:
AdminProducts
Throws:
KKAdminException

removeRelatedProducts

public void removeRelatedProducts(java.lang.String sessionId,
                                  int productId,
                                  int relationType)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Removes related products from the product defined by productId. If relationType == 0, then all related products are removed.

Valid values for relationType are:

Specified by:
removeRelatedProducts in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
productId - The numeric id of the product
Throws:
KKAdminException

addRelatedProducts

public void addRelatedProducts(java.lang.String sessionId,
                               AdminProduct[] products,
                               int productId,
                               int relationType)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of products to the product defined by productId. The relation type is specified by relationType and may take one of the following values:

Specified by:
addRelatedProducts in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
products - An array of AdminProduct objects
productId - The numeric id of the product
relationType - The type of relationship that the the array of AdminProducts has with the product identified by productId
Throws:
KKAdminException

readFromUrl

public java.lang.String readFromUrl(java.lang.String sessionId,
                                    java.lang.String url)
                             throws KKAdminException
Description copied from interface: KKAdminIf
Reads the resource at the given URL and returns it as a string.

Specified by:
readFromUrl in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
url - The url
Returns:
Returns the resource read at the url, in the form of a string
Throws:
KKAdminException

editOrderReturn

public void editOrderReturn(java.lang.String sessionId,
                            AdminOrderReturn orderRet)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Edits the orderReturn, replacing existing data with data in the orderRet parameter.

Specified by:
editOrderReturn in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
orderRet - AdminOrderReturn object
Throws:
KKAdminException

insertOrderReturn

public int insertOrderReturn(java.lang.String sessionId,
                             AdminOrderReturn orderRet)
                      throws KKAdminException
Description copied from interface: KKAdminIf
Insert an AdminOrderReturn object and its array of AdminOrderReturnProduct objects

Specified by:
insertOrderReturn in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
orderRet - An AdminOrderReturn object
Returns:
The id of the newly created object
Throws:
KKAdminException

deleteOrderReturn

public void deleteOrderReturn(java.lang.String sessionId,
                              int orderRetId)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Delete the AdminOrderReturn object and any associated AdminOrderReturnProduct objects.

Specified by:
deleteOrderReturn in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
orderRetId - The id of the AdminOrderReturn object
Throws:
KKAdminException

getOrderReturns

public AdminOrderReturnSearchResult getOrderReturns(java.lang.String sessionId,
                                                    AdminOrderReturnSearch retSearch,
                                                    int offset,
                                                    int size)
                                             throws KKAdminException
Description copied from interface: KKAdminIf
Search for OrderReturn objects with search criteria and order by criteria.

Specified by:
getOrderReturns in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
retSearch - An object that defines the search parameters
offset - the offset in the database
size - the number of records from the specified offset
Returns:
Returns an AdminOrderReturnSearchResult object
Throws:
KKAdminException

getSku

public java.lang.String getSku(java.lang.String sessionId,
                               AdminOrderProduct orderProd)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Get the SKU for an orderProduct object. If it has no options we look directly for the SKU in the product table. Otherwise we look in the productQuantities table. If we can't find it there, then we look in the product table.

Specified by:
getSku in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
orderProd - An AdminOrderProduct object
Returns:
Returns the SKU for the OrderProduct
Throws:
KKAdminException

getSkus

public java.lang.String[] getSkus(java.lang.String sessionId,
                                  AdminOrderProduct[] orderProds)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Get the SKUs for an array AdminOrderProduct objects. If a product has no options we look directly for the SKU in the product table. Otherwise we look in the productQuantities table. If we can't find it there, then we look in the product table.

Specified by:
getSkus in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
orderProds - An array of AdminOrderProduct objects
Returns:
Returns an array of SKUs for the OrderProduct array
Throws:
KKAdminException

doesCustomerExistForEmail

public boolean doesCustomerExistForEmail(java.lang.String sessionId,
                                         java.lang.String emailAddr)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Checks to see whether a customer already exists with this email address.

Specified by:
doesCustomerExistForEmail in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
emailAddr - The email address of the customer
Returns:
Returns true if a customer exists for the email address
Throws:
KKAdminException

getAuditData

public AdminAuditSearchResult getAuditData(java.lang.String sessionId,
                                           AdminAuditSearch retSearch,
                                           int offset,
                                           int size)
                                    throws KKAdminException
Description copied from interface: KKAdminIf
Retrieve audit data from the database. Search constraints can be set in the AdminAuditSearch object which is passed in as a parameter.

Specified by:
getAuditData in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
retSearch - An object that defines the search parameters
offset - the offset in the database
size - the number of records from the specified offset
Returns:
Returns an AdminAuditSearchResult object
Throws:
KKAdminException

importAudit

public int importAudit(java.lang.String sessionId,
                       AdminAudit audit)
                throws KKAdminException
Description copied from interface: KKAdminIf
Imports an audit object. Used for loading auditing records from another system. It by-passes the normal auditing and inserts auditing records unchanged.

Specified by:
importAudit in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
Returns:
Returns the id of the new Audit Object
Throws:
KKAdminException

deleteAuditData

public void deleteAuditData(java.lang.String sessionId,
                            AdminAuditSearch delSearch)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Delete audit data from the database. Search constraints can be set in the AdminAuditSearch object which is passed in as a parameter in order to filter the data to delete.

Specified by:
deleteAuditData in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
delSearch - AdminAuditSearch object to filter the datato be deleted
Throws:
KKAdminException

getRolesPerSessionId

public AdminRole[] getRolesPerSessionId(java.lang.String sessionId)
                                 throws KKAdminException
Description copied from interface: KKAdminIf
Retrieves an array of AdminRole objects for the user logged in with the session id. Each AdminRole object will contain an array of AdminPanel objects and AdminApiCall objects, if defined.

Specified by:
getRolesPerSessionId in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
Returns:
Returns an array of AdminRole objects
Throws:
KKAdminException

getRolesPerUser

public AdminRole[] getRolesPerUser(java.lang.String sessionId,
                                   int userId)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Retrieves an array of AdminRole objects for the user identified by the userId parameter. Each AdminRole object will contain an array of AdminPanel objects and AdminApiCall objects, if defined.

Specified by:
getRolesPerUser in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
userId - The numeric id of the user
Returns:
Returns an array of AdminRole objects
Throws:
KKAdminException

addRolesToUser

public void addRolesToUser(java.lang.String sessionId,
                           AdminRole[] roles,
                           int userId)
                    throws KKAdminException
Description copied from interface: KKAdminIf
Adds the array of AdminRole objects to the user identified by the userId parameter. The roles must already exist in the database.

Specified by:
addRolesToUser in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
roles - An array of AdminRole objects
userId - The numeric id of the user
Throws:
KKAdminException

removeRolesFromUser

public void removeRolesFromUser(java.lang.String sessionId,
                                AdminRole[] roles,
                                int userId)
                         throws KKAdminException
Description copied from interface: KKAdminIf
Removes the array of AdminRole objects from the user identified by the userId parameter.

Specified by:
removeRolesFromUser in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
roles - An array of AdminRole objects
userId - The numeric user id
Throws:
KKAdminException

removePanelsFromRole

public void removePanelsFromRole(java.lang.String sessionId,
                                 AdminPanel[] panels,
                                 int roleId)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Removes the array of AdminPanel objects from the role identified by the roleId parameter.

Specified by:
removePanelsFromRole in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
panels - An array of AdminPanel objects
roleId - The id of the Role
Throws:
KKAdminException

removeApiCallsFromRole

public void removeApiCallsFromRole(java.lang.String sessionId,
                                   AdminApiCall[] apiCalls,
                                   int roleId)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Removes the array of AdminApiCall objects from the role identified by the roleId parameter.

Specified by:
removeApiCallsFromRole in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
apiCalls - An array of AdminApiCall objects
roleId - The id of the Role
Throws:
KKAdminException

addPanelsToRole

public void addPanelsToRole(java.lang.String sessionId,
                            AdminPanel[] panels,
                            int roleId)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Adds the array of AdminPanel objects to the role identified by the roleId parameter. The panel identified by panelId for each panel, and the role identified by the roleId, must already exist in the database. The panel name and description are ignored. If the association already exists, then it is updated with the new AdminPanel values.

Specified by:
addPanelsToRole in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
panels - An array of AdminPanel objects
roleId - The numeric id of the Role
Throws:
KKAdminException

addApiCallsToRole

public void addApiCallsToRole(java.lang.String sessionId,
                              AdminApiCall[] apiCalls,
                              int roleId)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Adds the array of AdminApiCall objects to the role identified by the roleId parameter. The apiCall identified by apiCallId for each apiCall, and the role identified by the roleId, must already exist in the database. The apiCall name and description are ignored.

Specified by:
addApiCallsToRole in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
apiCalls - An array of AdminApiCall objects
roleId - The id of the Role
Throws:
KKAdminException

getPanelsPerRole

public AdminPanel[] getPanelsPerRole(java.lang.String sessionId,
                                     int roleId)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Retrieves an array of AdminPanel objects for the role identified by the roleId parameter.

Specified by:
getPanelsPerRole in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
roleId - The id of the Role
Returns:
Returns an array of AdminPanel objects
Throws:
KKAdminException

getApiCallsPerRole

public AdminApiCall[] getApiCallsPerRole(java.lang.String sessionId,
                                         int roleId)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Retrieves an array of AdminApiCall objects for the role identified by the roleId parameter.

Specified by:
getApiCallsPerRole in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
roleId - The id of the Role
Returns:
Returns an array of AdminApiCall objects
Throws:
KKAdminException

getAllPanels

public AdminPanel[] getAllPanels(java.lang.String sessionId)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of all panels in the database.

Specified by:
getAllPanels in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
Returns:
Returns an array of AdminPanel objects
Throws:
KKAdminException

getAllApiCalls

public AdminApiCall[] getAllApiCalls(java.lang.String sessionId)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of all apiCalls in the database.

Specified by:
getAllApiCalls in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
Returns:
Returns an array of AdminApiCall objects
Throws:
KKAdminException

getAllRoles

public AdminRole[] getAllRoles(java.lang.String sessionId)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of all Roles in the database.

Specified by:
getAllRoles in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
Returns:
Returns an array of AdminRole objects
Throws:
KKAdminException

editRole

public void editRole(java.lang.String sessionId,
                     AdminRole role)
              throws KKAdminException
Description copied from interface: KKAdminIf
Edit a Role. Only the role name and the role description can be modified. All other attributes are ignored.

Specified by:
editRole in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
role - AdminRole object
Throws:
KKAdminException

insertRole

public int insertRole(java.lang.String sessionId,
                      AdminRole role)
               throws KKAdminException
Description copied from interface: KKAdminIf
Insert a new Role. The role name is mandatory.

Specified by:
insertRole in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
role - The AdminRole object
Returns:
Returns the id of the inserted AdminRole object
Throws:
KKAdminException

deleteRole

public void deleteRole(java.lang.String sessionId,
                       int roleId)
                throws KKAdminException
Description copied from interface: KKAdminIf
Deletes the role identified by the roleId parameter. All customers_to_role, role_to_panel and role_to_api_call records are also deleted.

Specified by:
deleteRole in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
roleId - The id of the Role
Throws:
KKAdminException

deletePanel

public void deletePanel(java.lang.String sessionId,
                        int panelId)
                 throws KKAdminException
Description copied from interface: KKAdminIf
Deletes the panel identified by the panelId parameter. All role_to_panel records are also deleted.

Specified by:
deletePanel in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
panelId - The numeric id of the panel
Throws:
KKAdminException

deleteApiCall

public void deleteApiCall(java.lang.String sessionId,
                          int apiCallId)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Deletes the apiCall identified by the apiCallId parameter. All role_to_api_call records are also deleted.

Specified by:
deleteApiCall in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
apiCallId - The numeric id of the ApiCall
Throws:
KKAdminException

editPanel

public void editPanel(java.lang.String sessionId,
                      AdminPanel panel)
               throws KKAdminException
Description copied from interface: KKAdminIf
Edit a Panel. Only the panel code and the panel description can be modified. All other attributes are ignored.

Specified by:
editPanel in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
panel - AdminPanel object
Throws:
KKAdminException

editApiCall

public void editApiCall(java.lang.String sessionId,
                        AdminApiCall apiCall)
                 throws KKAdminException
Description copied from interface: KKAdminIf
Edit an ApiCall. Only the apiCall name and the apiCall description can be modified. All other attributes are ignored.

Specified by:
editApiCall in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
apiCall - An AdminApiCall object
Throws:
KKAdminException

getPanel

public AdminPanel getPanel(java.lang.String sessionId,
                           int panelId)
                    throws KKAdminException
Description copied from interface: KKAdminIf
Returns the AdminPanel referenced by the panelId.

Specified by:
getPanel in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
panelId - The numeric id of the AdminPanel object
Returns:
Returns an AdminPanel object
Throws:
KKAdminException

getApiCall

public AdminApiCall getApiCall(java.lang.String sessionId,
                               int apiCallId)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Returns the AdminApiCall referenced by the apiCallId.

Specified by:
getApiCall in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
apiCallId - The numeric id of the AdminApiCall object
Returns:
Returns an AdminApiCall object
Throws:
KKAdminException

getRole

public AdminRole getRole(java.lang.String sessionId,
                         int roleId)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Returns the AdminRole referenced by the roleId.

Specified by:
getRole in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
roleId - The id of the Role
Returns:
Returns an AdminRole object
Throws:
KKAdminException

insertPanel

public int insertPanel(java.lang.String sessionId,
                       AdminPanel panel)
                throws KKAdminException
Description copied from interface: KKAdminIf
Insert a new Panel. The panel code is mandatory and the panel description is optional. All other attributes are ignored.

Specified by:
insertPanel in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
panel - An AdminPanel object
Returns:
Returns the id of the inserted AdminPanel object
Throws:
KKAdminException

insertApiCall

public int insertApiCall(java.lang.String sessionId,
                         AdminApiCall apiCall)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Insert a new ApiCall. The apiCall name is mandatory and the apiCall description is optional. All other attributes are ignored.

Specified by:
insertApiCall in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
apiCall - An AdminApiCall object
Returns:
Returns the id of the inserted AdminApiCall object
Throws:
KKAdminException

insertDigitalDownload

public void insertDigitalDownload(java.lang.String sessionId,
                                  int customerId,
                                  int productId)
                           throws KKAdminException
Description copied from interface: KKAdminIf
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.

Specified by:
insertDigitalDownload in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
customerId - The numeric id of the customer
productId - The numeric id of the product
Throws:
KKAdminException

sendTemplateEmailToCustomers

public void sendTemplateEmailToCustomers(java.lang.String sessionId,
                                         AdminCustomerSearch custSearch,
                                         java.lang.String templateName,
                                         java.lang.Object obj1,
                                         java.lang.Object obj2,
                                         java.lang.Object obj3,
                                         java.lang.Object obj4,
                                         java.lang.Object obj5,
                                         int numEmailThreads)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
An email is sent to the customers which are found based on the selection criteria set in the AdminCustomerSearch object.

The email is generated by the template called templateName and the objects obj1-obj5 are passed to the template. The current AdminCustomer object is also passed to the Velocity template with the name "cust". The subject of the eMail is picked up from the first line of the template. obj1-obj5 can be any object that you wish to extract data from to place into the eMail. For example you could look up a number of special offers from the database and set obj1 to an array of products containing these special offers.

The individual emails are sent using a thread pool with a maximum number of threads that is defined by numEmailThreads.

Note that this method is not available via the SOAP Web Service interface because of problems with the serialization of parameters of type object. Please use sendTemplateEmailToCustomers1() instead.

A log called SendTemplateEmail.log is created, containing a list of the eMail addresses used.

Specified by:
sendTemplateEmailToCustomers in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
custSearch - The AdminCustomerSearch object which determines the customers that are selected.
templateName - The name of the template. The "country code" and ".vm" will be appended automatically. i.e. If the template name is newsletter and the country code is en, then we will look for a file called newsletter_en.vm. This file should be in the classpath.
obj1 - This object will be passed to the velocity template with the name "obj1".
obj2 - This object will be passed to the velocity template with the name "obj2".
obj3 - This object will be passed to the velocity template with the name "obj3".
obj4 - This object will be passed to the velocity template with the name "obj4".
obj5 - This object will be passed to the velocity template with the name "obj5".
numEmailThreads - The maximum number of concurrent threads used by the thread pool to send the eMails. If set to 0 or to a negative value, it is ignored.
Throws:
KKAdminException

sendTemplateEmailToCustomersWithOptions

public void sendTemplateEmailToCustomersWithOptions(java.lang.String sessionId,
                                                    AdminCustomerSearch custSearch,
                                                    java.lang.String templateName,
                                                    java.lang.Object obj1,
                                                    java.lang.Object obj2,
                                                    java.lang.Object obj3,
                                                    java.lang.Object obj4,
                                                    java.lang.Object obj5,
                                                    int numEmailThreads,
                                                    AdminEmailOptions options)
                                             throws KKAdminException
Description copied from interface: KKAdminIf
This method has the same functionality as sendTemplateEmailToCustomers() except that it includes an extra options object to enhance the available functionality. Currently the options object allows you to add an array of AdminNameValue pair objects used to pass custom information to the Velocity engine. The value can be retrieved from the template using the name preceded by the $ sign. e.g. If a name value pair contains StoreId and 22, the value 22 will be displayed in the eMail where the template contains $StoreId.

A log called SendTemplateEmail.log is created, containing a list of the eMail addresses used.

Specified by:
sendTemplateEmailToCustomersWithOptions in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
custSearch - The AdminCustomerSearch object which determines the customers that are selected.
templateName - The name of the template. The "country code" and ".vm" will be appended automatically. i.e. If the template name is newsletter and the country code is en, then we will look for a file called newsletter_en.vm. This file should be in the classpath.
obj1 - This object will be passed to the velocity template with the name "obj1".
obj2 - This object will be passed to the velocity template with the name "obj2".
obj3 - This object will be passed to the velocity template with the name "obj3".
obj4 - This object will be passed to the velocity template with the name "obj4".
obj5 - This object will be passed to the velocity template with the name "obj5".
numEmailThreads - The maximum number of concurrent threads used by the thread pool to send the eMails. If set to 0 or to a negative value, it is ignored.
options - An object used to configure options used when sending eMails from the AdminApp
Throws:
KKAdminException

sendTemplateEmailToCustomers1

public void sendTemplateEmailToCustomers1(java.lang.String sessionId,
                                          AdminCustomerSearch custSearch,
                                          java.lang.String templateName,
                                          java.lang.String message,
                                          AdminProduct[] products,
                                          AdminOrder[] orders,
                                          AdminManufacturer[] manufacturers,
                                          AdminCategory[] categories,
                                          int numEmailThreads)
                                   throws KKAdminException
Description copied from interface: KKAdminIf
An email is sent to the customers which are found based on the selection criteria set in the AdminCustomerSearch object. This method actually calls sendTemplateEmailToCustomers() and is just a more specific implementation where arrays of defined objects are passed to the Velocity template rather than java.lang.Object which cannot be serialized for use in a Web Service interface.

The email is generated by the template called templateName and the message, arrays of products, orders, manufacturers and categories are passed to the template. The current AdminCustomer object is also passed to the Velocity template with the name "cust". The subject of the eMail is picked up from the first line of the template. The message and arrays passed to the template can be set to null if not required.

The individual emails are sent using a thread pool with a maximum number of threads that is defined by numEmailThreads.

A log called SendTemplateEmail.log is created, containing a list of the eMail addresses used.

Specified by:
sendTemplateEmailToCustomers1 in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
custSearch - The AdminCustomerSearch object which determines the customers that are selected.
templateName - The name of the template. The "country code" and ".vm" will be appended automatically. i.e. If the template name is newsletter and the country code is en, then we will look for a file called newsletter_en.vm. This file should be in the classpath.
message - This message will be passed to the velocity template with the name "obj1".
products - This products will be passed to the velocity template with the name "obj2".
orders - This orders will be passed to the velocity template with the name "obj3".
manufacturers - This manufacturers will be passed to the velocity template with the name "obj4".
categories - This categories will be passed to the velocity template with the name "obj5".
numEmailThreads - The maximum number of concurrent threads used by the thread pool to send the eMails. If set to 0 or to a negative value, it is ignored.
Throws:
KKAdminException

sendTemplateEmailToCustomers1WithOptions

public void sendTemplateEmailToCustomers1WithOptions(java.lang.String sessionId,
                                                     AdminCustomerSearch custSearch,
                                                     java.lang.String templateName,
                                                     java.lang.String message,
                                                     AdminProduct[] products,
                                                     AdminOrder[] orders,
                                                     AdminManufacturer[] manufacturers,
                                                     AdminCategory[] categories,
                                                     int numEmailThreads,
                                                     AdminEmailOptions options)
                                              throws KKAdminException
Description copied from interface: KKAdminIf
This method has the same functionality as sendTemplateEmailToCustomers1() except that it includes an extra options object to enhance the available functionality. Currently the options object allows you to:

A log called SendTemplateEmail.log is created, containing a list of the eMail addresses used.

Specified by:
sendTemplateEmailToCustomers1WithOptions in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
custSearch - The AdminCustomerSearch object which determines the customers that are selected.
templateName - The name of the template. The "country code" and ".vm" will be appended automatically. i.e. If the template name is newsletter and the country code is en, then we will look for a file called newsletter_en.vm. This file should be in the classpath.
message - This message will be passed to the velocity template with the name "obj1".
products - This products will be passed to the velocity template with the name "obj2".
orders - This orders will be passed to the velocity template with the name "obj3".
manufacturers - This manufacturers will be passed to the velocity template with the name "obj4".
categories - This categories will be passed to the velocity template with the name "obj5".
numEmailThreads - The maximum number of concurrent threads used by the thread pool to send the eMails. If set to 0 or to a negative value, it is ignored.
options - An object used to configure options used when sending eMails from the AdminApp
Throws:
KKAdminException

insertProductNotification

public void insertProductNotification(java.lang.String sessionId,
                                      AdminProductNotification apn)
                               throws KKAdminException
Description copied from interface: KKAdminIf
Insert a Product Notification record for the specified customer and product.

Specified by:
insertProductNotification in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
apn - An AdminProductNotification object
Throws:
KKAdminException

deleteProductNotification

public void deleteProductNotification(java.lang.String sessionId,
                                      AdminProductNotification apn)
                               throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Product Notification record for the specified customer and product if it's found.

Specified by:
deleteProductNotification in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
apn - An AdminProductNotification object
Throws:
KKAdminException

getCustomerForEmail

public AdminCustomer getCustomerForEmail(java.lang.String sessionId,
                                         java.lang.String emailAddress)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Find and return a customer with an email address matching the emailAddress parameter.

Specified by:
getCustomerForEmail in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
emailAddress - The eMail address of the customer
Returns:
Returns an AdminCustomer object or null if no customer exists
Throws:
KKAdminException

editOrder

public void editOrder(java.lang.String sessionId,
                      AdminOrder order)
               throws KKAdminException
Description copied from interface: KKAdminIf
Edit an existing order.

This method only allows you to edit certain attributes of an order. In order to change the order status you must use updateOrderStatus().

The attributes that can be modified are:

Attributes containing null values will be ignored. In order to clear a String attribute, you must set it to an empty string.

Specified by:
editOrder in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
order - The AdminOrder object to be edited
Throws:
KKAdminException

setCreditCardDetailsOnOrder

public void setCreditCardDetailsOnOrder(java.lang.String sessionId,
                                        AdminCreditCard creditCard)
                                 throws KKAdminException
Description copied from interface: KKAdminIf
Set Credit Card details on an existing order.

This method only allows you to update the credit card details on an order. In order to change the order status you must use updateOrderStatus().

The Credit Card details are only saved if the ability to save credit card details is enabled in the configuration of the store.

The orderId must be specified as the id on the AdminCreditCard object.

The following Credit Card attributes can be saved (on the CreditCard object):

Specified by:
setCreditCardDetailsOnOrder in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
creditCard - An AdminCreditCard object containing all of the credit card details
Throws:
KKAdminException

custom

public java.lang.String custom(java.lang.String input1,
                               java.lang.String input2)
                        throws KKAdminException
Description copied from interface: KKAdminIf
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 KKAdminIf
Parameters:
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:
KKAdminException

customSecure

public java.lang.String customSecure(java.lang.String sessionId,
                                     java.lang.String input1,
                                     java.lang.String input2)
                              throws KKAdminException
Description copied from interface: KKAdminIf
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 KKAdminIf
Parameters:
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:
KKAdminException

getBundleProductDetails

public AdminProduct getBundleProductDetails(java.lang.String sessionId,
                                            int bundleId,
                                            AdminProduct[] bundledProducts,
                                            AdminDiscount discount)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
This method is used to calculate some attributes of a bundle product based on the products that the bundle contains.

Specified by:
getBundleProductDetails in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
bundleId - If set to a positive value, we search for all of the products in the bundle, starting from this id of the bundle product.
bundledProducts - If bundleId is less than zero, we use the products in this array otherwise it is ignored. Each product should have the bundledProdQuantity attribute set to the number of times that it appears in the bundle. If a product in the bundle has a certain configuration (i.e. Size = small, color = red) then the encodedOptionValues attribute should contain the encoded option values. The format of the encodeOptionValues is 1{2}3{4} where the first optionId / valueId pair have ids of 1,2 and the 2nd optionId / valueId pair have ids of 3,4.
discount - The discount to apply which can be an amount or a percentage
Returns:
Returns an AdminProduct object which has calculated values for prices, weight and quantity.
Throws:
KKAdminException

deleteTag

public void deleteTag(java.lang.String sessionId,
                      int id)
               throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Tag object. This will remove this tag from all Tag Groups that it was in.

Specified by:
deleteTag in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
id - the id of the AdminTag to delete
Throws:
KKAdminException

deleteTagGroup

public void deleteTagGroup(java.lang.String sessionId,
                           int id)
                    throws KKAdminException
Description copied from interface: KKAdminIf
Delete a TagGroup object

Specified by:
deleteTagGroup in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
id - the id of the AdminTagGroup to delete
Throws:
KKAdminException

getTagGroups

public AdminTagGroupSearchResult getTagGroups(java.lang.String sessionId,
                                              AdminSearch search,
                                              int offset,
                                              int size)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
Return the TagGroup objects defined by the search criteria. If the includeChildren attribute on the AdminSearch is true we also populate the Tag children on the TagGroup objects.

Specified by:
getTagGroups in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
search - the generic Admin search object that defines the tag group objects to search for. If null we use the default AdminSearch object
offset - starting offset in database - so that you can page through results
size - size of the group that will be returned - the maximum number of records returned
Returns:
an AdminTagSearchResult object
Throws:
KKAdminException

getTags

public AdminTagSearchResult getTags(java.lang.String sessionId,
                                    AdminSearch search,
                                    int offset,
                                    int size)
                             throws KKAdminException
Description copied from interface: KKAdminIf
Return the Tag objects defined by the search criteria. If the includeChildren attribute on the AdminSearch is true we also populate the TagGroup children on the Tag objects.

Specified by:
getTags in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
search - the generic Admin search object that defines the tag objects to search for. If null we use the default AdminSearch object.
offset - starting offset in database - so that you can page through results
size - size of the group that will be returned - the maximum number of records returned
Returns:
an AdminTagSearchResult object
Throws:
KKAdminException

getTagGroupToTags

public AdminTagGroupToTag[] getTagGroupToTags(java.lang.String sessionId,
                                              AdminSearch search,
                                              int offset,
                                              int size)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
Return the TagGroupToTag objects defined by the search criteria.

Specified by:
getTagGroupToTags in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
search - the generic Admin search object that defines the tag objects to search for. If null we use the default AdminSearch object. If id is not -1 this is used to define the tag Group Id. If id2 is not -1 this is used to define the tag Id.
offset - starting offset in database - so that you can page through results
size - size of the group that will be returned - the maximum number of records returned
Returns:
an array of AdminTagGroupToTag records
Throws:
KKAdminException

insertTag

public int insertTag(java.lang.String sessionId,
                     AdminTag tag)
              throws KKAdminException
Description copied from interface: KKAdminIf
Insert a new Tag object

Specified by:
insertTag in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tag - the new AdminTag object to insert - do not fill out the Id as this will be created
Returns:
the id of the AdminTag object created
Throws:
KKAdminException

insertTags

public int insertTags(java.lang.String sessionId,
                      AdminTag[] tag)
               throws KKAdminException
Description copied from interface: KKAdminIf
Insert an array of Tag objects - provide a Tag record for each supported language.

Specified by:
insertTags in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tag - the array of AdminTag objects to insert - do not fill out the Id on these as this will be created. It is assumed that all of these tags will have the same ID, and there will be one for each language.
Returns:
the id of the AdminTag object created
Throws:
KKAdminException

insertTagGroup

public int insertTagGroup(java.lang.String sessionId,
                          AdminTagGroup tagGroup)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Insert a new TagGroup object

Specified by:
insertTagGroup in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tagGroup - the new AdminTagGroup object to insert - do not fill out the Id as this will be created
Returns:
the id of the AdminTagGroup object created
Throws:
KKAdminException

insertTagGroups

public int insertTagGroups(java.lang.String sessionId,
                           AdminTagGroup[] tagGroup)
                    throws KKAdminException
Description copied from interface: KKAdminIf
Insert an array of TagGroup objects - provide a TagGroup object for each language

Specified by:
insertTagGroups in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tagGroup - the new AdminTagGroup object to insert - do not fill out the Id on these as this will be created. It is assumed that all of these tagGroups will have the same ID, and there will be one for each language.
Returns:
the id of the AdminTagGroup object created
Throws:
KKAdminException

insertTagGroupToTags

public void insertTagGroupToTags(java.lang.String sessionId,
                                 AdminTagGroupToTag tagGroupToTag)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Insert an AdminTagGroupToTag record

Specified by:
insertTagGroupToTags in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
Throws:
KKAdminException

updateTag

public int updateTag(java.lang.String sessionId,
                     AdminTag tag)
              throws KKAdminException
Description copied from interface: KKAdminIf
Update an existing Tag object - only the Name and the SortOrder can be updated

Specified by:
updateTag in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tag - the AdminTag object to update
Returns:
the id of the AdminTagGroup object updated
Throws:
KKAdminException

updateTagGroup

public int updateTagGroup(java.lang.String sessionId,
                          AdminTagGroup tagGroup)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Update an existing TagGroup object - You can update the name, description and the set of tags associated to the tag group

Specified by:
updateTagGroup in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tagGroup - the AdminTagGroup object to update
Returns:
the id of the AdminTagGroup object updated
Throws:
KKAdminException

addTagGroupsToCategory

public void addTagGroupsToCategory(java.lang.String sessionId,
                                   AdminTagGroup[] tagGroups,
                                   int categoryId)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of AdminTagGroups to the category identified by categoryId. We assume that the category and the tag groups already exist in the database since this method inserts an association between a tag group and a category rather than the actual objects.

Specified by:
addTagGroupsToCategory in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tagGroups - Array of AdminTagGroup objects
categoryId - The id of the category
Throws:
KKAdminException

addCategoriesToTagGroups

public void addCategoriesToTagGroups(java.lang.String sessionId,
                                     int tagGroupId,
                                     int[] categories)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of categories to the tagGroup specified. It is assumed that the categories and the tag group already exist in the database since this method inserts associations between a tag group and the specified categories rather than the actual objects.

Specified by:
addCategoriesToTagGroups in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tagGroupId - the tag group Id to link to the categories
categories - an array of category Ids to link to the Tag Group
Throws:
KKAdminException

addTagsToProduct

public void addTagsToProduct(java.lang.String sessionId,
                             AdminTag[] tags,
                             int productId)
                      throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of AdminTags to the product identified by productId. We assume that the product and the tags already exist in the database since this method inserts an association between a tag and a product rather than the actual objects.

Specified by:
addTagsToProduct in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tags - Array of AdminTag objects
productId - The id of the product
Throws:
KKAdminException

getTagGroupsPerCategory

public AdminTagGroup[] getTagGroupsPerCategory(java.lang.String sessionId,
                                               int categoryId,
                                               int languageId)
                                        throws KKAdminException
Description copied from interface: KKAdminIf
Return an array of AdminTagGroup objects for a category. Each AdminTagGroup is populated with an array of AdminTags 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 KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
categoryId - The id of the category
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
Returns an array of AdminTagGroups
Throws:
KKAdminException

getCategoriesPerTagGroup

public int[] getCategoriesPerTagGroup(java.lang.String sessionId,
                                      int tagGroupId)
                               throws KKAdminException
Description copied from interface: KKAdminIf
Return an array of Category Ids linked to the specified tag group. An empty array is returned if no linked Category objects exist.

Specified by:
getCategoriesPerTagGroup in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tagGroupId - The id of the tag Group
Returns:
Returns an array of Category ids
Throws:
KKAdminException

getCategoriesToTagGroups

public AdminCategoryToTagGroup[] getCategoriesToTagGroups(java.lang.String sessionId)
                                                   throws KKAdminException
Description copied from interface: KKAdminIf
Return an array of all of the AdminCategoryToTagGroup records. An empty array is returned if no such records exist.

Specified by:
getCategoriesToTagGroups in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
Returns:
Returns an array of AdminCategoryToTagGroups
Throws:
KKAdminException

getTagsPerProduct

public AdminTag[] getTagsPerProduct(java.lang.String sessionId,
                                    int productId,
                                    int languageId)
                             throws KKAdminException
Description copied from interface: KKAdminIf
Fetches all of the tags associated with a product.

Specified by:
getTagsPerProduct in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
productId - The id of the product
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
Returns an array of AdminTag objects
Throws:
KKAdminException

removeTagGroupsFromCategory

public void removeTagGroupsFromCategory(java.lang.String sessionId,
                                        AdminTagGroup[] tagGroups,
                                        int categoryId)
                                 throws KKAdminException
Description copied from interface: KKAdminIf
If associations exist between the AdminTagGroups and the category identified by categoryId, then they are removed. If tagGroups is set to null, all associations to the category are removed.

Specified by:
removeTagGroupsFromCategory in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tagGroups - Array of AdminTagGroup objects
categoryId - The id of the category
Throws:
KKAdminException

removeTagsFromProduct

public void removeTagsFromProduct(java.lang.String sessionId,
                                  AdminTag[] tags,
                                  int productId)
                           throws KKAdminException
Description copied from interface: KKAdminIf
If associations exist between the AdminTags and the product identified by productId, then they are removed. If tags is set to null, all associations to the product are removed.

Specified by:
removeTagsFromProduct in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
tags - Array of AdminTag objects
productId - The id of the product
Throws:
KKAdminException

updateCachedConfigurations

public void updateCachedConfigurations(java.lang.String sessionId)
                                throws KKAdminException
Description copied from interface: KKAdminIf
Wherever in the engine any configurations have been cached, they are refreshed when this method is called.

Specified by:
updateCachedConfigurations in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
Throws:
KKAdminException

publishProducts

public void publishProducts(java.lang.String sessionId,
                            AdminPublishConfig adminPublishConfig)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Publish Products to the Data Feed.

Specified by:
publishProducts in interface KKAdminIf
Parameters:
sessionId - Session Id
adminPublishConfig - Defines the data feed parameters
Throws:
KKAdminException

getKonakartPropertyValue

public java.lang.String getKonakartPropertyValue(java.lang.String sessionId,
                                                 java.lang.String section,
                                                 java.lang.String propertyName)
                                          throws KKAdminException
Description copied from interface: KKAdminIf
Returns the property value from the properties file in the specified section

Specified by:
getKonakartPropertyValue in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
section - Properties file section e.g. the first part of the property name ("konakart" or "torque"). Use constants in KonakartAdminConstants, eg. KonakartAdminConstants.PROPERTY_FILE_SECTION_KONAKART or KonakartAdminConstants.PROPERTY_FILE_SECTION_TORQUE etc
propertyName - property name
Returns:
Returns the value of the specified property as a String
Throws:
KKAdminException

addAllProductsToSearchEngine

public void addAllProductsToSearchEngine(java.lang.String sessionId,
                                         boolean async)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Add all products in the KonaKart database to the search engine. If products with identical product ids already exist, they will be updated with the new data.

Specified by:
addAllProductsToSearchEngine in interface KKAdminIf
Parameters:
sessionId - Session Id
async - When set to true, control is immediately returned to the caller and the operation proceeds asynchronously.
Throws:
KKAdminException

addProductToSearchEngine

public void addProductToSearchEngine(java.lang.String sessionId,
                                     int productId)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Add the product referenced by productId to the search engine. If the product already exists, it will be updated.

Specified by:
addProductToSearchEngine in interface KKAdminIf
Parameters:
sessionId - Session Id
productId - The numeric id of the product
Throws:
KKAdminException

removeAllProductsFromSearchEngine

public void removeAllProductsFromSearchEngine(java.lang.String sessionId,
                                              boolean async)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
Remove all products from the search engine.

Specified by:
removeAllProductsFromSearchEngine in interface KKAdminIf
Parameters:
sessionId - Session Id
async - When set to true, control is immediately returned to the caller and the operation proceeds asynchronously on the search engine.
Throws:
KKAdminException

removeProductFromSearchEngine

public void removeProductFromSearchEngine(java.lang.String sessionId,
                                          int productId)
                                   throws KKAdminException
Description copied from interface: KKAdminIf
Remove the product referenced by productId from the search engine.

Specified by:
removeProductFromSearchEngine in interface KKAdminIf
Parameters:
sessionId - Session Id
productId - The numeric id of the product
Throws:
KKAdminException

insertConfigurationGroup

public int insertConfigurationGroup(java.lang.String sessionId,
                                    AdminConfigurationGroup configGroup)
                             throws KKAdminException
Description copied from interface: KKAdminIf
Insert a configuration group.

Specified by:
insertConfigurationGroup in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
configGroup - an AdminConfigurationGroup object to insert
Returns:
Returns the primary key of the configuration group that was inserted
Throws:
KKAdminException

insertConfiguration

public int insertConfiguration(java.lang.String sessionId,
                               KKConfiguration config)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Insert a configuration object.

Specified by:
insertConfiguration in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
config - a KKConfiguration object to insert
Returns:
Returns the primary key of the configuration object that was inserted
Throws:
KKAdminException

deleteMallStore

public void deleteMallStore(java.lang.String sessionId,
                            java.lang.String storeId)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Deletes an AdminStore object. (It isn't actually deleted from the database - it is merely marked as "deleted").

Multi-Store Single DB only

Specified by:
deleteMallStore in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
storeId - the StoreId of the store to delete
Throws:
KKAdminException

getMallStores

public AdminStoreSearchResult getMallStores(AdminStoreSearch search,
                                            int offset,
                                            int size)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
Get the stores in the mall supported by the server - Multi-Store Single DB only.

Specified by:
getMallStores in interface KKAdminIf
Parameters:
search - search definition for stores
offset - offset in results (for paging)
size - maximum number of records to return from the offset (for paging)
Returns:
an AdminStoreSearchResult object
Throws:
KKAdminException

insertMallStore

public void insertMallStore(java.lang.String sessionId,
                            AdminStore store)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Insert a new store into the mall.

Multi-Store Single DB only

Specified by:
insertMallStore in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
store - a new Store object to insert (all attributes should be filled in, including storeId)
Throws:
KKAdminException

cloneStore

public void cloneStore(java.lang.String sessionId,
                       AdminNewStoreOptions options,
                       java.lang.String storeToCloneId,
                       AdminStore newStore)
                throws KKAdminException
Description copied from interface: KKAdminIf
Insert a new store into the mall by cloning a specified store.

Multi-Store Single DB only.

Specified by:
cloneStore in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
options - Some options for defining how to execute the clone
storeToCloneId - the store the will be cloned to make the new store
newStore - the new store
Throws:
KKAdminException

updateMallStore

public void updateMallStore(java.lang.String sessionId,
                            AdminStore store)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Updates an AdminStore object. (All fields (except the storeId which is the key) can be updated).

Multi-Store Single DB only

Specified by:
updateMallStore in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
store - The AdminStore object to update
Throws:
KKAdminException

doesMallStoreExist

public boolean doesMallStoreExist(java.lang.String storeId)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Does the specified store exist?

Multi-Store Single DB only

Specified by:
doesMallStoreExist in interface KKAdminIf
Parameters:
storeId - The StoreId of the store to check
Returns:
true if the store already exists, otherwise false
Throws:
KKAdminException

setProductQuantity

public void setProductQuantity(java.lang.String sessionId,
                               java.lang.String sku,
                               int id,
                               int quantity,
                               int operation)
                        throws KKAdminException
Description copied from interface: KKAdminIf
A method that allows you to modify the quantity of a product through the API without needing to fetch the complete product and edit it.

The product may be identified by the product id or the SKU. When set to a valid value, the SKU is used and the product id is ignored. When the SKU is set to null, the product id is used to identify the product. Note that the SKU should always be used in cases where a single product has many variations such as color and size.

The quantity parameter may be used to set the new quantity, to reduce the quantity by its value or to increase the quantity by its value. In other words it can replace the current quantity, be subtracted or added to the current quantity. The operation parameter determines which operation is performed.

Valid values are:

Specified by:
setProductQuantity in interface KKAdminIf
Parameters:
sessionId - Session Id
sku - The SKU of the product. If set to null, the product id is used.
id - The product id. Only used if the SKU is set to null.
quantity - The new quantity
operation - Determines whether to set, add or subtract the quantity. See above for valid values.
Throws:
KKAdminException

setProductQuantityWithOptions

public void setProductQuantityWithOptions(java.lang.String sessionId,
                                          java.lang.String sku,
                                          int id,
                                          int quantity,
                                          int operation,
                                          AdminProductMgrOptions mgrOptions)
                                   throws KKAdminException
Description copied from interface: KKAdminIf
A method that allows you to modify the quantity of a product through the API without needing to fetch the complete product and edit it.

The product may be identified by the product id or the SKU. When set to a valid value, the SKU is used and the product id is ignored. When the SKU is set to null, the product id is used to identify the product. Note that the SKU should always be used in cases where a single product has many variations such as color and size.

The quantity parameter may be used to set the new quantity, to reduce the quantity by its value or to increase the quantity by its value. In other words it can replace the current quantity, be subtracted or added to the current quantity. The operation parameter determines which operation is performed.

Valid values are:

The mgrOptions object allows you to define whether the quantity can have different values depending on the catalogId. It may be set to null.

Specified by:
setProductQuantityWithOptions in interface KKAdminIf
Parameters:
sessionId - Session Id
sku - The SKU of the product. If set to null, the product id is used.
id - The product id. Only used if the SKU is set to null.
quantity - The new quantity
operation - Determines whether to set, add or subtract the quantity. See above for valid values.
mgrOptions - Allows you to define whether the quantity can have different values depending on the catalogId. May be set to null.
Throws:
KKAdminException

setProductAvailability

public void setProductAvailability(java.lang.String sessionId,
                                   java.lang.String sku,
                                   int id,
                                   java.util.Calendar dateAvailable)
                            throws KKAdminException
Description copied from interface: KKAdminIf
A method that allows you to modify the date when a product will be available, through the API without needing to fetch the complete product and edit it.

The product may be identified by the product id or the SKU. When set to a valid value, the SKU is used and the product id is ignored. When the SKU is set to null, the product id is used to identify the product. Note that the SKU should always be used in cases where a single product has many variations such as color and size.

Specified by:
setProductAvailability in interface KKAdminIf
Parameters:
sessionId - Session Id
sku - The SKU of the product. If set to null, the product id is used.
id - The product id. Only used if the SKU is set to null.
dateAvailable - The date when the product will be available
Throws:
KKAdminException

setProductAvailabilityWithOptions

public void setProductAvailabilityWithOptions(java.lang.String sessionId,
                                              java.lang.String sku,
                                              int id,
                                              java.util.Calendar dateAvailable,
                                              AdminProductMgrOptions mgrOptions)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
A method that allows you to modify the date when a product will be available, through the API without needing to fetch the complete product and edit it.

The product may be identified by the product id or the SKU. When set to a valid value, the SKU is used and the product id is ignored. When the SKU is set to null, the product id is used to identify the product. Note that the SKU should always be used in cases where a single product has many variations such as color and size.

The mgrOptions object allows you to define whether the availability date can have different values depending on the catalogId. It may be set to null.

Specified by:
setProductAvailabilityWithOptions in interface KKAdminIf
Parameters:
sessionId - Session Id
sku - The SKU of the product. If set to null, the product id is used.
id - The product id. Only used if the SKU is set to null.
dateAvailable - The date when the product will be available
mgrOptions - Allows you to define whether the availability date can have different values depending on the catalogId. May be set to null.
Throws:
KKAdminException

getProductAvailability

public java.util.Calendar getProductAvailability(java.lang.String sessionId,
                                                 java.lang.String sku,
                                                 int id)
                                          throws KKAdminException
Description copied from interface: KKAdminIf
A method that directly returns the date when a product will be available. In the case of a simple product, an alternative way could be to find the product and read the dateAvailable attribute. However, when the product has variations such as color and size, identified by different SKUs, the procedure for retrieving the date available is more complicated and so this API call comes to the rescue.

The product may be identified by the product id or the SKU. When set to a valid value, the SKU is used and the product id is ignored. When the SKU is set to null, the product id is used to identify the product. Note that the SKU should always be used in cases where a single product has many variations such as color and size.

Specified by:
getProductAvailability in interface KKAdminIf
Parameters:
sessionId - Session Id
sku - The SKU of the product. If set to null, the product id is used.
id - The product id. Only used if the SKU is set to null.
Returns:
Returns the the date when a product will be available
Throws:
KKAdminException

getProductAvailabilityWithOptions

public java.util.Calendar getProductAvailabilityWithOptions(java.lang.String sessionId,
                                                            java.lang.String sku,
                                                            int id,
                                                            AdminProductMgrOptions mgrOptions)
                                                     throws KKAdminException
Description copied from interface: KKAdminIf
A method that directly returns the date when a product will be available. In the case of a simple product, an alternative way could be to find the product and read the dateAvailable attribute. However, when the product has variations such as color and size, identified by different SKUs, the procedure for retrieving the date available is more complicated and so this API call comes to the rescue.

The product may be identified by the product id or the SKU. When set to a valid value, the SKU is used and the product id is ignored. When the SKU is set to null, the product id is used to identify the product. Note that the SKU should always be used in cases where a single product has many variations such as color and size.

The mgrOptions object allows you to define whether the availability date can have different values depending on the catalogId. It may be set to null.

Specified by:
getProductAvailabilityWithOptions in interface KKAdminIf
Parameters:
sessionId - Session Id
sku - The SKU of the product. If set to null, the product id is used.
id - The product id. Only used if the SKU is set to null.
mgrOptions - Allows you to define whether the availability date can have different values depending on the catalogId. May be set to null.
Returns:
Returns the the date when a product will be available
Throws:
KKAdminException

getProductQuantity

public int getProductQuantity(java.lang.String sessionId,
                              java.lang.String sku,
                              int id)
                       throws KKAdminException
Description copied from interface: KKAdminIf
A method that allows you to directly retrieve the quantity of a product. In the case of a simple product, an alternative way could be to find the product and read the quantity attribute. However, when the product has variations such as color and size, identified by different SKUs, the procedure for retrieving the quantity is more complicated and so this API call comes to the rescue.

The product may be identified by the product id or the SKU. When set to a valid value, the SKU is used and the product id is ignored. When the SKU is set to null, the product id is used to identify the product. Note that the SKU should always be used in cases where a single product has many variations such as color and size.

Specified by:
getProductQuantity in interface KKAdminIf
Parameters:
sessionId - Session Id
sku - The SKU of the product. If set to null, the product id is used.
id - The product id. Only used if the SKU is set to null.
Returns:
Returns the product quantity
Throws:
KKAdminException

getProductQuantityWithOptions

public int getProductQuantityWithOptions(java.lang.String sessionId,
                                         java.lang.String sku,
                                         int id,
                                         AdminProductMgrOptions mgrOptions)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
A method that allows you to directly retrieve the quantity of a product. In the case of a simple product, an alternative way could be to find the product and read the quantity attribute. However, when the product has variations such as color and size, identified by different SKUs, the procedure for retrieving the quantity is more complicated and so this API call comes to the rescue.

The product may be identified by the product id or the SKU. When set to a valid value, the SKU is used and the product id is ignored. When the SKU is set to null, the product id is used to identify the product. Note that the SKU should always be used in cases where a single product has many variations such as color and size.

The mgrOptions object allows you to define whether the quantity can have different values depending on the catalogId. It may be set to null.

Specified by:
getProductQuantityWithOptions in interface KKAdminIf
Parameters:
sessionId - Session Id
sku - The SKU of the product. If set to null, the product id is used.
id - The product id. Only used if the SKU is set to null.
mgrOptions - Allows you to define whether the quantity can have different values depending on the catalogId. May be set to null.
Returns:
Returns the product quantity
Throws:
KKAdminException

addCustomDataToSession

public void addCustomDataToSession(java.lang.String sessionId,
                                   java.lang.String data,
                                   int position)
                            throws KKAdminException
Description copied from interface: KKAdminIf
A sessionId is created when a customer logs in to the KonaKart Admin App 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 KKAdminIf
Parameters:
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:
KKAdminException

getCustomDataFromSession

public java.lang.String getCustomDataFromSession(java.lang.String sessionId,
                                                 int position)
                                          throws KKAdminException
Description copied from interface: KKAdminIf
A sessionId is created when a customer logs in to KonaKart Admin App 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 KKAdminIf
Parameters:
sessionId - The sessionId
position - This must be in the range of 1-5 to identify custom1 to custom5
Returns:
Returns the custom data
Throws:
KKAdminException

execute

public java.lang.String execute(java.lang.String sessionId,
                                java.lang.String className,
                                java.lang.String methodName,
                                java.lang.String[] paramArray)
                         throws KKAdminException
Description copied from interface: KKAdminIf
Executes a method with name methodName of a class with name className with the parameters of type String in paramArray. If the method has parameters, then they must be of type String. The order of the parameters in the array must match the order of the parameters in the method. i.e. myMethod(String p1, String p2) needs to receive an array where p1 is in index 0 and p2 in index 1. The method must return a String which may be null.

The purpose of this API call is to run batch jobs which may be easily run from a scheduler such as Quartz. The java class is instantiated through reflection. This means that it lends itself nicely to custom batch jobs created by KonaKart administrators. Note that if the class has a constructor with a single parameter of type KKAdminIf then this constructor will be called and will be passed an instantiated Admin Eng object.

For example:

 public AdminOrderBatchMgr(KKAdminIf eng) throws Exception
 {
     super.init(eng);
 }
 

Specified by:
execute in interface KKAdminIf
Parameters:
sessionId - The sessionId
className - The fully qualified className
methodName - The name of the method to be executed
paramArray - The parameters passed to the method
Returns:
Returns a String
Throws:
KKAdminException

getProductsToStores

public AdminProductToStore[] getProductsToStores(java.lang.String sessionId,
                                                 AdminDataDescriptor dataDesc,
                                                 AdminSearch search)
                                          throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of AdminProductToStore objects for the specified store

Specified by:
getProductsToStores in interface KKAdminIf
Parameters:
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 Used to control the data offset, limit the number of items returned and set the sort order. You can specify any two of the following to define the sort order: AdminDataDescriptor.ORDER_BY_STOREID_ASCENDING, AdminDataDescriptor.ORDER_BY_STOREID_DESCENDING, AdminDataDescriptor.ORDER_BY_ID_ASCENDING, AdminDataDescriptor.ORDER_BY_ID_DESCENDING
search - Defines the records to be returned. Populate the id with the productId (or set to KonaKartAdminConstant.NOT_SET to get all products) and the name with the storeId (or leave null for all stores).
Returns:
an array of AdminProductToStore objects for the specified store (or all records if the storeId is null). If no AdminProductToStore records exist for the specified store an empty array is returned.
Throws:
KKAdminException

insertProductsToStores

public void insertProductsToStores(java.lang.String sessionId,
                                   AdminProductToStore[] productToStores)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Inserts an array of AdminProductToStore objects

Specified by:
insertProductsToStores in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
productToStores - an array of AdminProductToStore objects to insert into the database
Throws:
KKAdminException

removeProductsToStores

public void removeProductsToStores(java.lang.String sessionId,
                                   AdminProductToStore[] productToStores)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Removes an array of AdminProductToStore objects

Specified by:
removeProductsToStores in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
productToStores - an array of AdminProductToStore objects to delete from the database
Throws:
KKAdminException

insertOrder

public int insertOrder(java.lang.String sessionId,
                       AdminOrder order)
                throws KKAdminException
Description copied from interface: KKAdminIf
Insert an order. This method is intended to be used for importing orders that have previously been validated and saved maybe in another KonaKart. It is used by the KonaKart XML import / export functionality.

Specified by:
insertOrder in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
order - The order to be inserted
Returns:
Returns the order Id
Throws:
KKAdminException

getWishLists

public AdminWishLists getWishLists(java.lang.String sessionId,
                                   AdminWishListSearch search,
                                   int offset,
                                   int size)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Return the WishList objects defined by the search criteria. If the includeChildren attribute on the AdminWishListSearch is true the WishListItem children on each WishList object are returned.

Specified by:
getWishLists in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
search - the AdminWishListSearch object that defines the wish list objects to search for. If null we use the default AdminWishListSearch object.
offset - starting offset in database - so that you can page through results
size - size of the group that will be returned - the maximum number of records returned
Returns:
an AdminWishLists object
Throws:
KKAdminException

insertWishList

public int insertWishList(java.lang.String sessionId,
                          AdminWishList wishList)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Insert a wish list and any attached wish list items. This method is intended to be used for importing wish lists that have previously been validated and saved maybe in another KonaKart. It is used by the KonaKart XML import / export functionality.

Specified by:
insertWishList in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
wishList - The wish list
Returns:
Returns the wish list Id of the newly-inserted wish list
Throws:
KKAdminException

deleteWishList

public void deleteWishList(java.lang.String sessionId,
                           int wishListId)
                    throws KKAdminException
Description copied from interface: KKAdminIf
Delete a wish list and all of its wish list items.

Specified by:
deleteWishList in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
wishListId - Id of the wish list item
Throws:
KKAdminException

insertWishListItem

public int insertWishListItem(java.lang.String sessionId,
                              AdminWishListItem wishListItem)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Insert an AdminWishListItem. This method is intended to be used for importing wishlists that have previously been validated and saved maybe in another KonaKart. It is used by the KonaKart XML import / export functionality.

Specified by:
insertWishListItem in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
wishListItem - The wish list item
Returns:
Returns the wishListItem Id of the newly-inserted AdminWishListItem
Throws:
KKAdminException

deleteWishListItem

public void deleteWishListItem(java.lang.String sessionId,
                               int wishListItemId)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Delete a wish list and all of its wish list items.

Specified by:
deleteWishListItem in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
wishListItemId - Id of the wish list item
Throws:
KKAdminException

getAddressById

public AdminAddress getAddressById(java.lang.String sessionId,
                                   int addressId)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Get Addresses defined by the search criteria

Specified by:
getAddressById in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
addressId - the id of the address to retrieve
Returns:
the Address with the specified Id if it exists, otherwise null.
Throws:
KKAdminException

getAddresses

public AdminAddressSearchResult getAddresses(java.lang.String sessionId,
                                             AdminAddressSearch search,
                                             int offset,
                                             int size)
                                      throws KKAdminException
Description copied from interface: KKAdminIf
Get Addresses defined by the search criteria

Specified by:
getAddresses in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
search - the search criteria
offset - the offset in the record set to start from
size - the maximum number of records to return
Returns:
an AdminAddressSearchResult object
Throws:
KKAdminException

deleteAddress

public void deleteAddress(java.lang.String sessionId,
                          int addressId)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Deletes an AdminAddress.

Specified by:
deleteAddress in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
addressId - the id of the address to delete
Throws:
KKAdminException

insertAddress

public int insertAddress(java.lang.String sessionId,
                         AdminAddress address)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Insert an AdminAddress.

Specified by:
insertAddress in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
address - an AdminAddress object
Returns:
Returns the addresId of the newly-inserted AdminAddress
Throws:
KKAdminException

updateAddress

public void updateAddress(java.lang.String sessionId,
                          AdminAddress address)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Updates an AdminAddress.

Specified by:
updateAddress in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
address - the AdminAddress object to update
Throws:
KKAdminException

insertCustomerTag

public int insertCustomerTag(java.lang.String sessionId,
                             AdminCustomerTag tag)
                      throws KKAdminException
Description copied from interface: KKAdminIf
Inserts an AdminCustomerTag object into the database.

The following customer tag attributes are compulsory:

The id of the new object is returned.

Specified by:
insertCustomerTag in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
tag - The AdminCustomerTag object to be inserted
Returns:
Returns the id of the CustomerTag object
Throws:
KKAdminException

getCustomerTags

public AdminCustomerTagSearchResult getCustomerTags(java.lang.String sessionId,
                                                    AdminCustomerTagSearch search,
                                                    int offset,
                                                    int size)
                                             throws KKAdminException
Description copied from interface: KKAdminIf
Returns an AdminCustomerTagSearchResult object.

Constraints may be added for:

The returned objects may be ordered by:

Specified by:
getCustomerTags in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - The search object that defines the search parameters and sort order
offset - The offset in the db
size - The number of records from the specified offset
Returns:
Returns an AdminCustomerTagSearchResult object
Throws:
KKAdminException

updateCustomerTag

public int updateCustomerTag(java.lang.String sessionId,
                             AdminCustomerTag tag)
                      throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminCustomerTag object. If the value of an attribute is null, the current value is not updated.

Specified by:
updateCustomerTag in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
tag - The AdminCustomerTag object used for the update
Returns:
Returns the id of the updated AdminCustomerTag object
Throws:
KKAdminException

deleteCustomerTag

public int deleteCustomerTag(java.lang.String sessionId,
                             int id)
                      throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Customer tag

Specified by:
deleteCustomerTag in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the deleted customer tag
Returns:
Returns the id of the deleted customer tag
Throws:
KKAdminException

getCustomerTag

public AdminCustomerTag getCustomerTag(java.lang.String sessionId,
                                       int id)
                                throws KKAdminException
Description copied from interface: KKAdminIf
Returns the AdminCustomerTag object for the id parameter, or Null if the customer tag doesn't exist in the DB.

Specified by:
getCustomerTag in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the AdminCustomerTag object
Returns:
Returns an AdminCustomerTag object
Throws:
KKAdminException

deleteCustomerTagForCustomer

public void deleteCustomerTagForCustomer(java.lang.String sessionId,
                                         int customerId,
                                         java.lang.String tagName)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Deletes the value of the customer tag referenced by tagName for the customer referenced by customerId.

Specified by:
deleteCustomerTagForCustomer in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
customerId - The id of the customer
tagName - The name of the customer tag
Throws:
KKAdminException

getCustomerTagForCustomer

public AdminCustomerTag getCustomerTagForCustomer(java.lang.String sessionId,
                                                  int customerId,
                                                  java.lang.String tagName)
                                           throws KKAdminException
Description copied from interface: KKAdminIf
Returns the customer tag object for the tagName parameter, or Null if the customer tag doesn't exist in the DB. The value attribute of the customer tag contains the value for the customer referenced by customerId.

Specified by:
getCustomerTagForCustomer in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
customerId - The id of the customer
tagName - The name of the customer tag
Returns:
Returns a customer tag object
Throws:
KKAdminException

getCustomerTagForName

public AdminCustomerTag getCustomerTagForName(java.lang.String sessionId,
                                              java.lang.String tagName)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
Returns the customer tag object for the tagName parameter, or Null if the customer tag doesn't exist in the DB.

Specified by:
getCustomerTagForName in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
tagName - The name of the customer tag
Returns:
Returns a customer tag object
Throws:
KKAdminException

getCustomerTagsForCustomer

public AdminCustomerTag[] getCustomerTagsForCustomer(java.lang.String sessionId,
                                                     int customerId)
                                              throws KKAdminException
Description copied from interface: KKAdminIf
This method fetches all of the customer tags for the customer referenced by the customerId parameter. The value attribute of the customer tags contains the value for the customer referenced by customerId.

An empty array is returned if no tags exist.

Specified by:
getCustomerTagsForCustomer in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
customerId - The id of the customer
Returns:
Returns an array of AdminCustomerTag objects
Throws:
KKAdminException

insertCustomerTagForCustomer

public void insertCustomerTagForCustomer(java.lang.String sessionId,
                                         int customerId,
                                         AdminCustomerTag tag)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Assigns a customer tag to the customer referenced by the customerId. 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:
insertCustomerTagForCustomer in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
customerId - The id of the customer
tag - The customer tag object
Throws:
KKAdminException

deleteExpression

public int deleteExpression(java.lang.String sessionId,
                            int id)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Deletes the Expression object referenced by id.

Specified by:
deleteExpression in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the AdminExpression object to be deleted
Returns:
Returns the id of the AdminExpression object deleted
Throws:
KKAdminException

deleteExpressionVariable

public int deleteExpressionVariable(java.lang.String sessionId,
                                    int id)
                             throws KKAdminException
Description copied from interface: KKAdminIf
Deletes the ExpressionVariable object referenced by id.

Specified by:
deleteExpressionVariable in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the AdminExpressionVariable object to be deleted
Returns:
Returns the id of the AdminExpression object deleted
Throws:
KKAdminException

getExpression

public AdminExpression getExpression(java.lang.String sessionId,
                                     int id)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Returns the AdminExpression object for the id parameter, or Null if the AdminExpression doesn't exist in the DB.

Specified by:
getExpression in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the AdminExpression object
Returns:
Returns an AdminExpression object
Throws:
KKAdminException

getExpressionForName

public AdminExpression getExpressionForName(java.lang.String sessionId,
                                            java.lang.String expName)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
Returns the AdminExpression object for the expName parameter, or Null if the AdminExpression doesn't exist in the DB.

Specified by:
getExpressionForName in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
expName - The name of the AdminExpression object
Returns:
Returns Returns an AdminExpression object
Throws:
KKAdminException

getExpressionVariable

public AdminExpressionVariable getExpressionVariable(java.lang.String sessionId,
                                                     int id)
                                              throws KKAdminException
Description copied from interface: KKAdminIf
Returns the AdminExpressionVariable object for the id parameter, or Null if the AdminExpressionVariable doesn't exist in the DB.

Specified by:
getExpressionVariable in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the AdminExpressionVariable object
Returns:
Returns an AdminExpressionVariable object
Throws:
KKAdminException

getExpressionVariablesForExpression

public AdminExpressionVariable[] getExpressionVariablesForExpression(java.lang.String sessionId,
                                                                     int expressionId)
                                                              throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of AdminExpressionVariable objects for the AdminExpression identified by the id parameter. An empty array is returned if no objects are found.

Specified by:
getExpressionVariablesForExpression in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
expressionId - The AdminExpression id for the AdminExpressionVariable objects
Returns:
Returns an array of AdminExpression objects
Throws:
KKAdminException

getExpressions

public AdminExpressionSearchResult getExpressions(java.lang.String sessionId,
                                                  AdminExpressionSearch search,
                                                  int offset,
                                                  int size)
                                           throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminExpressionSearchResult object.

Constraints may be added for:

The returned objects may be ordered by:

Specified by:
getExpressions in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - The search object that defines the search parameters and sort order
offset - The offset in the db
size - The number of records from the specified offset
Returns:
Returns an AdminExpressionSearchResult object
Throws:
KKAdminException

insertExpressionVariables

public int insertExpressionVariables(java.lang.String sessionId,
                                     AdminExpressionVariable[] expVarArray)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Inserts an array of ExpressionVariable objects that should all belong to the same expression. If the array only contains one Expression Variable then, the id of that variable is returned. Otherwise the return value is set to 0.

Specified by:
insertExpressionVariables in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
expVarArray - The AdminExpressionVariable array of objects to be inserted
Returns:
If the array only contains one Expression Variable then, the id of that variable is returned. Otherwise the return value is set to 0.
Throws:
KKAdminException

updateExpression

public int updateExpression(java.lang.String sessionId,
                            AdminExpression exp)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Updates the expression. An exception is thrown if the AdminExpression does not exist.

Specified by:
updateExpression in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
exp - The AdminExpression object to be updated
Returns:
Returns the id of the updated AdminExpression object
Throws:
KKAdminException

updateExpressionVariable

public int updateExpressionVariable(java.lang.String sessionId,
                                    AdminExpressionVariable expVar)
                             throws KKAdminException
Description copied from interface: KKAdminIf
Updates the ExpressionVariable object passed in as a parameter. An exception is thrown if it does not exist.

Specified by:
updateExpressionVariable in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
expVar - The AdminExpressionVariable object to be updated
Returns:
Returns the id of the updated AdminExpression object
Throws:
KKAdminException

insertExpression

public int insertExpression(java.lang.String sessionId,
                            AdminExpression exp)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Inserts an AdminExpression object. Only the name attribute of the AdminExpression is required.

Specified by:
insertExpression in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
exp - The AdminExpression object to be inserted
Returns:
Returns the id of the inserted object
Throws:
KKAdminException

deleteExpressionVariablesForExpression

public void deleteExpressionVariablesForExpression(java.lang.String sessionId,
                                                   int expressionId)
                                            throws KKAdminException
Description copied from interface: KKAdminIf
Deletes all of the AdminExpressionVariable objects belonging to the AdminExpression referenced by expressionId.

Specified by:
deleteExpressionVariablesForExpression in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
expressionId - The id of the AdminExpression object
Throws:
KKAdminException

getExpressionsPerPromotion

public AdminExpression[] getExpressionsPerPromotion(java.lang.String sessionId,
                                                    int promotionId)
                                             throws KKAdminException
Description copied from interface: KKAdminIf
Fetch an array of Expression objects linked to the promotion referenced by promotionId

Specified by:
getExpressionsPerPromotion in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
promotionId - The numeric id of the promotion
Returns:
An array of all expressions relevant to a promotion
Throws:
KKAdminException

evaluateExpression

public boolean evaluateExpression(java.lang.String sessionId,
                                  int customerId,
                                  int expressionId,
                                  java.lang.String expressionName)
                           throws KKAdminException
Description copied from interface: KKAdminIf
An expression object is retrieved from the database and evaluated for the customer referenced by the 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:
evaluateExpression in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
customerId - The id of the customer
Returns:
Returns true or false
Throws:
KKAdminException

importDigitalDownload

public int importDigitalDownload(java.lang.String sessionId,
                                 AdminDigitalDownload digDownload)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Import a new digital download record. If the record already exists (a record exists with the same customerId and productId) the record is updated.

Before inserting, the record is validated to ensure that the product referred to by the productId is indeed a Digital Download or Gift Certificate product.

Specified by:
importDigitalDownload in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
digDownload - the Digital Download object to import
Returns:
returns the id of the newly inserted or updated record
Throws:
KKAdminException - if the digital download record specified is invalid or there are database problems

searchDigitalDownloads

public AdminDigitalDownloadSearchResult searchDigitalDownloads(java.lang.String sessionId,
                                                               AdminDigitalDownloadSearch search,
                                                               int offset,
                                                               int size)
                                                        throws KKAdminException
Description copied from interface: KKAdminIf
Retrieve the Digital Download records matching the search criteria

Specified by:
searchDigitalDownloads in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - search definition for digital downloads
offset - offset in results (for paging)
size - maximum number of records to return from the offset (for paging)
Returns:
an AdminDigitalDownloadSearchResult object
Throws:
KKAdminException

getRewardPoints

public AdminRewardPointSearchResult getRewardPoints(java.lang.String sessionId,
                                                    AdminRewardPointSearch search,
                                                    int offset,
                                                    int size)
                                             throws KKAdminException
Description copied from interface: KKAdminIf
The Reward Point transactions can be filtered by the creation dates and sorted by:

Specified by:
getRewardPoints in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - Object containing search constraints and sort order details
offset - offset in results (for paging)
size - maximum number of records to return from the offset (for paging)
Returns:
Returns an AdminRewardPointSearchResult object
Throws:
KKAdminException

pointsAvailable

public int pointsAvailable(java.lang.String sessionId,
                           int customerId)
                    throws KKAdminException
Description copied from interface: KKAdminIf
Calculates the number of reward points available for the customer identified by the customerId parameter.

Specified by:
pointsAvailable in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
customerId - The id of the customer
Returns:
Returns the number of points available for spending
Throws:
KKAdminException

deletePoints

public int deletePoints(java.lang.String sessionId,
                        int customerId,
                        int points,
                        java.lang.String code,
                        java.lang.String description)
                 throws KKAdminException
Description copied from interface: KKAdminIf
Deletes a number of reward points from the total for the customer identified by the customerId parameter.

Specified by:
deletePoints in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
customerId - The id of the customer
points - The number of points to be deleted
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:
KKAdminException

addPoints

public int addPoints(java.lang.String sessionId,
                     int customerId,
                     int points,
                     java.lang.String code,
                     java.lang.String description)
              throws KKAdminException
Description copied from interface: KKAdminIf
Adds a number of reward points to the total for the customer identified by the customerId parameter.

Specified by:
addPoints in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
customerId - The id of the customer
points - The number of points to be added
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:
KKAdminException

getFiles

public AdminFile[] getFiles(java.lang.String sessionId,
                            java.lang.String directory,
                            java.lang.String extension)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Returns an array of files found in the directory. If the extension is not null, then the files are filtered by extension.

Specified by:
getFiles in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
directory - The directory containing the files
extension - The extension of the files. If null, all files are returned.
Returns:
Returns an array of Admin File objects
Throws:
KKAdminException

deletePaymentSchedule

public int deletePaymentSchedule(java.lang.String sessionId,
                                 int id)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Payment Schedule Object

Specified by:
deletePaymentSchedule in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the payment schedule object to delete
Returns:
Returns the id of the deleted payment schedule object
Throws:
KKAdminException

deleteSubscription

public int deleteSubscription(java.lang.String sessionId,
                              int id)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Subscription Object

Specified by:
deleteSubscription in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the subscription object to delete
Returns:
Returns the id of the deleted subscription object
Throws:
KKAdminException

getPaymentSchedule

public AdminPaymentSchedule getPaymentSchedule(java.lang.String sessionId,
                                               int id)
                                        throws KKAdminException
Description copied from interface: KKAdminIf
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 KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the payment schedule object
Returns:
Returns a payment schedule object
Throws:
KKAdminException

getSubscription

public AdminSubscription getSubscription(java.lang.String sessionId,
                                         int id)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Returns the subscription object for the id parameter, or Null if the subscription object doesn't exist in the DB.

Specified by:
getSubscription in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the subscription object
Returns:
Returns a subscription object
Throws:
KKAdminException

getPaymentSchedules

public AdminPaymentScheduleSearchResult getPaymentSchedules(java.lang.String sessionId,
                                                            AdminPaymentScheduleSearch search,
                                                            int offset,
                                                            int size)
                                                     throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminPaymentScheduleSearchResult object.

Specified by:
getPaymentSchedules in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - The object containing the search constraints
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminPaymentScheduleSearchResult object
Throws:
KKAdminException

getSubscriptions

public AdminSubscriptionSearchResult getSubscriptions(java.lang.String sessionId,
                                                      AdminSubscriptionSearch search,
                                                      int offset,
                                                      int size)
                                               throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminSubscriptionSearchResult object.

Specified by:
getSubscriptions in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - The object containing the search constraints
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminSubscriptionSearchResult object
Throws:
KKAdminException

insertPaymentSchedule

public int insertPaymentSchedule(java.lang.String sessionId,
                                 AdminPaymentSchedule ps)
                          throws KKAdminException
Description copied from interface: KKAdminIf
An AdminPaymentSchedule object is inserted into the database. The following payment schedule attributes are compulsory: The id of the new object is returned.

Specified by:
insertPaymentSchedule in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
Returns:
Returns the id of the PaymentSchedule object
Throws:
KKAdminException

insertSubscription

public int insertSubscription(java.lang.String sessionId,
                              AdminSubscription subscription)
                       throws KKAdminException
Description copied from interface: KKAdminIf
An AdminSubscription object is inserted into the database. The following subscription attributes are compulsory: The id of the new object is returned.

Specified by:
insertSubscription in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
Returns:
Returns the id of the Subscription object
Throws:
KKAdminException

updatePaymentSchedule

public int updatePaymentSchedule(java.lang.String sessionId,
                                 AdminPaymentSchedule ps)
                          throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminPaymentSchedule object. If the value of an attribute is null, the current value is not updated.

Specified by:
updatePaymentSchedule in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
ps - An AdminPaymentSchedule object
Returns:
returns the id of the updated AdminPaymentSchedule object
Throws:
KKAdminException

updateSubscription

public int updateSubscription(java.lang.String sessionId,
                              AdminSubscription subscription)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminSubscription object. If the value of an attribute is null, the current value is not updated.

Specified by:
updateSubscription in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
subscription - An AdminSubscription object
Returns:
Returns the id of the updated AdminSubscription object
Throws:
KKAdminException

checkDataIntegrity

public boolean checkDataIntegrity(java.lang.String sessionId,
                                  AdminDataIntegrityOptions dataIntegrityOptions)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Checks the integrity of data in the specified area in the KonaKart database

Specified by:
checkDataIntegrity in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
dataIntegrityOptions - Defines the options to use for the data integrity check
Returns:
true if data integrity problems were found, otherwise false
Throws:
KKAdminException

exportOrder

public com.konakart.app.ExportOrderResponse exportOrder(java.lang.String sessionId,
                                                        com.konakart.app.ExportOrderOptions options)
                                                 throws KKAdminException
Description copied from interface: KKAdminIf
Exports the Order

Specified by:
exportOrder in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
options - Defines the options to use for the export of the Order
Returns:
an ExportOrderResponse object
Throws:
KKAdminException

searchMsg

public AdminKkMsgSearchResult searchMsg(AdminKkMsgSearch search,
                                        int groupSize,
                                        int offset)
                                 throws KKAdminException
Description copied from interface: KKAdminIf
Retrieve all the messages from the database that match the specified search criteria

Specified by:
searchMsg in interface KKAdminIf
Parameters:
search - the AdminKkMsgSearch object that defines the search criteria
groupSize - a maximum of this many messages will be returned by each call (the group size)
offset - the offset in the record set that match the criteria from which records are returned
Returns:
An AdminKkMsgSearchResult object containing the messages that match the specified search criteria.
Throws:
KKAdminException

getMsgValue

public java.lang.String getMsgValue(java.lang.String key,
                                    int type,
                                    java.lang.String locale)
                             throws KKAdminException
Description copied from interface: KKAdminIf
Get a Message Value from the database

Specified by:
getMsgValue in interface KKAdminIf
Parameters:
key - the message key
type - the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages, KKConstants.MSG_TYP_ADMIN_APP for Admin App messages, KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)
locale - the message locale (eg. "en_GB"). If this is null the default locale for the store is used.
Returns:
The message for the key, type and locale. If the message isn't found the String "[key:type:locale]" is returned.
Throws:
KKAdminException

deleteMsg

public void deleteMsg(java.lang.String sessionId,
                      java.lang.String key,
                      int type,
                      java.lang.String locale)
               throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Message from the database

Specified by:
deleteMsg in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
key - the message key
type - the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages, KKConstants.MSG_TYP_ADMIN_APP for Admin App messages, KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)
locale - the message locale (eg. "en_GB"). If this is null the default locale for the store is used.
Throws:
KKAdminException

insertMsg

public void insertMsg(java.lang.String sessionId,
                      java.lang.String key,
                      int type,
                      java.lang.String locale,
                      java.lang.String value)
               throws KKAdminException
Description copied from interface: KKAdminIf
Insert a Message into the database

Specified by:
insertMsg in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
key - the message key
type - the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages, KKConstants.MSG_TYP_ADMIN_APP for Admin App messages, KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)
locale - the message locale (eg. "en_GB"). If this is null the default locale for the store is used.
value - the value of the message to be inserted
Throws:
KKAdminException

updateMsg

public void updateMsg(java.lang.String sessionId,
                      java.lang.String key,
                      int type,
                      java.lang.String locale,
                      java.lang.String value)
               throws KKAdminException
Description copied from interface: KKAdminIf
Update a Message in the database. Only the message value can be updated here because the other parameters are all keys.

Specified by:
updateMsg in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
key - the message key
type - the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages, KKConstants.MSG_TYP_ADMIN_APP for Admin App messages, KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)
locale - the message locale (eg. "en_GB"). If this is null the default locale for the store is used.
value - the new value for the message
Throws:
KKAdminException

importMsgs

public void importMsgs(java.lang.String sessionId,
                       int type,
                       java.lang.String locale,
                       java.lang.String msgString,
                       boolean replace)
                throws KKAdminException
Description copied from interface: KKAdminIf
Import Messages into the database

Specified by:
importMsgs in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
type - the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages, KKConstants.MSG_TYP_ADMIN_APP for Admin App messages, KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)
locale - the message locale (eg. "en_GB"). If this is null the default locale for the store is used.
msgString - A String containing the messages to import in the format of a java properties file
replace - if true all the current messages for the specified type and locale are removed before importing the new messages. If false the new messages are appended and if a message key already exists it is replaced by the new message value being imported.
Throws:
KKAdminException

exportMsgs

public java.lang.String exportMsgs(int type,
                                   java.lang.String locale)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Export Messages from the database

Specified by:
exportMsgs in interface KKAdminIf
Parameters:
type - the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages, KKConstants.MSG_TYP_ADMIN_APP for Admin App messages, KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)
locale - the message locale (eg. "en_GB"). If this is null the default locale for the store is used.
Returns:
msgString A String containing the messages in the format of a java properties file
Throws:
KKAdminException

addAddressesToProduct

public void addAddressesToProduct(java.lang.String sessionId,
                                  AdminAddress[] addresses,
                                  int productId)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Associate an array of addresses to a product. One or more of the addresses can be set as the primary address. The isPrimary information is saved in the link between the address and the product and so an address maybe a primary address for one product and not primary for another product. If this method is called when the address is already associtated with the product, then the primary address attribute is edited, so this method must be used to set / reset the isPrimary attribute of a product address.

Specified by:
addAddressesToProduct in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
addresses - The array of address to be added
productId - The numeric id of the product
Throws:
KKAdminException

removeAddressFromProduct

public void removeAddressFromProduct(java.lang.String sessionId,
                                     int addressId,
                                     int productId)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Remove the relationship between the address and the product.

Specified by:
removeAddressFromProduct in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
addressId - The numeric id of the address
productId - The numeric id of the product
Throws:
KKAdminException

getProductCountPerAddress

public int getProductCountPerAddress(java.lang.String sessionId,
                                     int addressId)
                              throws KKAdminException
Description copied from interface: KKAdminIf
Returns the number of products using the address identified by addressId.

Specified by:
getProductCountPerAddress in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
addressId - The numeric id of the address
Returns:
Return the number of products using the address
Throws:
KKAdminException

getManufacturers

public AdminManufacturerSearchResult getManufacturers(java.lang.String sessionId,
                                                      AdminManufacturerSearch search,
                                                      int offset,
                                                      int size)
                                               throws KKAdminException
Description copied from interface: KKAdminIf
Returns an AdminManufacturerSearchResult object.

Constraints may be added for:

The returned objects may be ordered by:

Specified by:
getManufacturers in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - The search object that defines the search parameters and sort order
offset - The offset in the db
size - The number of records from the specified offset
Returns:
Returns an AdminManufacturerSearchResult object
Throws:
KKAdminException

getProductOptions

public AdminProductOptionSearchResult getProductOptions(java.lang.String sessionId,
                                                        AdminProductOptionSearch search,
                                                        int offset,
                                                        int size)
                                                 throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminProductOptionSearchResult object. Each ProductOption object may have an array of ProductOptionValues which are populated by this API call if the populateValues attribute of the search object is set.

Specified by:
getProductOptions in interface KKAdminIf
Parameters:
sessionId - The session Id of the logged in user
search - The search parameters. The languageId determines in which language the product options are returned. It can be set to AdminLanguageMgr.DEFAULT_LANG to specify the default language, or to AdminLanguageMgr.ALL_LANGUAGES to specify all languages.
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminProductOptionSearchResult object
Throws:
KKAdminException

deleteProdAttrDesc

public int deleteProdAttrDesc(java.lang.String sessionId,
                              int id)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Delete an AdminProdAttrDesc

Specified by:
deleteProdAttrDesc in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the AdminProdAttrDesc object to be deleted
Returns:
Returns the id of the deleted AdminProdAttrDesc object
Throws:
KKAdminException

deleteProdAttrTemplate

public int deleteProdAttrTemplate(java.lang.String sessionId,
                                  int id)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Delete an AdminProdAttrTemplate object.

Specified by:
deleteProdAttrTemplate in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the AdminProdAttrTemplate object to be deleted
Returns:
Returns the id of the deleted AdminProdAttrTemplate object
Throws:
KKAdminException

getProdAttrDesc

public AdminProdAttrDesc getProdAttrDesc(java.lang.String sessionId,
                                         int id)
                                  throws KKAdminException
Description copied from interface: KKAdminIf
Returns the AdminProdAttrDesc object for the id parameter, or Null if the AdminProdAttrDesc doesn't exist in the DB.

Specified by:
getProdAttrDesc in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the AdminProdAttrDesc to be fetched
Returns:
Returns a AdminProdAttrDesc object
Throws:
KKAdminException

getProdAttrDescs

public AdminProdAttrDescSearchResult getProdAttrDescs(java.lang.String sessionId,
                                                      AdminProdAttrDescSearch search,
                                                      int offset,
                                                      int size)
                                               throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminProdAttrDescSearchResult object that contains an array of AdminProdAttrDesc objects. The AdminProdAttrDesc objects may be sorted by :

Specified by:
getProdAttrDescs in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - An AdminProdAttrDescSearch containing search criteria
offset - The offset in the db
size - The number of records from the specified offset
Returns:
Returns an AdminProdAttrDescSearchResult object
Throws:
KKAdminException

getProdAttrDescsForTemplate

public AdminProdAttrDesc[] getProdAttrDescsForTemplate(java.lang.String sessionId,
                                                       int templateId)
                                                throws KKAdminException
Description copied from interface: KKAdminIf
This method fetches all of the AdminProdAttrDesc objects for the template referenced by the templateId parameter.

An empty array is returned if no AdminProdAttrDesc objects exist.

Specified by:
getProdAttrDescsForTemplate in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
templateId - The id of the template
Returns:
Returns an array of AdminProdAttrDesc objects
Throws:
KKAdminException

getProdAttrTemplate

public AdminProdAttrTemplate getProdAttrTemplate(java.lang.String sessionId,
                                                 int id)
                                          throws KKAdminException
Description copied from interface: KKAdminIf
Returns the AdminProdAttrTemplate object for the id parameter, or Null if the AdminProdAttrTemplate doesn't exist in the DB. If the Template contains an array of ProdAttrDesc objects, these are also fetched from the DB.

Specified by:
getProdAttrTemplate in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
id - The id of the AdminProdAttrTemplate object to be fetched
Returns:
Returns a AdminProdAttrTemplate object
Throws:
KKAdminException

getProdAttrTemplates

public AdminProdAttrTemplateSearchResult getProdAttrTemplates(java.lang.String sessionId,
                                                              AdminProdAttrTemplateSearch search,
                                                              int offset,
                                                              int size)
                                                       throws KKAdminException
Description copied from interface: KKAdminIf
This returns an AdminProdAttrTemplateSearchResult object containing an array of AdminProdAttrTemplate objects. The Templates may be sorted by :

Specified by:
getProdAttrTemplates in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - An AdminProdAttrTemplateSearch containing search criteria
offset - The offset in the db
size - The number of records from the specified offset
Returns:
Returns an AdminProdAttrTemplateSearchResult object
Throws:
KKAdminException

insertProdAttrDesc

public int insertProdAttrDesc(java.lang.String sessionId,
                              AdminProdAttrDesc attrDesc)
                       throws KKAdminException
Description copied from interface: KKAdminIf
An AdminProdAttrDesc object is inserted into the database. The following attributes are compulsory: The id of the new object is returned.

Specified by:
insertProdAttrDesc in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
attrDesc - The AdminProdAttrDesc to insert
Returns:
Returns the id of the ProdAttrDesc object
Throws:
KKAdminException

insertProdAttrTemplate

public int insertProdAttrTemplate(java.lang.String sessionId,
                                  AdminProdAttrTemplate template)
                           throws KKAdminException
Description copied from interface: KKAdminIf
An AdminProdAttrTemplate object is inserted into the database. The following attributes are compulsory: The id of the new object is returned.

Specified by:
insertProdAttrTemplate in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
template - The AdminProdAttrTemplate object to be insterted
Returns:
Returns the id of the ProdAttrTemplate object
Throws:
KKAdminException

removeProdAttrDescsFromTemplate

public void removeProdAttrDescsFromTemplate(java.lang.String sessionId,
                                            AdminProdAttrDesc[] attrDescs,
                                            int templateId)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
Remove an array of ProdAttrDesc objects from the template. When attrDescs is set to null, all ProdAttrDesc objects are removed from the template.

Specified by:
removeProdAttrDescsFromTemplate in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
attrDescs - Array of AdminProdAttrDesc objects
templateId - Id of the AdminProdAttrTemplate
Throws:
KKAdminException

addProdAttrDescsToTemplate

public void addProdAttrDescsToTemplate(java.lang.String sessionId,
                                       AdminProdAttrDesc[] attrDescs,
                                       int templateId)
                                throws KKAdminException
Description copied from interface: KKAdminIf
Add the array of AdminProdAttrDesc objects to the template. We assume that the AdminProdAttrDesc objects have already been inserted.

Specified by:
addProdAttrDescsToTemplate in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
attrDescs - Array of AdminProdAttrDesc objects
templateId - Id of the AdminProdAttrTemplate
Throws:
KKAdminException

updateProdAttrDesc

public int updateProdAttrDesc(java.lang.String sessionId,
                              AdminProdAttrDesc attrDesc)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminProdAttrDesc object. If the value of an attribute is null, the current value is not updated.

Specified by:
updateProdAttrDesc in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
attrDesc - The AdminProdAttrDesc to update
Returns:
Returns the id of the updated AdminProdAttrDesc object
Throws:
KKAdminException

updateProdAttrTemplate

public int updateProdAttrTemplate(java.lang.String sessionId,
                                  AdminProdAttrTemplate template)
                           throws KKAdminException
Description copied from interface: KKAdminIf
Update an AdminProdAttrTemplate object. If the value of an attribute is null, the current value is not updated.

Specified by:
updateProdAttrTemplate in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
template - An AdminProdAttrTemplate object
Returns:
returns the id of the updated AdminProdAttrTemplate object
Throws:
KKAdminException

getTemplateCountPerProdAttrDesc

public int getTemplateCountPerProdAttrDesc(java.lang.String sessionId,
                                           int attrDescId)
                                    throws KKAdminException
Description copied from interface: KKAdminIf
Returns the number of templates using the product attribute descriptor.

Specified by:
getTemplateCountPerProdAttrDesc in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
attrDescId - The id of the AdminProdAttrDesc object
Returns:
Return the number of templates using the product attribute descriptor
Throws:
KKAdminException

getProductCountPerProdAttrDesc

public int getProductCountPerProdAttrDesc(java.lang.String sessionId,
                                          int attrDescId)
                                   throws KKAdminException
Description copied from interface: KKAdminIf
Returns the number of products using the product attribute descriptor.

Specified by:
getProductCountPerProdAttrDesc in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
attrDescId - The id of the AdminProdAttrDesc object
Returns:
Return the number of products using the product attribute descriptor
Throws:
KKAdminException

updateProductsUsingProdAttrDesc

public int updateProductsUsingProdAttrDesc(java.lang.String sessionId,
                                           int attrDescId)
                                    throws KKAdminException
Description copied from interface: KKAdminIf
When custom attributes are converted to an XML string and saved within the product object, some metadata fields of the custom attribute are saved along with the value of the attribute itself. These metadata fields (i.e. Message catalog key, the template for displaying the attribute and the custom fields) are stored in the XML for performance reasons.

When a Product Attribute Descriptor is modified, all of the products using the descriptor are not updated automatically. In order to update them, this API call must be called, passing in the id of the Product Attribute Descriptor that has been modified.

Depending on the number of products, the API call may take some time to complete.

Specified by:
updateProductsUsingProdAttrDesc in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
attrDescId - The id of the AdminProdAttrDesc object
Returns:
Returns the number of products updated
Throws:
KKAdminException

updateProductsUsingTemplates

public int updateProductsUsingTemplates(java.lang.String sessionId,
                                        int[] templateIds)
                                 throws KKAdminException
Description copied from interface: KKAdminIf
When custom attributes are converted to an XML string and saved within the product object, some metadata fields of the custom attribute are saved along with the value of the attribute itself. These metadata fields (i.e. Message catalog key, the template for displaying the attribute and the custom fields) are stored in the XML for performance reasons.

When a Product Attribute Template is modified, all of the products using the template are not updated automatically. In order to update them, this API call must be called, passing in the id(s) of the templates that have been modified.

Depending on the number of products, the API call may take some time to complete.

Specified by:
updateProductsUsingTemplates in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
templateIds - An array of template ids
Returns:
Returns the number of products updated
Throws:
KKAdminException

getProductCountPerTemplate

public int getProductCountPerTemplate(java.lang.String sessionId,
                                      int templateId)
                               throws KKAdminException
Description copied from interface: KKAdminIf
Returns the number of products using the custom product attribute template.

Specified by:
getProductCountPerTemplate in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
templateId - The id of the AdminProdAttrTemplate object
Returns:
Return the number of products using the custom product attribute template
Throws:
KKAdminException

callPaymentModule

public com.konakart.app.NameValue[] callPaymentModule(java.lang.String sessionId,
                                                      java.lang.String moduleClassName,
                                                      com.konakart.app.PaymentOptions options)
                                               throws KKAdminException
Description copied from interface: KKAdminIf
This method is used to call a payment module from the Admin App. The payment module which must implement the com.konakartadmin.modules.AdminPaymentIf interface, is instantiated and the execute method is called.

Specified by:
callPaymentModule in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
moduleClassName - The full class name such as com.konakartadmin.modules.payment.authorizenet.AdminPayment
options - An object containing all of the parameters required for the transaction
Returns:
Returns an array of name value pairs
Throws:
KKAdminException

getBookings

public AdminBookingSearchResult getBookings(java.lang.String sessionId,
                                            AdminBookingSearch search,
                                            int offset,
                                            int size,
                                            AdminBookableProductOptions options)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
Search for bookings.

Specified by:
getBookings in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - AdminBookingSearch object that defines the search
offset - offset
size - maximum number of records to return from the offset position
options - AdminBookableProduct options
Returns:
Returns a AdminBookingSearchResult object
Throws:
KKAdminException

insertBooking

public int insertBooking(java.lang.String sessionId,
                         AdminBooking booking,
                         AdminBookableProductOptions options)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Insert a new booking.

Specified by:
insertBooking in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
booking - The booking to insert
options - AdminBookableProduct options
Returns:
the bookingId of the newly-inserted booking
Throws:
KKAdminException

updateBooking

public void updateBooking(java.lang.String sessionId,
                          AdminBooking booking,
                          AdminBookableProductOptions options)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Update the booking

Specified by:
updateBooking in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
booking - The booking to update
options - AdminBookableProduct options
Throws:
KKAdminException

deleteBooking

public void deleteBooking(java.lang.String sessionId,
                          int bookingId,
                          AdminBookableProductOptions options)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Delete the booking with the specified bookingId.

Specified by:
deleteBooking in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
bookingId - bookingId of the booking to delete
options - AdminBookableProduct options
Throws:
KKAdminException

deleteCatalog

public void deleteCatalog(java.lang.String sessionId,
                          int catalogId)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Delete a Catalog definition from the database

Specified by:
deleteCatalog in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
catalogId - The numeric id of the catalog
Throws:
KKAdminException

getCatalogs

public AdminCatalogSearchResult getCatalogs(java.lang.String sessionId,
                                            AdminCatalogSearch search,
                                            int offset,
                                            int size)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
Get an array of catalogs matching the search criteria from the database. The catalogs may be ordered by:

Specified by:
getCatalogs in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
search - AdminCatalogSearch object that defines the search
offset - offset
size - maximum number of records to return from the offset position
Returns:
Returns an AdminCatalogSearchResult object
Throws:
KKAdminException

insertCatalog

public int insertCatalog(java.lang.String sessionId,
                         AdminCatalog catalog)
                  throws KKAdminException
Description copied from interface: KKAdminIf
Insert a new catalog

Specified by:
insertCatalog in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
catalog - The AdminCatalog object to be inserted
Returns:
Returns the numeric id of the inserted catalog
Throws:
KKAdminException

updateCatalog

public void updateCatalog(java.lang.String sessionId,
                          AdminCatalog catalog)
                   throws KKAdminException
Description copied from interface: KKAdminIf
Update an existing catalog

Specified by:
updateCatalog in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
catalog - The AdminCatalog object to be updated
Throws:
KKAdminException

getCatalogById

public AdminCatalog getCatalogById(java.lang.String sessionId,
                                   int catalogId)
                            throws KKAdminException
Description copied from interface: KKAdminIf
Fetch a catalog from the database referenced by the catalog id

Specified by:
getCatalogById in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
catalogId - The numeric id of the catalog
Returns:
Returns an AdminCatalog object
Throws:
KKAdminException

deleteMiscItemType

public void deleteMiscItemType(java.lang.String sessionId,
                               int miTypeId,
                               boolean deleteChildren)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Delete an AdminMiscItemType. All records with the specified miscellaneous item type id will be deleted - that is the miscellaneous item type for every language defined.

Specified by:
deleteMiscItemType in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
miTypeId - the id of the miscellaneous item type object to delete
deleteChildren - if true all children (miscellaneous items with this miscellaneous item type) will also be deleted.
Throws:
KKAdminException

getMiscItemTypes

public AdminMiscItemType[] getMiscItemTypes(java.lang.String sessionId,
                                            AdminSearch search,
                                            int offset,
                                            int size)
                                     throws KKAdminException
Description copied from interface: KKAdminIf
Return the AdminMiscItemType objects defined by the search criteria.

Specified by:
getMiscItemTypes in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
search - the generic Admin search object that defines the objects to search for. If null we use the default AdminSearch object. If you specify the LanguageId in the search object, only the MiscItemType for that specified language will be returned. If you specify AdminLanguage.ALL_LANGUAGES for the languageId the search will be made on the default language, and if MiscItemTypes are found, MiscItemTypes with these MiscItemTypeIds for all of the languages are returned.
offset - starting offset in database - so that you can page through results
size - size of the group that will be returned - the maximum number of records returned
Returns:
an array of AdminMiscItemType objects or null if no records match the search criteria.
Throws:
KKAdminException

insertMiscItemType

public int insertMiscItemType(java.lang.String sessionId,
                              AdminMiscItemType[] miTypes)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Insert an array of AdminMiscItemType objects

Specified by:
insertMiscItemType in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
miTypes - An array of AdminMiscItemType objects to insert. Typically you would insert one AdminMiscItemType record for each language to maintain data integrity.
Returns:
the id created for the newly-inserted AdminMiscItemType objects
Throws:
KKAdminException

updateMiscItemType

public void updateMiscItemType(java.lang.String sessionId,
                               AdminMiscItemType[] miTypes)
                        throws KKAdminException
Description copied from interface: KKAdminIf
Update an array of AdminMiscItemType objects. Only the name and the description can be updated.

Specified by:
updateMiscItemType in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
miTypes - An array of AdminMiscItemType objects to update.
Throws:
KKAdminException

deleteMiscItem

public void deleteMiscItem(java.lang.String sessionId,
                           int miId)
                    throws KKAdminException
Description copied from interface: KKAdminIf
Delete an AdminMiscItem. All records with the specified miscellaneous item type id will be deleted - that is the miscellaneous item type for every language defined.

Specified by:
deleteMiscItem in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
miId - the id of the miscellaneous item object to delete
Throws:
KKAdminException

getMiscItems

public AdminMiscItemSearchResult getMiscItems(java.lang.String sessionId,
                                              AdminSearch search,
                                              int offset,
                                              int size)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
Return the AdminMiscItem objects defined by the search criteria.

Specified by:
getMiscItems in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
search - the generic Admin search object that defines the objects to search for. If null we use the default AdminSearch object.

AdminSearch criteria usage:

  • ids = Can contain an array of kkObjIds
  • id = kkMiscItemId
  • id2 = kkMiscItemTypeId
  • id3 = kkObjId - The id of the product or category associated with the misc item
  • id4 = kkObjTypeId - Valid values are KKConstants.OBJECT_TYPE_PRODUCT and KKConstants.OBJECT_TYPE_CATEGORY
  • name = item Value

AdminSearch order by options:

  • AdminSearch.ORDER_BY_ID_DESCENDING order by Misc Item Id descending
  • AdminSearch.ORDER_BY_ID_ASCENDING order by Misc Item Id ascending
  • AdminSearch.ORDER_BY_ID2_DESCENDING order by Misc Item Type Id descending
  • AdminSearch.ORDER_BY_ID2_ASCENDING order by Misc Item Type Id ascending
  • AdminSearch.ORDER_BY_ID3_DESCENDING order by Object Id descending
  • AdminSearch.ORDER_BY_ID3_ASCENDING order by Object Id ascending
  • AdminSearch.ORDER_BY_ID4_DESCENDING order by Object Type Id descending
  • AdminSearch.ORDER_BY_ID4_ASCENDING order by Object Type Id ascending
  • AdminSearch.ORDER_BY_NAME_DESCENDING order by Item Value descending
  • AdminSearch.ORDER_BY_NAME_ASCENDING order by Item Value ascending
  • AdminSearch.ORDER_BY_DATE_DESCENDING order by Date Added descending
  • AdminSearch.ORDER_BY_DATE_ASCENDING order by Date Added ascending
offset - starting offset in database - so that you can page through results
size - size of the group that will be returned - the maximum number of records returned
Returns:
an AdminMiscItemSearchResult object that contains an array of AdminMiscItem objects if records are found that match the search criteria.
Throws:
KKAdminException

insertMiscItems

public int insertMiscItems(java.lang.String sessionId,
                           AdminMiscItem[] mItems)
                    throws KKAdminException
Description copied from interface: KKAdminIf
Insert an array of AdminMiscItem objects

Specified by:
insertMiscItems in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
mItems - An array of AdminMiscItem objects to insert.
Returns:
the id created for the last newly-inserted AdminMiscItem object
Throws:
KKAdminException

updateMiscItems

public void updateMiscItems(java.lang.String sessionId,
                            AdminMiscItem[] mItems)
                     throws KKAdminException
Description copied from interface: KKAdminIf
Update an array of AdminMiscItem objects. Only the item_value and the custom fields can be updated.

Specified by:
updateMiscItems in interface KKAdminIf
Parameters:
sessionId - The session id of the logged in user
mItems - An array of AdminMiscItem objects to update.
Throws:
KKAdminException

copyProductToStore

public int copyProductToStore(java.lang.String sessionId,
                              int productId,
                              java.lang.String storeIdFrom,
                              java.lang.String storeIdTo,
                              AdminCopyProductOptions options)
                       throws KKAdminException
Description copied from interface: KKAdminIf
Copies a product from the store referenced by storeIdFrom to the store referenced by storeIdTo . This API call can only be used when in multi-store shared product and shared category mode.
The options parameter defines the type of copy. Valid operations are:

Specified by:
copyProductToStore in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
productId - The numeric id of the product to copy
storeIdFrom - The id of the source store
storeIdTo - The id of the destination store
options - Options to configure the copy operation
Returns:
Returns the copied product id in mode MODE_COPY_CREATING_NEW_PRODUCT. Otherwise returns 0
Throws:
KKAdminException

getProductsToSynchronize

public AdminProducts getProductsToSynchronize(java.lang.String sessionId,
                                              java.lang.String storeIdFrom,
                                              java.lang.String storeIdTo,
                                              AdminDataDescriptor dataDesc,
                                              int languageId,
                                              AdminSynchProductsOptions options,
                                              AdminProductMgrOptions mgrOptions)
                                       throws KKAdminException
Description copied from interface: KKAdminIf
This API call is used to get a list of products that are out of sync between two stores. It can only be used when in multi-store shared product / shared category mode and is useful when stores are used as staging environments to display pre-production product information.
The options parameter defines the the type of search which may be: It also allows you to define two search constraints to filter the returned products: The dataDesc parameter is used to control the data offset, limit the number of items returned and set the sort order. The only sort orders used are:

Specified by:
getProductsToSynchronize in interface KKAdminIf
Parameters:
sessionId - session Id of logged in Admin user
storeIdFrom - The id of the source store
storeIdTo - The id of the destination store
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order. May be null.
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
options - Defines the type of search and constraints.
mgrOptions - It defines whether to use prices and quantity for the catalog defined by the catalogId. May be null.
Returns:
Returns an AdminProducts object containing the products
Throws:
KKAdminException

getKonaKartAdminVersion

public java.lang.String getKonaKartAdminVersion()
                                         throws KKAdminException
Description copied from interface: KKAdminIf
Return the version number of KonaKart Admin that is contained within the konakart.jar

Specified by:
getKonaKartAdminVersion in interface KKAdminIf
Returns:
the KonaKart Admin version number as a String in the form N.N.N.N
Throws:
KKAdminException


Copyright © 2011 DS Data Systems UK Ltd.