com.konakartadmin.appif
Interface KKAdminIf

All Known Implementing Classes:
KKAdmin

public interface KKAdminIf

Contains all of the interfaces required to run a KonaKart Admin application.


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.
 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 miTypeId)
          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 size)
          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.
 AdminCurrency getDefaultCurrency()
          The default currency is referenced by a configuration variable called DEFAULT_CURRENCY.
 AdminLanguage getDefaultLanguage()
          Returns the default language.
 AdminEngineConfig getEngConf()
          Get the assigned KKAdmin Engine configuration.
 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 getKonakartAdminPropsFilePath()
          Returns the full path name of the konakartadmin.properties file as a String.
 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. From version 2.2.4.0 you should use getOrders().
 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[] config)
          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[] tagGroups)
          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[] tags)
          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. From version 6.2.0.0 you should use updateOrder(java.lang.String, int, int, java.lang.String, boolean, com.konakartadmin.app.AdminOrderUpdate) instead.
 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
 

Method Detail

getEngConf

AdminEngineConfig getEngConf()
                             throws KKAdminException
Get the assigned KKAdmin Engine configuration.

Returns:
the KKAdmin Engine configuration
Throws:
KKAdminException

getStores

AdminStore[] getStores()
                       throws KKAdminException
Get the stores supported by the server.

Returns:
an array of AdminStore objects
Throws:
KKAdminException

getMallStores

AdminStoreSearchResult getMallStores(AdminStoreSearch search,
                                     int offset,
                                     int size)
                                     throws KKAdminException
Get the stores in the mall supported by the server - Multi-Store Single DB only.

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

cloneStore

void cloneStore(java.lang.String sessionId,
                AdminNewStoreOptions options,
                java.lang.String storeToCloneId,
                AdminStore newStore)
                throws KKAdminException
Insert a new store into the mall by cloning a specified store.

Multi-Store Single DB only.

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

insertMallStore

void insertMallStore(java.lang.String sessionId,
                     AdminStore store)
                     throws KKAdminException
Insert a new store into the mall.

Multi-Store Single DB only

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

doesMallStoreExist

boolean doesMallStoreExist(java.lang.String storeId)
                           throws KKAdminException
Does the specified store exist?

Multi-Store Single DB only

Parameters:
storeId - The StoreId of the store to check
Returns:
true if the store already exists, otherwise false
Throws:
KKAdminException

deleteMallStore

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

Multi-Store Single DB only

Parameters:
sessionId - The session Id of the logged in user
storeId - the StoreId of the store to delete
Throws:
KKAdminException

updateMallStore

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

Multi-Store Single DB only

Parameters:
sessionId - The session Id of the logged in user
store - The AdminStore object to update
Throws:
KKAdminException

getKonakartAdminPropsFilePath

java.lang.String getKonakartAdminPropsFilePath()
                                               throws KKAdminException
Returns the full path name of the konakartadmin.properties file as a String.

Returns:
Returns the konakartAdminPropsFilePath.
Throws:
KKAdminException

getKonakartPropertyValue

java.lang.String getKonakartPropertyValue(java.lang.String sessionId,
                                          java.lang.String section,
                                          java.lang.String propertyName)
                                          throws KKAdminException
Returns the property value from the properties file in the specified section

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

logMsg

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

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

AdminLanguage getDefaultLanguage()
                                 throws KKAdminException
Returns the default language. The default language is defined by the DEFAULT_LANGUAGE configuration variable.

Returns:
the default language
Throws:
KKAdminException

getLanguageByCode

AdminLanguage getLanguageByCode(java.lang.String code)
                                throws KKAdminException
Returns the language referenced by the two letter lower case code (e.g. es, de, en)

Parameters:
code - the language code
Returns:
the language by language code
Throws:
KKAdminException

getLanguageById

AdminLanguage getLanguageById(int id)
                              throws KKAdminException
Returns the language referenced by language ID. If the language is KKConstants.NOT_SET then the default language is returned.

Parameters:
id - the language id
Returns:
the language by language id
Throws:
KKAdminException

getLanguageForLocale

AdminLanguage getLanguageForLocale(java.lang.String locale)
                                   throws KKAdminException
Retrieves the language for the locale

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

getLanguageIdForLocale

int getLanguageIdForLocale(java.lang.String locale)
                           throws KKAdminException
Retrieves the language Id for the locale

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

getAllLanguages

AdminLanguage[] getAllLanguages()
                                throws KKAdminException
Get all of the languages in the database. Does not return the display-only languages.

Returns:
Returns all of the languages
Throws:
KKAdminException

getLanguages

AdminLanguageSearchResult getLanguages(AdminLanguageSearch search)
                                       throws KKAdminException
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.

Parameters:
search - the search object that defines the search parameters and sort order
Returns:
Returns an AdminLanguageSearchResult
Throws:
KKAdminException

insertLanguage

int insertLanguage(java.lang.String sessionId,
                   AdminLanguage lang)
                   throws KKAdminException
Insert a Language.

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

deleteLanguage

int deleteLanguage(java.lang.String sessionId,
                   int langId)
                   throws KKAdminException
Delete a Language.

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

updateLanguage

int updateLanguage(java.lang.String sessionId,
                   AdminLanguage lang)
                   throws KKAdminException
Update a Language.

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

getDefaultCurrency

AdminCurrency getDefaultCurrency()
                                 throws KKAdminException
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.

Returns:
Returns a currency object
Throws:
KKAdminException

getCurrency

AdminCurrency getCurrency(java.lang.String currencyCode)
                          throws KKAdminException
Return the currency object for the specified currency code.

Parameters:
currencyCode - the currency Code to look up
Returns:
Returns a currency object
Throws:
KKAdminException

getCurrencies

AdminCurrencySearchResult getCurrencies(AdminCurrencySearch search)
                                        throws KKAdminException
Returns an AdminCurrencySearchResult object.

Parameters:
search - the search object that defines the search parameters and sort order
Returns:
Returns an AdminLanguageSearchResult
Throws:
KKAdminException

deleteCurrency

int deleteCurrency(java.lang.String sessionId,
                   int currId)
                   throws KKAdminException
Delete a Currency.

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

int insertCurrency(java.lang.String sessionId,
                   AdminCurrency curr)
                   throws KKAdminException
Insert a Currency.

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

int updateCurrency(java.lang.String sessionId,
                   AdminCurrency curr)
                   throws KKAdminException
Update a Currency.

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

getOrderStatusNames

AdminOrderStatusNameSearchResult getOrderStatusNames(AdminOrderStatusNameSearch search)
                                                     throws KKAdminException
Returns an AdminOrderStatusNameSearchResult object.

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

deleteOrderStatusName

int deleteOrderStatusName(java.lang.String sessionId,
                          int id)
                          throws KKAdminException
Delete an OrderStatusName object.

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

int insertOrderStatusName(java.lang.String sessionId,
                          AdminOrderStatusName obj)
                          throws KKAdminException
Insert an OrderStatusName object.

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

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

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

int updateOrderStatusName(java.lang.String sessionId,
                          AdminOrderStatusName obj)
                          throws KKAdminException
Update an OrderStatusName object

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

getCountries

AdminCountrySearchResult getCountries(AdminCountrySearch search,
                                      int offset,
                                      int size)
                                      throws KKAdminException
This returns an AdminCountrySearchResult object.

Parameters:
search - an AdminCountrySearch object
offset - the offset in the database
size - the number of records from the specified offset
Returns:
Returns an AdminCountrySearchResult object
Throws:
KKAdminException

deleteCountry

int deleteCountry(java.lang.String sessionId,
                  int id)
                  throws KKAdminException
Delete a Country.

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

int insertCountry(java.lang.String sessionId,
                  AdminCountry country)
                  throws KKAdminException
Insert an AdminCountry object.

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

int updateCountry(java.lang.String sessionId,
                  AdminCountry country)
                  throws KKAdminException
Update an AdminCountry object.

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

sendEmail

boolean sendEmail(java.lang.String sessionId,
                  AdminEmail adminEmailData)
                  throws KKAdminException
Send an email as defined in the specified AdminEmail object.

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

int getOrdersCount(java.lang.String sessionId,
                   int orderStatus)
                   throws KKAdminException
Returns a count of the Orders with the specified status.

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

AdminOrderSearchResult getOrdersLite(java.lang.String sessionId,
                                     AdminOrderSearch search,
                                     int offset,
                                     int size,
                                     int languageId)
                                     throws KKAdminException
Returns a set of Orders matching the specified search criteria.

The orders returned are sparsely-populated with:

The returned orders may be sorted by:

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

AdminOrderSearchResult getOrders(java.lang.String sessionId,
                                 AdminOrderSearch search,
                                 int offset,
                                 int size,
                                 int languageId)
                                 throws KKAdminException
Returns a set of Orders that match the search criteria.

The returned orders may be sorted by:

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

getOrdersCreatedSince

@Deprecated
AdminOrder[] getOrdersCreatedSince(java.lang.String sessionId,
                                              java.util.Calendar since,
                                              int languageId)
                                   throws KKAdminException
Deprecated. From version 2.2.4.0 you should use getOrders().

Returns a set of Orders created since the specified date.

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

void updateOrder(java.lang.String sessionId,
                 int orderId,
                 int orderStatus,
                 java.lang.String comments,
                 boolean notifyCustomer,
                 AdminOrderUpdate updateOrder)
                 throws KKAdminException
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.

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
void updateOrderStatus(java.lang.String sessionId,
                                  int orderId,
                                  int orderStatus,
                                  java.lang.String comments,
                                  boolean notifyCustomer)
                       throws KKAdminException
Deprecated. From version 6.2.0.0 you should use updateOrder(java.lang.String, int, int, java.lang.String, boolean, com.konakartadmin.app.AdminOrderUpdate) instead.

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.

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

getAllOrderStatuses

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

Parameters:
languageId -
Returns:
an array of AdminOrderStatusNames for the specified languageId.
Throws:
KKAdminException

getAllAddressFormats

AdminAddressFormat[] getAllAddressFormats()
                                          throws KKAdminException
This returns an array of all the address formats

Returns:
Returns an array of all the address formats
Throws:
KKAdminException

getHtml

java.lang.String getHtml(java.lang.String sessionId,
                         int htmlType,
                         int id,
                         int languageId,
                         java.lang.String arg1)
                         throws KKAdminException
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:

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

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

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

getCustomers

AdminCustomerSearchResult getCustomers(java.lang.String sessionId,
                                       AdminCustomerSearch search,
                                       int offset,
                                       int size)
                                       throws KKAdminException
Returns a set of Customers that match the search criteria.

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

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

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

AdminCustomer getCustomerForId(java.lang.String sessionId,
                               int customerId)
                               throws KKAdminException
Returns the customer object for the customer defined by the given id.

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

AdminProductNotification[] getProductNotificationsForCustomer(java.lang.String sessionId,
                                                              int customerId)
                                                              throws KKAdminException
Get an array of product notifications for the customer.

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

updateCustomer

void updateCustomer(java.lang.String sessionId,
                    AdminCustomer customer)
                    throws KKAdminException
Update a Customer.

Parameters:
sessionId - The session Id of the logged in user
customer - A customer
Throws:
KKAdminException

deleteCustomer

int deleteCustomer(java.lang.String sessionId,
                   int custId)
                   throws KKAdminException
Delete a Customer.

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

deleteOrder

int deleteOrder(java.lang.String sessionId,
                int ordId)
                throws KKAdminException
Deletes an order and all associated records (eg addresses, status history etc).

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

getCustomersCount

int getCustomersCount(java.lang.String sessionId,
                      AdminCustomerSearch search)
                      throws KKAdminException
Returns a count of the number of Customers matching the specified search.

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

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

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

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

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

getAllCountriesFull

AdminCountry[] getAllCountriesFull()
                                   throws KKAdminException
Returns an array of all Country objects in the database. The objects are fully-populated.

Returns:
Returns an array of Countries - fully-populated
Throws:
KKAdminException

getAllTaxClassesFull

AdminTaxClass[] getAllTaxClassesFull()
                                     throws KKAdminException
Returns an array of all AdminTaxClass objects in the database. The objects are fully-populated.

Returns:
Returns an array of AdminTaxClass objects - fully-populated
Throws:
KKAdminException

getZonesById

AdminZone[] getZonesById(int countryId)
                         throws KKAdminException
Returns an array of fully-populated AdminZones for the specified countryId.

Parameters:
countryId - the countryId
Returns:
Returns an array of AdminZones for the specified countryId - fully-populated
Throws:
KKAdminException

getAllGeoZones

AdminGeoZone[] getAllGeoZones()
                              throws KKAdminException
Returns an array of all GeoZones in the database.

Returns:
Returns an array of all GeoZones - fully-populated
Throws:
KKAdminException

getGeoZones

AdminGeoZoneSearchResult getGeoZones(AdminGeoZoneSearch search,
                                     int offset,
                                     int size)
                                     throws KKAdminException
This returns an AdminGeoZoneSearchResult object.

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

deleteGeoZone

int deleteGeoZone(java.lang.String sessionId,
                  int id)
                  throws KKAdminException
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.

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

int insertGeoZone(java.lang.String sessionId,
                  AdminGeoZone insertObj)
                  throws KKAdminException
Insert an AdminGeoZone object.

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

int updateGeoZone(java.lang.String sessionId,
                  AdminGeoZone updateObj)
                  throws KKAdminException
Update an AdminGeoZone object.

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

getSubZones

AdminSubZoneSearchResult getSubZones(AdminSubZoneSearch search,
                                     int offset,
                                     int size)
                                     throws KKAdminException
This returns an AdminSubZoneSearchResult object.

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

deleteSubZone

int deleteSubZone(java.lang.String sessionId,
                  int id)
                  throws KKAdminException
Delete a SubZone.

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

int insertSubZone(java.lang.String sessionId,
                  AdminSubZone insertObj)
                  throws KKAdminException
Insert an AdminSubZone object.

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

int updateSubZone(java.lang.String sessionId,
                  AdminSubZone updateObj)
                  throws KKAdminException
Update an AdminSubZone object.

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

java.lang.String[] getConfigurationInfo(java.lang.String sessionId,
                                        java.lang.String[] validationKeys)
                                        throws KKAdminException
Get the configuration values for the given keys.

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

KKConfiguration[] getAllConfigurations(java.lang.String sessionId)
                                       throws KKAdminException
Returns an array of all the Configuration objects.

Parameters:
sessionId - The session Id of the logged in user
Returns:
An array of Configuration objects
Throws:
KKAdminException

getAllConfigurationGroups

AdminConfigurationGroup[] getAllConfigurationGroups(java.lang.String sessionId)
                                                    throws KKAdminException
Returns an array of all the Configuration Group objects.

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

insertConfigurationGroup

int insertConfigurationGroup(java.lang.String sessionId,
                             AdminConfigurationGroup configGroup)
                             throws KKAdminException
Insert a configuration group.

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

int insertConfiguration(java.lang.String sessionId,
                        KKConfiguration config)
                        throws KKAdminException
Insert a configuration object.

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

updateConfiguration

void updateConfiguration(java.lang.String sessionId,
                         KKConfiguration newConf)
                         throws KKAdminException
Updates a KKConfiguration object.

Parameters:
sessionId - The session Id of the logged in user
newConf - the KKConfiguration to update
Throws:
KKAdminException

updateConfigurationGroup

void updateConfigurationGroup(java.lang.String sessionId,
                              AdminConfigurationGroup newConf)
                              throws KKAdminException
Updates an AdminConfigurationGroup object.

Parameters:
sessionId - The session Id of the logged in user
newConf - the AdminConfigurationGroup to update
Throws:
KKAdminException

getConfigurationGroupsByTitle

AdminConfigurationGroup[] getConfigurationGroupsByTitle(java.lang.String sessionId,
                                                        java.lang.String title)
                                                        throws KKAdminException
Returns an array of AdminConfigurationGroup objects with the specified title.

Parameters:
sessionId - The session Id of the logged in user
title -
Returns:
An array of AdminConfigurationGroup objects
Throws:
KKAdminException

getConfigurationByKey

KKConfiguration getConfigurationByKey(java.lang.String sessionId,
                                      java.lang.String key)
                                      throws KKAdminException
Returns a KKConfiguration object with the specified key.

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

registerCustomer

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

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

int forceRegisterCustomer(java.lang.String sessionId,
                          AdminCustomerRegistration custReg)
                          throws KKAdminException
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.

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

void resetCustomerPassword(java.lang.String sessionId,
                           int custId)
                           throws KKAdminException
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.

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

void resetCustomerPasswordSpecifyingEmail(java.lang.String sessionId,
                                          int custId,
                                          java.lang.String eMailAddress)
                                          throws KKAdminException
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.

Parameters:
sessionId -
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

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

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

changePassword

void changePassword(java.lang.String sessionId,
                    java.lang.String currentPassword,
                    java.lang.String newPassword)
                    throws KKAdminException
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.

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

getConfigurationsByGroup

KKConfiguration[] getConfigurationsByGroup(java.lang.String sessionId,
                                           int configGroup)
                                           throws KKAdminException
Get the configuration elements for the specified group

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

saveConfigs

void saveConfigs(java.lang.String sessionId,
                 KKConfiguration[] configs,
                 KKConfiguration[] origConfigs)
                 throws KKAdminException
Saves an array of KKConfiguration objects to the database.

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

void insertConfigs(java.lang.String sessionId,
                   KKConfiguration[] config)
                   throws KKAdminException
Insert one or more new configuration parameters

Parameters:
sessionId - The session Id of the logged in user
config - an array of KKConfiguration objects to insert
Throws:
KKAdminException

removeConfigs

void removeConfigs(java.lang.String sessionId,
                   java.lang.String[] configKeys)
                   throws KKAdminException
Remove one or more configuration parameters

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

getModules

KKModule[] getModules(java.lang.String sessionId,
                      int moduleType)
                      throws KKAdminException
Get the available modules of the specified type.

Valid types are:

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

insertProduct

int insertProduct(java.lang.String sessionId,
                  AdminProduct product)
                  throws KKAdminException
Insert the product. The product must have at least one associated AdminProductDescription object.

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

int insertProductWithOptions(java.lang.String sessionId,
                             AdminProduct product,
                             AdminProductMgrOptions mgrOptions)
                             throws KKAdminException
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.

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

doesProductExist

boolean doesProductExist(java.lang.String sessionId,
                         int productId)
                         throws KKAdminException
Is there a product in the database with the specified productId

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

AdminProduct getProduct(java.lang.String sessionId,
                        int productId)
                        throws KKAdminException
Get the product referenced by this product id, from the database.

Parameters:
sessionId - The session Id of the logged in user
productId - The numeric id of the product
Returns:
Returns the product
Throws:
KKAdminException

getProductWithOptions

AdminProduct getProductWithOptions(java.lang.String sessionId,
                                   int productId,
                                   AdminProductMgrOptions mgrOptions)
                                   throws KKAdminException
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.

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

AdminProducts searchForProducts(java.lang.String sessionId,
                                AdminDataDescriptor dataDesc,
                                AdminProductSearch prodSearch,
                                int languageId)
                                throws KKAdminException
Search for products.

The AdminDataDescriptor allows you to:

The AdminProductSearch product allows you to enter additional search parameters.

The Products may be sorted by :

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

AdminProducts searchForProductsWithOptions(java.lang.String sessionId,
                                           AdminDataDescriptor dataDesc,
                                           AdminProductSearch prodSearch,
                                           int languageId,
                                           AdminProductMgrOptions mgrOptions)
                                           throws KKAdminException
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.

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

editProduct

void editProduct(java.lang.String sessionId,
                 AdminProduct product)
                 throws KKAdminException
Edits the product, replacing existing data with data in the product parameter.

Parameters:
sessionId - The session Id of the logged in user
product - AdminProduct object
Throws:
KKAdminException

editProductWithOptions

void editProductWithOptions(java.lang.String sessionId,
                            AdminProduct product,
                            AdminProductMgrOptions mgrOptions)
                            throws KKAdminException
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.

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

deleteProduct

void deleteProduct(java.lang.String sessionId,
                   int productId)
                   throws KKAdminException
Delete the product referenced by the productId parameter.

Parameters:
sessionId - The session Id of the logged in user
productId - The numeric id of the product
Throws:
KKAdminException

deleteCategoryTree

void deleteCategoryTree(java.lang.String sessionId,
                        int categoryId,
                        int options)
                        throws KKAdminException
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.

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

void deleteSingleCategory(java.lang.String sessionId,
                          int categoryId)
                          throws KKAdminException
Delete a single category and its descriptions.

Parameters:
sessionId - The session Id of the logged in user
categoryId - The numeric id of the category
Throws:
KKAdminException

getCategory

AdminCategory getCategory(int categoryId,
                          boolean getChildren,
                          int languageId)
                          throws KKAdminException
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.

Parameters:
categoryId - The numeric id of the category
getChildren -
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

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

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

insertCategory

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

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

moveCategory

void moveCategory(java.lang.String sessionId,
                  int categoryId,
                  int newParentId)
                  throws KKAdminException
The category referenced by categoryId is moved to a new parent referenced by newParentId.

Parameters:
sessionId - The session Id of the logged in user
categoryId - The numeric id of the category
newParentId -
Throws:
KKAdminException

editCategory

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

Parameters:
sessionId - The session Id of the logged in user
cat - An AdminCategory object
Throws:
KKAdminException

deleteManufacturer

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

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

void editManufacturer(java.lang.String sessionId,
                      AdminManufacturer manu)
                      throws KKAdminException
Edits the manufacturer, replacing existing data with data in the manu parameter.

Parameters:
sessionId - The session Id of the logged in user
manu - AdminManufacturer object
Throws:
KKAdminException

getAllManufacturers

AdminManufacturer[] getAllManufacturers()
                                        throws KKAdminException
Get all manufacturers ordered by name.

Returns:
Return an array of all manufacturers
Throws:
KKAdminException

getManufacturer

AdminManufacturer getManufacturer(int manufacturerId)
                                  throws KKAdminException
Get a fully populated manufacturer

Parameters:
manufacturerId - The numeric id of the manufacturer
Returns:
Return a fully populated manufacturer
Throws:
KKAdminException

insertManufacturer

int insertManufacturer(java.lang.String sessionId,
                       AdminManufacturer manu)
                       throws KKAdminException
Insert a manufacturer

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

deleteReview

void deleteReview(java.lang.String sessionId,
                  int reviewId)
                  throws KKAdminException
Delete the review and all entries in the reviews description table.

Parameters:
sessionId - The session Id of the logged in user
reviewId - NUmeric id of the review
Throws:
KKAdminException

editReview

void editReview(java.lang.String sessionId,
                AdminReview review)
                throws KKAdminException
Edits the review, replacing existing data with data in the review parameter.

Parameters:
sessionId - The session Id of the logged in user
review - AdminReview object
Throws:
KKAdminException

getAllReviews

AdminReviews getAllReviews(java.lang.String sessionId,
                           AdminDataDescriptor dataDesc)
                           throws KKAdminException
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:

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

AdminReview getReview(java.lang.String sessionId,
                      int reviewId)
                      throws KKAdminException
Returns the review referenced by the review Id

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

AdminReviews getReviewsPerProduct(java.lang.String sessionId,
                                  AdminDataDescriptor dataDesc,
                                  int productId)
                                  throws KKAdminException
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:

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

AdminReviews getReviews(java.lang.String sessionId,
                        AdminDataDescriptor dataDesc,
                        AdminReviewSearch revSearch)
                        throws KKAdminException
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:

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

int insertReview(java.lang.String sessionId,
                 AdminReview review)
                 throws KKAdminException
A new review is inserted

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

insertSpecial

int insertSpecial(java.lang.String sessionId,
                  AdminSpecial special)
                  throws KKAdminException
Inserts a new special

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

AdminSpecial getSpecial(java.lang.String sessionId,
                        int specialId)
                        throws KKAdminException
Returns a special referenced by the id parameter

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

void deleteSpecial(java.lang.String sessionId,
                   int specialId)
                   throws KKAdminException
Deletes the special referenced by the special id

Parameters:
sessionId - The session Id of the logged in user
specialId - The numeric id of the special
Throws:
KKAdminException

editSpecial

void editSpecial(java.lang.String sessionId,
                 AdminSpecial special)
                 throws KKAdminException
Edits the special, replacing existing data with data in the special parameter.

Parameters:
sessionId - The session Id of the logged in user
special - AdminSpecial object
Throws:
KKAdminException

getAllSpecials

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

The Specials may be sorted by :

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

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

The Specials may be sorted by :

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

getAllProductOptions

AdminProductOption[] getAllProductOptions(int languageId)
                                          throws KKAdminException
Return all product options in the database for any given language.

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

getProductOptions

AdminProductOptionSearchResult getProductOptions(java.lang.String sessionId,
                                                 AdminProductOptionSearch search,
                                                 int offset,
                                                 int size)
                                                 throws KKAdminException
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.

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

getProductOptionValuesPerOption

AdminProductOptionValue[] getProductOptionValuesPerOption(int productOptionId,
                                                          int languageId)
                                                          throws KKAdminException
Return an array of product option value objects for a product option object

Parameters:
productOptionId -
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

deleteProductOptions

void deleteProductOptions(java.lang.String sessionId,
                          int productOptionId)
                          throws KKAdminException
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.

Parameters:
sessionId - The session Id of the logged in user
productOptionId - The numeric id of the productOption
Throws:
KKAdminException

deleteProductOptionValues

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

Parameters:
sessionId - The session Id of the logged in user
productOptionValueId - The numeric id of the productOptionValue
Throws:
KKAdminException

getProductOptionsPerId

AdminProductOption[] getProductOptionsPerId(java.lang.String sessionId,
                                            int productOptionId)
                                            throws KKAdminException
Returns an array of AdminProductOption objects. One for each language.

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

AdminProductOption[] getProductOptionsPerName(java.lang.String sessionId,
                                              java.lang.String name,
                                              int langId)
                                              throws KKAdminException
Returns an array of productOptions with the specified name and languageId.

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

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

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

AdminProductOptionValue[] getProductOptionValuesPerId(java.lang.String sessionId,
                                                      int productOptionValueId)
                                                      throws KKAdminException
Returns an array of productOptionValues. One for each language.

Parameters:
sessionId - The session Id of the logged in user
productOptionValueId -
Returns:
Return an array of productOptionValues objects
Throws:
KKAdminException

getProductOptionValuesPerName

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

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

AdminProdOptionValToProdOption[] getProductOptionValueToProductOptions(java.lang.String sessionId,
                                                                       AdminProdOptionValToProdOption prodOptValToProdOpt)
                                                                       throws KKAdminException
Gets an array of AdminProdOptionValToProdOption objects that have the specified optionId and OptionValueId.

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

insertProductsOptionsValuesToProductsOptions

int insertProductsOptionsValuesToProductsOptions(java.lang.String sessionId,
                                                 AdminProdOptionValToProdOption prodOptValToProdOpt)
                                                 throws KKAdminException
Insert a product option value to product option record.

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

insertProductOption

void insertProductOption(java.lang.String sessionId,
                         AdminProductOption productOption)
                         throws KKAdminException
Insert a product option.

Parameters:
sessionId - The session Id of the logged in user
productOption - An AdminProductOption object
Throws:
KKAdminException

editProductOption

void editProductOption(java.lang.String sessionId,
                       AdminProductOption productOption)
                       throws KKAdminException
Edits the product option, replacing existing data with data in the productOption parameter.

Parameters:
sessionId - The session Id of the logged in user
productOption - AdminProductOption object
Throws:
KKAdminException

insertProductOptionValue

void insertProductOptionValue(java.lang.String sessionId,
                              AdminProductOptionValue productOptionValue,
                              int productOptionId)
                              throws KKAdminException
Insert a product option value for a product option

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

void editProductOptionValue(java.lang.String sessionId,
                            AdminProductOptionValue productOptionValue)
                            throws KKAdminException
Edits the product option value, replacing existing data with data in the productOptionValue parameter.

Parameters:
sessionId - The session Id of the logged in user
productOptionValue - AdminProductOptionValue object
Throws:
KKAdminException

getNextProductOptionId

int getNextProductOptionId(java.lang.String sessionId)
                           throws KKAdminException
Get the next id to use when inserting a ProductOption record.

Parameters:
sessionId - The session Id of the logged in user
Returns:
The next id
Throws:
KKAdminException

getNextProductOptionValuesId

int getNextProductOptionValuesId(java.lang.String sessionId)
                                 throws KKAdminException
Get the next id to use when inserting a ProductOptionValue record.

Parameters:
sessionId - The session Id of the logged in user
Returns:
The next id
Throws:
KKAdminException

getProductAttributesPerProduct

AdminProductAttribute[] getProductAttributesPerProduct(java.lang.String sessionId,
                                                       int productId)
                                                       throws KKAdminException
Gets all of the product attributes for the product.

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

void deleteProductAttribute(java.lang.String sessionId,
                            int productAttributeId)
                            throws KKAdminException
Delete the productAttribute.

Parameters:
sessionId - The session Id of the logged in user
productAttributeId - The numeric id of the product attribute
Throws:
KKAdminException

deleteProductAttributesPerProduct

void deleteProductAttributesPerProduct(java.lang.String sessionId,
                                       int productId)
                                       throws KKAdminException
Delete the productAttributes Per product.

Parameters:
sessionId - The session Id of the logged in user
productId - The numeric id of the product
Throws:
KKAdminException

editProductAttribute

void editProductAttribute(java.lang.String sessionId,
                          AdminProductAttribute prodAttr)
                          throws KKAdminException
Edits the product attribute, replacing existing data with data in the prodAttr parameter.

Parameters:
sessionId - The session Id of the logged in user
prodAttr - AdminProductAttribute object
Throws:
KKAdminException

insertProductAttribute

int insertProductAttribute(java.lang.String sessionId,
                           AdminProductAttribute prodAttr)
                           throws KKAdminException
Inserts the product attribute.

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

insertProductOptions

int insertProductOptions(java.lang.String sessionId,
                         AdminProductOption[] productOptions)
                         throws KKAdminException
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.

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

insertProductOptionValues

int insertProductOptionValues(java.lang.String sessionId,
                              AdminProductOptionValue[] productOptionValues,
                              int productOptionId)
                              throws KKAdminException
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.

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

checkSession

int checkSession(java.lang.String sessionId)
                 throws KKAdminException
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.

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

login

java.lang.String login(java.lang.String user,
                       java.lang.String password)
                       throws KKAdminException
Used to log into the Admin application and get a session Id.

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

void logout(java.lang.String sessionId)
            throws KKAdminException
Used to logout the user with the specified sessionId.

Parameters:
sessionId - The session Id of the logged in user
Throws:
KKAdminException

getAllTaxRates

AdminTaxRateSearchResult getAllTaxRates()
                                        throws KKAdminException
This returns an AdminTaxRateSearchResult object.

Returns:
Returns an AdminTaxRateSearchResult object
Throws:
KKAdminException

getTaxRates

AdminTaxRateSearchResult getTaxRates(AdminTaxRateSearch search,
                                     int offset,
                                     int size)
                                     throws KKAdminException
This returns an AdminTaxRateSearchResult object.

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

deleteTaxRate

int deleteTaxRate(java.lang.String sessionId,
                  int id)
                  throws KKAdminException
Delete an AdminTaxRate object referenced by it's id.

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

int insertTaxRate(java.lang.String sessionId,
                  AdminTaxRate insertObj)
                  throws KKAdminException
Insert an AdminTaxRate object

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

int updateTaxRate(java.lang.String sessionId,
                  AdminTaxRate updateObj)
                  throws KKAdminException
Update an AdminTaxRate object

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

getZones

AdminZoneSearchResult getZones(AdminZoneSearch search,
                               int offset,
                               int size)
                               throws KKAdminException
This returns an AdminZoneSearchResult object.

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

deleteZone

int deleteZone(java.lang.String sessionId,
               int id)
               throws KKAdminException
Delete an AdminZone object referenced by it's id.

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

int insertZone(java.lang.String sessionId,
               AdminZone insertObj)
               throws KKAdminException
Insert an AdminZone object

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

int updateZone(java.lang.String sessionId,
               AdminZone updateObj)
               throws KKAdminException
Update an AdminZone object

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

getTaxClasses

AdminTaxClassSearchResult getTaxClasses(AdminTaxClassSearch search)
                                        throws KKAdminException
This returns an AdminTaxClassSearchResult object.

Parameters:
search - the definition of the search - can be null
Returns:
Returns an AdminTaxClassSearchResult object
Throws:
KKAdminException

deleteTaxClass

int deleteTaxClass(java.lang.String sessionId,
                   int id)
                   throws KKAdminException
Delete an AdminTaxClass object referenced by it's id.

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

int insertTaxClass(java.lang.String sessionId,
                   AdminTaxClass insertObj)
                   throws KKAdminException
Insert an AdminTaxClass object

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

int updateTaxClass(java.lang.String sessionId,
                   AdminTaxClass updateObj)
                   throws KKAdminException
Update an AdminTaxClass object

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

getAddressFormats

AdminAddressFormatSearchResult getAddressFormats(AdminAddressFormatSearch search)
                                                 throws KKAdminException
This returns an AdminAddressFormatSearchResult object.

Parameters:
search - the definition of the search - can be null
Returns:
Returns an AdminAddressFormatSearchResult object
Throws:
KKAdminException

deleteAddressFormat

int deleteAddressFormat(java.lang.String sessionId,
                        int id)
                        throws KKAdminException
Delete an AdminAddressFormat object referenced by it's id.

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

int insertAddressFormat(java.lang.String sessionId,
                        AdminAddressFormat insertObj)
                        throws KKAdminException
Insert an AdminAddressFormat object

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

int updateAddressFormat(java.lang.String sessionId,
                        AdminAddressFormat updateObj)
                        throws KKAdminException
Update an AdminAddressFormat object

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

searchForIpnHistory

AdminIpnHistories searchForIpnHistory(java.lang.String sessionId,
                                      AdminDataDescriptor dataDesc,
                                      AdminIpnSearch ipnSearch)
                                      throws KKAdminException
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.

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

int insertIpnHistory(java.lang.String sessionId,
                     AdminIpnHistory ipnHistory)
                     throws KKAdminException
Save the AdminIpnHistory object in the database.

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

int deleteExpiredSessions(java.lang.String sessionId)
                          throws KKAdminException
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.

Parameters:
sessionId - The session Id of the logged in user
Returns:
Returns the number of remaining sessions
Throws:
KKAdminException

testDB

AdminDBConnector testDB(AdminDBConnector connector)
                        throws KKAdminException
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.

Parameters:
connector -
Returns:
An AdminDBConnector object with details about the DB connection
Throws:
KKAdminException

setConfigurationValue

boolean setConfigurationValue(java.lang.String sessionId,
                              java.lang.String key,
                              java.lang.String value)
                              throws KKAdminException
Sets a Configuration Value for the specified key

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

getConfigFiles

AdminFile[] getConfigFiles(java.lang.String sessionId)
                           throws KKAdminException
Gets the Config files defined in konakart_config_files.xml

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

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

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

void reloadReports(java.lang.String sessionId)
                   throws KKAdminException
Reloads the reports

Parameters:
sessionId - The session Id of the logged in user
Throws:
KKAdminException

getFileContents

java.lang.String getFileContents(java.lang.String sessionId,
                                 java.lang.String fileName)
                                 throws KKAdminException
Get the file contents. Note that is uses the line terminators appropriate for the platform where the file resides.

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

byte[] getFileContentsAsByteArray(java.lang.String sessionId,
                                  java.lang.String fileName)
                                  throws KKAdminException
Get the file contents as a byte array.

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

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

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

boolean deleteFile(java.lang.String sessionId,
                   java.lang.String fileName)
                   throws KKAdminException
Delete the file.

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

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

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

void addCouponsToPromotion(java.lang.String sessionId,
                           AdminCoupon[] coupons,
                           int promotionId)
                           throws KKAdminException
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.

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

void addPromotionsToCoupon(java.lang.String sessionId,
                           AdminPromotion[] promotions,
                           int couponId)
                           throws KKAdminException
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.

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

void addCustomersToPromotion(java.lang.String sessionId,
                             AdminCustomer[] customers,
                             int promotionId,
                             int rule,
                             int maxUse)
                             throws KKAdminException
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:

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

void addCustomerGroupsToPromotion(java.lang.String sessionId,
                                  int[] groupIds,
                                  int promotionId,
                                  int rule)
                                  throws KKAdminException
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:

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

void addCustomersToPromotionPerOrdersMade(java.lang.String sessionId,
                                          java.util.Calendar lastOrderDate,
                                          boolean havePlacedOrder,
                                          int promotionId,
                                          int rule,
                                          int maxUse)
                                          throws KKAdminException
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:

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

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

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

void addExpressionsToPromotion(java.lang.String sessionId,
                               AdminExpression[] expressions,
                               int promotionId)
                               throws KKAdminException
Add the array of expressions to the promotion identified by promotionId.

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

void addProductsToPromotion(java.lang.String sessionId,
                            AdminProduct[] products,
                            int promotionId,
                            int rule)
                            throws KKAdminException
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:

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

void addGiftCertificatesToPromotion(java.lang.String sessionId,
                                    AdminProduct[] giftCertificates,
                                    int promotionId)
                                    throws KKAdminException
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.

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

void deletePromotion(java.lang.String sessionId,
                     int promotionId)
                     throws KKAdminException
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.

Parameters:
sessionId - The session id of the logged in user
promotionId - The numeric id of the promotion
Throws:
KKAdminException

deleteCoupon

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

Parameters:
sessionId - The session id of the logged in user
couponId - The numeric id of the coupon
Throws:
KKAdminException

editCoupon

void editCoupon(java.lang.String sessionId,
                AdminCoupon coupon)
                throws KKAdminException
Edits the coupon, replacing existing data with data in the coupon parameter.

Parameters:
sessionId - The session id of the logged in user
coupon - An Admin coupon object
Throws:
KKAdminException

editPromotion

void editPromotion(java.lang.String sessionId,
                   AdminPromotion promotion)
                   throws KKAdminException
Edits the promotion, replacing existing data with data in the promotion parameter.

Parameters:
sessionId - The session id of the logged in user
promotion - AdminPromotion object
Throws:
KKAdminException

getCouponsPerPromotion

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

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

AdminCouponSearchResult getCoupons(java.lang.String sessionId,
                                   AdminCouponSearch search,
                                   int offset,
                                   int size)
                                   throws KKAdminException
This returns an AdminCouponSearchResult object containing an array of AdminCoupons.

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

getProductsPerPromotion

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

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

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

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

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

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

AdminPromotionSearchResult getPromotions(java.lang.String sessionId,
                                         AdminPromotionSearch search,
                                         int offset,
                                         int size)
                                         throws KKAdminException
This returns an AdminPromotionSearchResult object containing an array of AdminPromotions.

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

int getPromotionsCount(java.lang.String sessionId,
                       AdminPromotionSearch search)
                       throws KKAdminException
Returns a count of the number of AdminPromotions.

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

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

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

int insertCouponForPromotion(java.lang.String sessionId,
                             AdminCoupon coupon,
                             int promotionId)
                             throws KKAdminException
Inserts a coupon and also a record in the promotion_to_coupon table to associate the coupon to a promotion.

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

int insertCoupon(java.lang.String sessionId,
                 AdminCoupon coupon)
                 throws KKAdminException
Inserts a coupon.

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

int insertPromotion(java.lang.String sessionId,
                    AdminPromotion prom)
                    throws KKAdminException
Inserts a promotion.

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

void removeCategoriesFromPromotion(java.lang.String sessionId,
                                   AdminCategory[] categories,
                                   int promotionId)
                                   throws KKAdminException
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.

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

void removeCouponsFromPromotion(java.lang.String sessionId,
                                AdminCoupon[] coupons,
                                int promotionId)
                                throws KKAdminException
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.

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

void removePromotionsFromCoupon(java.lang.String sessionId,
                                AdminPromotion[] promotions,
                                int couponId)
                                throws KKAdminException
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.

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

void removeCustomersFromPromotion(java.lang.String sessionId,
                                  AdminCustomer[] customers,
                                  int promotionId)
                                  throws KKAdminException
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.

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

void removeCustomerGroupsFromPromotion(java.lang.String sessionId,
                                       int[] groupIds,
                                       int promotionId)
                                       throws KKAdminException
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.

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

void removeManufacturersFromPromotion(java.lang.String sessionId,
                                      AdminManufacturer[] manufacturers,
                                      int promotionId)
                                      throws KKAdminException
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.

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

void removeExpressionsFromPromotion(java.lang.String sessionId,
                                    AdminExpression[] expressions,
                                    int promotionId)
                                    throws KKAdminException
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.

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

void removeProductsFromPromotion(java.lang.String sessionId,
                                 AdminProduct[] products,
                                 int promotionId)
                                 throws KKAdminException
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.

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

void removeGiftCertificatesFromPromotion(java.lang.String sessionId,
                                         AdminProduct[] giftCertificates,
                                         int promotionId)
                                         throws KKAdminException
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.

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

getCategoriesPerPromotion

AdminCategory[] getCategoriesPerPromotion(java.lang.String sessionId,
                                          int promotionId,
                                          int languageId)
                                          throws KKAdminException
Returns all of the categories for the promotion identified by promotionId.

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

AdminCustomerGroup[] getCustomerGroupsPerPromotion(java.lang.String sessionId,
                                                   int promotionId,
                                                   int languageId)
                                                   throws KKAdminException
Returns all of the customer groups for the promotion identified by promotionId.

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

AdminManufacturer[] getManufacturersPerPromotion(java.lang.String sessionId,
                                                 int promotionId)
                                                 throws KKAdminException
Returns all of the manufacturers for the promotion identified by promotionId.

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

getRelatedProducts

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

Valid values for relationType are:

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
relationType -
languageId - the language Id - or it could be com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG to use the default language
Returns:
AdminProducts
Throws:
KKAdminException

getRelatedProductsWithOptions

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

Valid values for relationType are:

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
relationType -
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

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

Valid values for relationType are:

Parameters:
sessionId - The session id of the logged in user
productId - The numeric id of the product
relationType -
Throws:
KKAdminException

addRelatedProducts

void addRelatedProducts(java.lang.String sessionId,
                        AdminProduct[] products,
                        int productId,
                        int relationType)
                        throws KKAdminException
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:

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

getOrderForOrderId

AdminOrder getOrderForOrderId(java.lang.String sessionId,
                              int orderId)
                              throws KKAdminException
Retrieve an order for an orderId, using the default language

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

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

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

readFromUrl

java.lang.String readFromUrl(java.lang.String sessionId,
                             java.lang.String url)
                             throws KKAdminException
Reads the resource at the given URL and returns it as a string.

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

void editOrderReturn(java.lang.String sessionId,
                     AdminOrderReturn orderRet)
                     throws KKAdminException
Edits the orderReturn, replacing existing data with data in the orderRet parameter.

Parameters:
sessionId - The session id of the logged in user
orderRet - AdminOrderReturn object
Throws:
KKAdminException

insertOrderReturn

int insertOrderReturn(java.lang.String sessionId,
                      AdminOrderReturn orderRet)
                      throws KKAdminException
Insert an AdminOrderReturn object and its array of AdminOrderReturnProduct objects

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

void deleteOrderReturn(java.lang.String sessionId,
                       int orderRetId)
                       throws KKAdminException
Delete the AdminOrderReturn object and any associated AdminOrderReturnProduct objects.

Parameters:
sessionId - The session id of the logged in user
orderRetId - The id of the AdminOrderReturn object
Throws:
KKAdminException

getOrderReturns

AdminOrderReturnSearchResult getOrderReturns(java.lang.String sessionId,
                                             AdminOrderReturnSearch retSearch,
                                             int offset,
                                             int size)
                                             throws KKAdminException
Search for OrderReturn objects with search criteria and order by criteria.

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

setEndpoint

void setEndpoint(java.lang.String wsEndpoint)
                 throws KKAdminException
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.

Parameters:
wsEndpoint - A String representing the web service endpoint
Throws:
KKAdminException

getMsgs

AdminMessageSet getMsgs(java.lang.String languageCode)
                        throws KKAdminException
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.

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

getCustomValidatorSet

AdminCustomValidatorSet getCustomValidatorSet()
                                              throws KKAdminException
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.

Returns:
an AdminCustomValidatorSet object
Throws:
KKAdminException

getHelpMsg

java.lang.String getHelpMsg(java.lang.String msgKey,
                            java.lang.String languageCode)
                            throws KKAdminException
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.

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

getSku

java.lang.String getSku(java.lang.String sessionId,
                        AdminOrderProduct orderProd)
                        throws KKAdminException
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.

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

getSkus

java.lang.String[] getSkus(java.lang.String sessionId,
                           AdminOrderProduct[] orderProds)
                           throws KKAdminException
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.

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

boolean doesCustomerExistForEmail(java.lang.String sessionId,
                                  java.lang.String emailAddr)
                                  throws KKAdminException
Checks to see whether a customer already exists with this email address.

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

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

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

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

Parameters:
sessionId - The session id of the logged in user
audit -
Returns:
Returns the id of the new Audit Object
Throws:
KKAdminException

deleteAuditData

void deleteAuditData(java.lang.String sessionId,
                     AdminAuditSearch delSearch)
                     throws KKAdminException
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.

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

getRolesPerSessionId

AdminRole[] getRolesPerSessionId(java.lang.String sessionId)
                                 throws KKAdminException
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.

Parameters:
sessionId - The session id of the logged in user
Returns:
Returns an array of AdminRole objects
Throws:
KKAdminException

getRolesPerUser

AdminRole[] getRolesPerUser(java.lang.String sessionId,
                            int userId)
                            throws KKAdminException
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.

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

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

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

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

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

removePanelsFromRole

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

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

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

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

void addPanelsToRole(java.lang.String sessionId,
                     AdminPanel[] panels,
                     int roleId)
                     throws KKAdminException
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.

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

void addApiCallsToRole(java.lang.String sessionId,
                       AdminApiCall[] apiCalls,
                       int roleId)
                       throws KKAdminException
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.

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

AdminPanel[] getPanelsPerRole(java.lang.String sessionId,
                              int roleId)
                              throws KKAdminException
Retrieves an array of AdminPanel objects for the role identified by the roleId parameter.

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

AdminApiCall[] getApiCallsPerRole(java.lang.String sessionId,
                                  int roleId)
                                  throws KKAdminException
Retrieves an array of AdminApiCall objects for the role identified by the roleId parameter.

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

AdminPanel[] getAllPanels(java.lang.String sessionId)
                          throws KKAdminException
Returns an array of all panels in the database.

Parameters:
sessionId - The session id of the logged in user
Returns:
Returns an array of AdminPanel objects
Throws:
KKAdminException

getAllApiCalls

AdminApiCall[] getAllApiCalls(java.lang.String sessionId)
                              throws KKAdminException
Returns an array of all apiCalls in the database.

Parameters:
sessionId - The session id of the logged in user
Returns:
Returns an array of AdminApiCall objects
Throws:
KKAdminException

getAllRoles

AdminRole[] getAllRoles(java.lang.String sessionId)
                        throws KKAdminException
Returns an array of all Roles in the database.

Parameters:
sessionId - The session id of the logged in user
Returns:
Returns an array of AdminRole objects
Throws:
KKAdminException

editRole

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

Parameters:
sessionId - The session id of the logged in user
role - AdminRole object
Throws:
KKAdminException

insertRole

int insertRole(java.lang.String sessionId,
               AdminRole role)
               throws KKAdminException
Insert a new Role. The role name is mandatory.

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

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

Parameters:
sessionId - The session id of the logged in user
roleId - The id of the Role
Throws:
KKAdminException

deletePanel

void deletePanel(java.lang.String sessionId,
                 int panelId)
                 throws KKAdminException
Deletes the panel identified by the panelId parameter. All role_to_panel records are also deleted.

Parameters:
sessionId - The session id of the logged in user
panelId - The numeric id of the panel
Throws:
KKAdminException

deleteApiCall

void deleteApiCall(java.lang.String sessionId,
                   int apiCallId)
                   throws KKAdminException
Deletes the apiCall identified by the apiCallId parameter. All role_to_api_call records are also deleted.

Parameters:
sessionId - The session id of the logged in user
apiCallId - The numeric id of the ApiCall
Throws:
KKAdminException

editPanel

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

Parameters:
sessionId - The session id of the logged in user
panel - AdminPanel object
Throws:
KKAdminException

editApiCall

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

Parameters:
sessionId - The session id of the logged in user
apiCall - An AdminApiCall object
Throws:
KKAdminException

getPanel

AdminPanel getPanel(java.lang.String sessionId,
                    int panelId)
                    throws KKAdminException
Returns the AdminPanel referenced by the panelId.

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

AdminApiCall getApiCall(java.lang.String sessionId,
                        int apiCallId)
                        throws KKAdminException
Returns the AdminApiCall referenced by the apiCallId.

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

AdminRole getRole(java.lang.String sessionId,
                  int roleId)
                  throws KKAdminException
Returns the AdminRole referenced by the roleId.

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

insertPanel

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

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

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

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

void insertDigitalDownload(java.lang.String sessionId,
                           int customerId,
                           int productId)
                           throws KKAdminException
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.

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

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
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.

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

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
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.

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

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
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.

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

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
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.

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

void insertProductNotification(java.lang.String sessionId,
                               AdminProductNotification apn)
                               throws KKAdminException
Insert a Product Notification record for the specified customer and product.

Parameters:
sessionId - The session id of the logged in user
apn - An AdminProductNotification object
Throws:
KKAdminException

deleteProductNotification

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

Parameters:
sessionId - The session id of the logged in user
apn - An AdminProductNotification object
Throws:
KKAdminException

getCustomerForEmail

AdminCustomer getCustomerForEmail(java.lang.String sessionId,
                                  java.lang.String emailAddress)
                                  throws KKAdminException
Find and return a customer with an email address matching the emailAddress parameter.

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

insertCustomerGroup

int insertCustomerGroup(java.lang.String sessionId,
                        AdminCustomerGroup custGroup)
                        throws KKAdminException
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.

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

int insertCustomerGroups(java.lang.String sessionId,
                         AdminCustomerGroup[] custGroups)
                         throws KKAdminException
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.

Parameters:
sessionId -
custGroups - An array of AdminCustomerGroup objects
Returns:
returns the id of the inserted objects
Throws:
KKAdminException

updateCustomerGroup

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

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

deleteCustomerGroup

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

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

getCustomerGroups

AdminCustomerGroupSearchResult getCustomerGroups(AdminCustomerGroupSearch search)
                                                 throws KKAdminException
Return AdminCustomerGroups matching search criteria.

Parameters:
search - An AdminCustomerGroupSearch object containing the search criteria
Returns:
Returns an AdminCustomerGroupSearchResult object
Throws:
KKAdminException

editOrder

void editOrder(java.lang.String sessionId,
               AdminOrder order)
               throws KKAdminException
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.

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

setCreditCardDetailsOnOrder

void setCreditCardDetailsOnOrder(java.lang.String sessionId,
                                 AdminCreditCard creditCard)
                                 throws KKAdminException
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):

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

getTopLevelCategories

AdminCategory[] getTopLevelCategories(int languageId,
                                      AdminDataDescriptor dataDesc)
                                      throws KKAdminException
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.

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

custom

java.lang.String custom(java.lang.String input1,
                        java.lang.String input2)
                        throws KKAdminException
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!

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

java.lang.String customSecure(java.lang.String sessionId,
                              java.lang.String input1,
                              java.lang.String input2)
                              throws KKAdminException
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!

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

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

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

getTags

AdminTagSearchResult getTags(java.lang.String sessionId,
                             AdminSearch search,
                             int offset,
                             int size)
                             throws KKAdminException
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.

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

getTagGroups

AdminTagGroupSearchResult getTagGroups(java.lang.String sessionId,
                                       AdminSearch search,
                                       int offset,
                                       int size)
                                       throws KKAdminException
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.

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

getTagGroupToTags

AdminTagGroupToTag[] getTagGroupToTags(java.lang.String sessionId,
                                       AdminSearch search,
                                       int offset,
                                       int size)
                                       throws KKAdminException
Return the TagGroupToTag objects defined by the search criteria.

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

int insertTag(java.lang.String sessionId,
              AdminTag tag)
              throws KKAdminException
Insert a new Tag object

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

int insertTags(java.lang.String sessionId,
               AdminTag[] tags)
               throws KKAdminException
Insert an array of Tag objects - provide a Tag record for each supported language.

Parameters:
sessionId - session Id of logged in Admin user
tags - 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

int insertTagGroup(java.lang.String sessionId,
                   AdminTagGroup tagGroup)
                   throws KKAdminException
Insert a new TagGroup object

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

int insertTagGroups(java.lang.String sessionId,
                    AdminTagGroup[] tagGroups)
                    throws KKAdminException
Insert an array of TagGroup objects - provide a TagGroup object for each language

Parameters:
sessionId - session Id of logged in Admin user
tagGroups - 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

void insertTagGroupToTags(java.lang.String sessionId,
                          AdminTagGroupToTag tagGroupToTag)
                          throws KKAdminException
Insert an AdminTagGroupToTag record

Parameters:
sessionId - session Id of logged in Admin user
tagGroupToTag -
Throws:
KKAdminException

updateTag

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

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

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

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

deleteTag

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

Parameters:
sessionId - session Id of logged in Admin user
id - the id of the AdminTag to delete
Throws:
KKAdminException

deleteTagGroup

void deleteTagGroup(java.lang.String sessionId,
                    int id)
                    throws KKAdminException
Delete a TagGroup object

Parameters:
sessionId - session Id of logged in Admin user
id - the id of the AdminTagGroup to delete
Throws:
KKAdminException

getTagGroupsPerCategory

AdminTagGroup[] getTagGroupsPerCategory(java.lang.String sessionId,
                                        int categoryId,
                                        int languageId)
                                        throws KKAdminException
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.

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

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

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

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

Parameters:
sessionId - session Id of logged in Admin user
Returns:
Returns an array of AdminCategoryToTagGroups
Throws:
KKAdminException

addTagGroupsToCategory

void addTagGroupsToCategory(java.lang.String sessionId,
                            AdminTagGroup[] tagGroups,
                            int categoryId)
                            throws KKAdminException
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.

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

addCategoriesToTagGroups

void addCategoriesToTagGroups(java.lang.String sessionId,
                              int tagGroupId,
                              int[] categories)
                              throws KKAdminException
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.

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

removeTagGroupsFromCategory

void removeTagGroupsFromCategory(java.lang.String sessionId,
                                 AdminTagGroup[] tagGroups,
                                 int categoryId)
                                 throws KKAdminException
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.

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

getTagsPerProduct

AdminTag[] getTagsPerProduct(java.lang.String sessionId,
                             int productId,
                             int languageId)
                             throws KKAdminException
Fetches all of the tags associated with a product.

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

addTagsToProduct

void addTagsToProduct(java.lang.String sessionId,
                      AdminTag[] tags,
                      int productId)
                      throws KKAdminException
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.

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

removeTagsFromProduct

void removeTagsFromProduct(java.lang.String sessionId,
                           AdminTag[] tags,
                           int productId)
                           throws KKAdminException
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.

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

updateCachedConfigurations

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

Parameters:
sessionId - session Id of logged in Admin user
Throws:
KKAdminException

publishProducts

void publishProducts(java.lang.String sessionId,
                     AdminPublishConfig adminPublishConfig)
                     throws KKAdminException
Publish Products to the Data Feed.

Parameters:
sessionId - Session Id
adminPublishConfig - Defines the data feed parameters
Throws:
KKAdminException

addAllProductsToSearchEngine

void addAllProductsToSearchEngine(java.lang.String sessionId,
                                  boolean async)
                                  throws KKAdminException
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.

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

addProductToSearchEngine

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

Parameters:
sessionId - Session Id
productId - The numeric id of the product
Throws:
KKAdminException

removeAllProductsFromSearchEngine

void removeAllProductsFromSearchEngine(java.lang.String sessionId,
                                       boolean async)
                                       throws KKAdminException
Remove all products from the search engine.

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

void removeProductFromSearchEngine(java.lang.String sessionId,
                                   int productId)
                                   throws KKAdminException
Remove the product referenced by productId from the search engine.

Parameters:
sessionId - Session Id
productId - The numeric id of the product
Throws:
KKAdminException

setProductQuantity

void setProductQuantity(java.lang.String sessionId,
                        java.lang.String sku,
                        int id,
                        int quantity,
                        int operation)
                        throws KKAdminException
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:

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

void setProductQuantityWithOptions(java.lang.String sessionId,
                                   java.lang.String sku,
                                   int id,
                                   int quantity,
                                   int operation,
                                   AdminProductMgrOptions mgrOptions)
                                   throws KKAdminException
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.

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

getProductQuantity

int getProductQuantity(java.lang.String sessionId,
                       java.lang.String sku,
                       int id)
                       throws KKAdminException
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.

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

int getProductQuantityWithOptions(java.lang.String sessionId,
                                  java.lang.String sku,
                                  int id,
                                  AdminProductMgrOptions mgrOptions)
                                  throws KKAdminException
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.

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

setProductAvailability

void setProductAvailability(java.lang.String sessionId,
                            java.lang.String sku,
                            int id,
                            java.util.Calendar dateAvailable)
                            throws KKAdminException
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.

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

void setProductAvailabilityWithOptions(java.lang.String sessionId,
                                       java.lang.String sku,
                                       int id,
                                       java.util.Calendar dateAvailable,
                                       AdminProductMgrOptions mgrOptions)
                                       throws KKAdminException
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.

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

java.util.Calendar getProductAvailability(java.lang.String sessionId,
                                          java.lang.String sku,
                                          int id)
                                          throws KKAdminException
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.

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

java.util.Calendar getProductAvailabilityWithOptions(java.lang.String sessionId,
                                                     java.lang.String sku,
                                                     int id,
                                                     AdminProductMgrOptions mgrOptions)
                                                     throws KKAdminException
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.

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

addCustomDataToSession

void addCustomDataToSession(java.lang.String sessionId,
                            java.lang.String data,
                            int position)
                            throws KKAdminException
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.

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

java.lang.String getCustomDataFromSession(java.lang.String sessionId,
                                          int position)
                                          throws KKAdminException
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.

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

java.lang.String execute(java.lang.String sessionId,
                         java.lang.String className,
                         java.lang.String methodName,
                         java.lang.String[] paramArray)
                         throws KKAdminException
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);
 }
 

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

AdminProductToStore[] getProductsToStores(java.lang.String sessionId,
                                          AdminDataDescriptor dataDesc,
                                          AdminSearch search)
                                          throws KKAdminException
Returns an array of AdminProductToStore objects for the specified store

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

void insertProductsToStores(java.lang.String sessionId,
                            AdminProductToStore[] productToStores)
                            throws KKAdminException
Inserts an array of AdminProductToStore objects

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

removeProductsToStores

void removeProductsToStores(java.lang.String sessionId,
                            AdminProductToStore[] productToStores)
                            throws KKAdminException
Removes an array of AdminProductToStore objects

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

insertOrder

int insertOrder(java.lang.String sessionId,
                AdminOrder order)
                throws KKAdminException
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.

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

getWishLists

AdminWishLists getWishLists(java.lang.String sessionId,
                            AdminWishListSearch search,
                            int offset,
                            int size)
                            throws KKAdminException
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.

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

int insertWishList(java.lang.String sessionId,
                   AdminWishList wishList)
                   throws KKAdminException
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.

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

void deleteWishList(java.lang.String sessionId,
                    int wishListId)
                    throws KKAdminException
Delete a wish list and all of its wish list items.

Parameters:
sessionId - The session id of the logged in user
wishListId - Id of the wish list item
Throws:
KKAdminException

insertWishListItem

int insertWishListItem(java.lang.String sessionId,
                       AdminWishListItem wishListItem)
                       throws KKAdminException
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.

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

void deleteWishListItem(java.lang.String sessionId,
                        int wishListItemId)
                        throws KKAdminException
Delete a wish list and all of its wish list items.

Parameters:
sessionId - The session id of the logged in user
wishListItemId - Id of the wish list item
Throws:
KKAdminException

getAddresses

AdminAddressSearchResult getAddresses(java.lang.String sessionId,
                                      AdminAddressSearch search,
                                      int offset,
                                      int size)
                                      throws KKAdminException
Get Addresses defined by the search criteria

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

getAddressById

AdminAddress getAddressById(java.lang.String sessionId,
                            int addressId)
                            throws KKAdminException
Get Addresses defined by the search criteria

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

insertAddress

int insertAddress(java.lang.String sessionId,
                  AdminAddress address)
                  throws KKAdminException
Insert an AdminAddress.

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

void updateAddress(java.lang.String sessionId,
                   AdminAddress address)
                   throws KKAdminException
Updates an AdminAddress.

Parameters:
sessionId - session Id of logged in Admin user
address - the AdminAddress object to update
Throws:
KKAdminException

deleteAddress

void deleteAddress(java.lang.String sessionId,
                   int addressId)
                   throws KKAdminException
Deletes an AdminAddress.

Parameters:
sessionId - session Id of logged in Admin user
addressId - the id of the address to delete
Throws:
KKAdminException

insertCustomerTag

int insertCustomerTag(java.lang.String sessionId,
                      AdminCustomerTag tag)
                      throws KKAdminException
Inserts an AdminCustomerTag object into the database.

The following customer tag attributes are compulsory:

The id of the new object is returned.

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

AdminCustomerTagSearchResult getCustomerTags(java.lang.String sessionId,
                                             AdminCustomerTagSearch search,
                                             int offset,
                                             int size)
                                             throws KKAdminException
Returns an AdminCustomerTagSearchResult object.

Constraints may be added for:

The returned objects may be ordered by:

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

int updateCustomerTag(java.lang.String sessionId,
                      AdminCustomerTag tag)
                      throws KKAdminException
Update an AdminCustomerTag object. If the value of an attribute is null, the current value is not updated.

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

int deleteCustomerTag(java.lang.String sessionId,
                      int id)
                      throws KKAdminException
Delete a Customer tag

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

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

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

void deleteCustomerTagForCustomer(java.lang.String sessionId,
                                  int customerId,
                                  java.lang.String tagName)
                                  throws KKAdminException
Deletes the value of the customer tag referenced by tagName for the customer referenced by customerId.

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

AdminCustomerTag getCustomerTagForCustomer(java.lang.String sessionId,
                                           int customerId,
                                           java.lang.String tagName)
                                           throws KKAdminException
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.

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

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

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

AdminCustomerTag[] getCustomerTagsForCustomer(java.lang.String sessionId,
                                              int customerId)
                                              throws KKAdminException
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.

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

void insertCustomerTagForCustomer(java.lang.String sessionId,
                                  int customerId,
                                  AdminCustomerTag tag)
                                  throws KKAdminException
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().

Parameters:
sessionId - The session id of the logged in user
customerId - The id of the customer
tag - The customer tag object
Throws:
KKAdminException

insertExpression

int insertExpression(java.lang.String sessionId,
                     AdminExpression exp)
                     throws KKAdminException
Inserts an AdminExpression object. Only the name attribute of the AdminExpression is required.

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

updateExpression

int updateExpression(java.lang.String sessionId,
                     AdminExpression exp)
                     throws KKAdminException
Updates the expression. An exception is thrown if the AdminExpression does not exist.

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

deleteExpression

int deleteExpression(java.lang.String sessionId,
                     int id)
                     throws KKAdminException
Deletes the Expression object referenced by id.

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

getExpression

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

Parameters:
sessionId - The session id of the logged in user
id - The id of the AdminExpression object
Returns:
Returns an AdminExpression object
Throws:
KKAdminException

getExpressionVariable

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

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

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

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

getExpressionForName

AdminExpression getExpressionForName(java.lang.String sessionId,
                                     java.lang.String expName)
                                     throws KKAdminException
Returns the AdminExpression object for the expName parameter, or Null if the AdminExpression doesn't exist in the DB.

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

getExpressions

AdminExpressionSearchResult getExpressions(java.lang.String sessionId,
                                           AdminExpressionSearch search,
                                           int offset,
                                           int size)
                                           throws KKAdminException
This returns an AdminExpressionSearchResult object.

Constraints may be added for:

The returned objects may be ordered by:

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

int insertExpressionVariables(java.lang.String sessionId,
                              AdminExpressionVariable[] expVarArray)
                              throws KKAdminException
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.

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

updateExpressionVariable

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

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

deleteExpressionVariable

int deleteExpressionVariable(java.lang.String sessionId,
                             int id)
                             throws KKAdminException
Deletes the ExpressionVariable object referenced by id.

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

deleteExpressionVariablesForExpression

void deleteExpressionVariablesForExpression(java.lang.String sessionId,
                                            int expressionId)
                                            throws KKAdminException
Deletes all of the AdminExpressionVariable objects belonging to the AdminExpression referenced by expressionId.

Parameters:
sessionId - The session id of the logged in user
expressionId - The id of the AdminExpression object
Throws:
KKAdminException

getExpressionsPerPromotion

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

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

boolean evaluateExpression(java.lang.String sessionId,
                           int customerId,
                           int expressionId,
                           java.lang.String expressionName)
                           throws KKAdminException
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.

Parameters:
sessionId - The session id of the logged in user
customerId - The id of the customer
expressionId -
expressionName -
Returns:
Returns true or false
Throws:
KKAdminException

searchDigitalDownloads

AdminDigitalDownloadSearchResult searchDigitalDownloads(java.lang.String sessionId,
                                                        AdminDigitalDownloadSearch search,
                                                        int offset,
                                                        int size)
                                                        throws KKAdminException
Retrieve the Digital Download records matching the search criteria

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

importDigitalDownload

int importDigitalDownload(java.lang.String sessionId,
                          AdminDigitalDownload digDownload)
                          throws KKAdminException
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.

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

getRewardPoints

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

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

int pointsAvailable(java.lang.String sessionId,
                    int customerId)
                    throws KKAdminException
Calculates the number of reward points available for the customer identified by the customerId parameter.

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

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

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

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

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

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

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

getSearchRules

AdminSearchRule[] getSearchRules()
                                 throws KKAdminException
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.

Returns:
Returns an array of Search Rule Objects
Throws:
KKAdminException

deletePaymentSchedule

int deletePaymentSchedule(java.lang.String sessionId,
                          int id)
                          throws KKAdminException
Delete a Payment Schedule Object

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

getPaymentSchedule

AdminPaymentSchedule getPaymentSchedule(java.lang.String sessionId,
                                        int id)
                                        throws KKAdminException
Returns the payment schedule object for the id parameter, or Null if the payment schedule object doesn't exist in the DB.

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

getPaymentSchedules

AdminPaymentScheduleSearchResult getPaymentSchedules(java.lang.String sessionId,
                                                     AdminPaymentScheduleSearch search,
                                                     int offset,
                                                     int size)
                                                     throws KKAdminException
This returns an AdminPaymentScheduleSearchResult object.

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

insertPaymentSchedule

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

Parameters:
sessionId - The session id of the logged in user
ps -
Returns:
Returns the id of the PaymentSchedule object
Throws:
KKAdminException

updatePaymentSchedule

int updatePaymentSchedule(java.lang.String sessionId,
                          AdminPaymentSchedule ps)
                          throws KKAdminException
Update an AdminPaymentSchedule object. If the value of an attribute is null, the current value is not updated.

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

deleteSubscription

int deleteSubscription(java.lang.String sessionId,
                       int id)
                       throws KKAdminException
Delete a Subscription Object

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

getSubscription

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

Parameters:
sessionId - The session id of the logged in user
id - The id of the subscription object
Returns:
Returns a subscription object
Throws:
KKAdminException

getSubscriptions

AdminSubscriptionSearchResult getSubscriptions(java.lang.String sessionId,
                                               AdminSubscriptionSearch search,
                                               int offset,
                                               int size)
                                               throws KKAdminException
This returns an AdminSubscriptionSearchResult object.

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

insertSubscription

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

Parameters:
sessionId - The session id of the logged in user
subscription -
Returns:
Returns the id of the Subscription object
Throws:
KKAdminException

updateSubscription

int updateSubscription(java.lang.String sessionId,
                       AdminSubscription subscription)
                       throws KKAdminException
Update an AdminSubscription object. If the value of an attribute is null, the current value is not updated.

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

boolean checkDataIntegrity(java.lang.String sessionId,
                           AdminDataIntegrityOptions dataIntegrityOptions)
                           throws KKAdminException
Checks the integrity of data in the specified area in the KonaKart database

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

com.konakart.app.ExportOrderResponse exportOrder(java.lang.String sessionId,
                                                 com.konakart.app.ExportOrderOptions options)
                                                 throws KKAdminException
Exports the Order

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

AdminKkMsgSearchResult searchMsg(AdminKkMsgSearch search,
                                 int groupSize,
                                 int offset)
                                 throws KKAdminException
Retrieve all the messages from the database that match the specified search criteria

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

java.lang.String getMsgValue(java.lang.String key,
                             int type,
                             java.lang.String locale)
                             throws KKAdminException
Get a Message Value from the database

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

void deleteMsg(java.lang.String sessionId,
               java.lang.String key,
               int type,
               java.lang.String locale)
               throws KKAdminException
Delete a Message from the database

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

void insertMsg(java.lang.String sessionId,
               java.lang.String key,
               int type,
               java.lang.String locale,
               java.lang.String value)
               throws KKAdminException
Insert a Message into the database

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

void updateMsg(java.lang.String sessionId,
               java.lang.String key,
               int type,
               java.lang.String locale,
               java.lang.String value)
               throws KKAdminException
Update a Message in the database. Only the message value can be updated here because the other parameters are all keys.

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

void importMsgs(java.lang.String sessionId,
                int type,
                java.lang.String locale,
                java.lang.String msgString,
                boolean replace)
                throws KKAdminException
Import Messages into the database

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

java.lang.String exportMsgs(int type,
                            java.lang.String locale)
                            throws KKAdminException
Export Messages from the database

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

void addAddressesToProduct(java.lang.String sessionId,
                           AdminAddress[] addresses,
                           int productId)
                           throws KKAdminException
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.

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

void removeAddressFromProduct(java.lang.String sessionId,
                              int addressId,
                              int productId)
                              throws KKAdminException
Remove the relationship between the address and the product.

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

int getProductCountPerAddress(java.lang.String sessionId,
                              int addressId)
                              throws KKAdminException
Returns the number of products using the address identified by addressId.

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

AdminManufacturerSearchResult getManufacturers(java.lang.String sessionId,
                                               AdminManufacturerSearch search,
                                               int offset,
                                               int size)
                                               throws KKAdminException
Returns an AdminManufacturerSearchResult object.

Constraints may be added for:

The returned objects may be ordered by:

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

insertProdAttrDesc

int insertProdAttrDesc(java.lang.String sessionId,
                       AdminProdAttrDesc attrDesc)
                       throws KKAdminException
An AdminProdAttrDesc object is inserted into the database. The following attributes are compulsory: The id of the new object is returned.

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

updateProdAttrDesc

int updateProdAttrDesc(java.lang.String sessionId,
                       AdminProdAttrDesc attrDesc)
                       throws KKAdminException
Update an AdminProdAttrDesc object. If the value of an attribute is null, the current value is not updated.

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

deleteProdAttrDesc

int deleteProdAttrDesc(java.lang.String sessionId,
                       int id)
                       throws KKAdminException
Delete an AdminProdAttrDesc

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

getProdAttrDesc

AdminProdAttrDesc getProdAttrDesc(java.lang.String sessionId,
                                  int id)
                                  throws KKAdminException
Returns the AdminProdAttrDesc object for the id parameter, or Null if the AdminProdAttrDesc doesn't exist in the DB.

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

getProdAttrDescsForTemplate

AdminProdAttrDesc[] getProdAttrDescsForTemplate(java.lang.String sessionId,
                                                int templateId)
                                                throws KKAdminException
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.

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

getProdAttrDescs

AdminProdAttrDescSearchResult getProdAttrDescs(java.lang.String sessionId,
                                               AdminProdAttrDescSearch search,
                                               int offset,
                                               int size)
                                               throws KKAdminException
This returns an AdminProdAttrDescSearchResult object that contains an array of AdminProdAttrDesc objects. The AdminProdAttrDesc objects may be sorted by :

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

insertProdAttrTemplate

int insertProdAttrTemplate(java.lang.String sessionId,
                           AdminProdAttrTemplate template)
                           throws KKAdminException
An AdminProdAttrTemplate object is inserted into the database. The following attributes are compulsory: The id of the new object is returned.

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

updateProdAttrTemplate

int updateProdAttrTemplate(java.lang.String sessionId,
                           AdminProdAttrTemplate template)
                           throws KKAdminException
Update an AdminProdAttrTemplate object. If the value of an attribute is null, the current value is not updated.

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

deleteProdAttrTemplate

int deleteProdAttrTemplate(java.lang.String sessionId,
                           int id)
                           throws KKAdminException
Delete an AdminProdAttrTemplate object.

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

getProdAttrTemplate

AdminProdAttrTemplate getProdAttrTemplate(java.lang.String sessionId,
                                          int id)
                                          throws KKAdminException
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.

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

AdminProdAttrTemplateSearchResult getProdAttrTemplates(java.lang.String sessionId,
                                                       AdminProdAttrTemplateSearch search,
                                                       int offset,
                                                       int size)
                                                       throws KKAdminException
This returns an AdminProdAttrTemplateSearchResult object containing an array of AdminProdAttrTemplate objects. The Templates may be sorted by :

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

addProdAttrDescsToTemplate

void addProdAttrDescsToTemplate(java.lang.String sessionId,
                                AdminProdAttrDesc[] attrDescs,
                                int templateId)
                                throws KKAdminException
Add the array of AdminProdAttrDesc objects to the template. We assume that the AdminProdAttrDesc objects have already been inserted.

Parameters:
sessionId - The session id of the logged in user
attrDescs - Array of AdminProdAttrDesc objects
templateId - Id of the AdminProdAttrTemplate
Throws:
KKAdminException

removeProdAttrDescsFromTemplate

void removeProdAttrDescsFromTemplate(java.lang.String sessionId,
                                     AdminProdAttrDesc[] attrDescs,
                                     int templateId)
                                     throws KKAdminException
Remove an array of ProdAttrDesc objects from the template. When attrDescs is set to null, all ProdAttrDesc objects are removed from the template.

Parameters:
sessionId - The session id of the logged in user
attrDescs - Array of AdminProdAttrDesc objects
templateId - Id of the AdminProdAttrTemplate
Throws:
KKAdminException

getTemplateCountPerProdAttrDesc

int getTemplateCountPerProdAttrDesc(java.lang.String sessionId,
                                    int attrDescId)
                                    throws KKAdminException
Returns the number of templates using the product attribute descriptor.

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

int getProductCountPerProdAttrDesc(java.lang.String sessionId,
                                   int attrDescId)
                                   throws KKAdminException
Returns the number of products using the product attribute descriptor.

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

int updateProductsUsingProdAttrDesc(java.lang.String sessionId,
                                    int attrDescId)
                                    throws KKAdminException
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.

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

int updateProductsUsingTemplates(java.lang.String sessionId,
                                 int[] templateIds)
                                 throws KKAdminException
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.

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

int getProductCountPerTemplate(java.lang.String sessionId,
                               int templateId)
                               throws KKAdminException
Returns the number of products using the custom product attribute template.

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

com.konakart.app.NameValue[] callPaymentModule(java.lang.String sessionId,
                                               java.lang.String moduleClassName,
                                               com.konakart.app.PaymentOptions options)
                                               throws KKAdminException
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.

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

AdminBookingSearchResult getBookings(java.lang.String sessionId,
                                     AdminBookingSearch search,
                                     int offset,
                                     int size,
                                     AdminBookableProductOptions options)
                                     throws KKAdminException
Search for bookings.

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

deleteBooking

void deleteBooking(java.lang.String sessionId,
                   int bookingId,
                   AdminBookableProductOptions options)
                   throws KKAdminException
Delete the booking with the specified bookingId.

Parameters:
sessionId - The session id of the logged in user
bookingId - bookingId of the booking to delete
options - AdminBookableProduct options
Throws:
KKAdminException

insertBooking

int insertBooking(java.lang.String sessionId,
                  AdminBooking booking,
                  AdminBookableProductOptions options)
                  throws KKAdminException
Insert a new booking.

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

void updateBooking(java.lang.String sessionId,
                   AdminBooking booking,
                   AdminBookableProductOptions options)
                   throws KKAdminException
Update the booking

Parameters:
sessionId - The session id of the logged in user
booking - The booking to update
options - AdminBookableProduct options
Throws:
KKAdminException

deleteCatalog

void deleteCatalog(java.lang.String sessionId,
                   int catalogId)
                   throws KKAdminException
Delete a Catalog definition from the database

Parameters:
sessionId - The session id of the logged in user
catalogId - The numeric id of the catalog
Throws:
KKAdminException

getCatalogs

AdminCatalogSearchResult getCatalogs(java.lang.String sessionId,
                                     AdminCatalogSearch search,
                                     int offset,
                                     int size)
                                     throws KKAdminException
Get an array of catalogs matching the search criteria from the database. The catalogs may be ordered by:

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

int insertCatalog(java.lang.String sessionId,
                  AdminCatalog catalog)
                  throws KKAdminException
Insert a new catalog

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

void updateCatalog(java.lang.String sessionId,
                   AdminCatalog catalog)
                   throws KKAdminException
Update an existing catalog

Parameters:
sessionId - The session id of the logged in user
catalog - The AdminCatalog object to be updated
Throws:
KKAdminException

getCatalogById

AdminCatalog getCatalogById(java.lang.String sessionId,
                            int catalogId)
                            throws KKAdminException
Fetch a catalog from the database referenced by the catalog id

Parameters:
sessionId - The session id of the logged in user
catalogId - The numeric id of the catalog
Returns:
Returns an AdminCatalog object
Throws:
KKAdminException

insertMiscItemType

int insertMiscItemType(java.lang.String sessionId,
                       AdminMiscItemType[] miTypes)
                       throws KKAdminException
Insert an array of AdminMiscItemType objects

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

void updateMiscItemType(java.lang.String sessionId,
                        AdminMiscItemType[] miTypes)
                        throws KKAdminException
Update an array of AdminMiscItemType objects. Only the name and the description can be updated.

Parameters:
sessionId - The session id of the logged in user
miTypes - An array of AdminMiscItemType objects to update.
Throws:
KKAdminException

deleteMiscItemType

void deleteMiscItemType(java.lang.String sessionId,
                        int miTypeId,
                        boolean deleteChildren)
                        throws KKAdminException
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.

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

AdminMiscItemType[] getMiscItemTypes(java.lang.String sessionId,
                                     AdminSearch search,
                                     int offset,
                                     int size)
                                     throws KKAdminException
Return the AdminMiscItemType objects defined by the search criteria.

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

insertMiscItems

int insertMiscItems(java.lang.String sessionId,
                    AdminMiscItem[] mItems)
                    throws KKAdminException
Insert an array of AdminMiscItem objects

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

void updateMiscItems(java.lang.String sessionId,
                     AdminMiscItem[] mItems)
                     throws KKAdminException
Update an array of AdminMiscItem objects. Only the item_value and the custom fields can be updated.

Parameters:
sessionId - The session id of the logged in user
mItems - An array of AdminMiscItem objects to update.
Throws:
KKAdminException

deleteMiscItem

void deleteMiscItem(java.lang.String sessionId,
                    int miTypeId)
                    throws KKAdminException
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.

Parameters:
sessionId - The session id of the logged in user
miTypeId - the id of the miscellaneous item object to delete
Throws:
KKAdminException

getMiscItems

AdminMiscItemSearchResult getMiscItems(java.lang.String sessionId,
                                       AdminSearch search,
                                       int offset,
                                       int size)
                                       throws KKAdminException
Return the AdminMiscItem objects defined by the search criteria.

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

copyProductToStore

int copyProductToStore(java.lang.String sessionId,
                       int productId,
                       java.lang.String storeIdFrom,
                       java.lang.String storeIdTo,
                       AdminCopyProductOptions options)
                       throws KKAdminException
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:

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

AdminProducts getProductsToSynchronize(java.lang.String sessionId,
                                       java.lang.String storeIdFrom,
                                       java.lang.String storeIdTo,
                                       AdminDataDescriptor dataDesc,
                                       int languageId,
                                       AdminSynchProductsOptions options,
                                       AdminProductMgrOptions mgrOptions)
                                       throws KKAdminException
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:

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

getConfigData

AdminConfigData[] getConfigData(java.lang.String sessionId,
                                java.lang.String key)
                                throws KKAdminException
Returns the AdminConfigData items with the specified key or all AdminConfigData items if the key is null

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

getKonaKartAdminVersion

java.lang.String getKonaKartAdminVersion()
                                         throws KKAdminException
Return the version number of KonaKart Admin that is contained within the konakart.jar

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.