public interface AdminProductMgrIf
Modifier and Type | Method and Description |
---|---|
void |
addCatalogRules(java.lang.String catalogId,
AdminCatalogRule[] rules)
The purpose of this method is to add an array of rules to a catalog so that it can be created
automatically by the
createCatalogPricesFromRules() method. |
void |
addRelatedProducts(AdminProduct[] products,
int productId,
int relationType)
Add the array of products to the product defined by productId.
|
void |
addRelatedProductsWithOptions(AdminProduct[] products,
int productId,
int relationType,
AdminProductMgrOptions mgrOptions)
Add the array of products to the product defined by productId.
|
int |
copyProductToStore(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 .
|
AdminCreateCatalogPricesResult |
createCatalogPricesFromRules(java.lang.String catalogId,
AdminCreateCatalogPriceOptions options)
This method populates a catalog with product prices based on rules that have been previously
added using the
addCatalogRules() method. |
void |
deleteCatalog(int catalogId)
Delete a Catalog definition from the database
|
void |
deleteCatalogPrices(java.lang.String catalogName)
Delete all the prices in the specified catalog
|
void |
deleteCatalogWithOptions(int catalogId,
AdminDeleteCatalogOptions options)
Delete a Catalog definition from the database with Options
|
void |
deleteDirectProductsPerCategory(int categoryId)
If the category has any products directly associated with it, then they are deleted.
|
void |
deleteProduct(int productId)
Delete the product referenced to by productId.
|
void |
deleteProductAttribute(int productAttributeId)
Delete the productAttribute
|
void |
deleteProductAttributesPerProduct(int productId)
Delete the productAttributes Per product
|
void |
deleteProductOptions(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(int productOptionValueId)
Delete a product option value record for all languages and all of its records in the options
values to options table
|
void |
deleteProducts(AdminCommonOptions options)
Delete the products referenced by the options parameter.
|
void |
deleteProductsPerCategory(int categoryId)
Products are deleted for the category and sub category.
|
void |
deleteProductsPerManufacturer(int manufacturerId)
If the manufacturer has any products directly associated with it, then they are deleted.
|
void |
deleteSpecial(int specialId)
Delete the special referenced to by specialId.
|
boolean |
doesProductExist(int productId)
Return true if the product exists.
|
void |
editProduct(AdminProduct product)
Edit a product and its product description objects
|
void |
editProductAttribute(AdminProductAttribute prodAttr)
Edits the product attribute
|
void |
editProductOption(AdminProductOption productOption)
Edit a product option
|
void |
editProductOptionValue(AdminProductOptionValue productOptionValue)
Edit a product option value
|
void |
editProductWithOptions(AdminProduct product,
AdminProductMgrOptions mgrOptions)
Edit a product and its product description objects.
|
void |
editSpecial(AdminSpecial special)
Edit a special
|
AdminProductOption[] |
getAllProductOptions(int languageId)
Returns a list of product options.
|
AdminProductOptionValue[] |
getAllProductOptionValues(int languageId)
Get an array of all the product option value objects for the specified language
|
AdminProducts |
getAllSpecials(AdminDataDescriptor dataDesc,
int languageId)
Return all products with a special price
|
AdminProduct |
getBundleProductDetails(int bundleId,
AdminProduct[] bundledProductsArray,
AdminDiscount discount)
This method is used to calculate some attributes of a bundle product based on the products
that the bundle contains.
|
AdminCatalog |
getCatalogById(int catalogId)
Fetch a catalog from the database referenced by the catalog id
|
AdminCatalogRule[] |
getCatalogRules(java.lang.String catalogId)
Fetches an array of catalog rules for a given catalog.
|
AdminCatalogSearchResult |
getCatalogs(AdminCatalogSearch search,
int offset,
int size)
Get an array of catalogs matching the search criteria from the database
|
int |
getNextProductOptionId()
Get the next id to use when inserting a ProductOption record
|
int |
getNextProductOptionValuesId()
Get the next id to use when inserting a ProductOptionValue record
|
AdminProduct |
getProduct(int productId)
Gets a product object with full details
|
AdminProduct |
getProduct(int productId,
boolean getBundleQuantity,
AdminProductMgrOptions mgrOptions,
boolean allStores)
Gets a product object with full details.
|
AdminProduct |
getProduct(int productId,
java.sql.Connection con)
Gets a product object with full details
|
AdminProductAttribute[] |
getProductAttributesPerProduct(int productId)
Gets all of the product attributes for the product
|
AdminProductAttribute[] |
getProductAttributesPerProduct(int productId,
AdminProductMgrOptions mgrOptions,
java.lang.String priceCatalog)
Gets all of the product attributes for the product
|
java.util.Calendar |
getProductAvailability(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 sku,
int id,
AdminProductMgrOptions mgrOptions)
A method that directly returns the date when a product will be available.
|
int[] |
getProductCategoryIds(int prodId)
Get an array of categoryIds defined for the specified product
|
com.konakart.db.KKCriteria |
getProductCriteria()
Gets a new KKCriteria object for Products and sets the Database name.
|
java.util.Set<java.lang.Integer> |
getProductDescriptionLanguageIds(int productId)
Retrieve the complete set of languages used by the product descriptions of the specified
product Id
|
int[] |
getProductIdsPerManufacturer(AdminDataDescriptor dataDesc,
int manufacturerId)
Get product Ids for the manufacturer referenced by manufacturerId.
|
AdminProduct |
getProductImageFields(int productId)
Gets a product object with just the image-related fields retrieved
|
com.konakart.app.ProductImages |
getProductImages(com.konakart.appif.ProductImagesOptionsIf options)
Get the image file names associated with the product whose id is specified.
|
com.konakart.app.ProductImages |
getProductImagesForProduct(AdminProduct prod,
com.konakart.appif.ProductImagesOptionsIf options)
Get the image file names associated with the product specified.
|
AdminProductOptionSearchResult |
getProductOptions(AdminProductOptionSearch search,
int offset,
int size)
This returns an AdminProductOptionSearchResult object.
|
AdminProductOption[] |
getProductOptionsPerId(int productOptionId)
Returns an array of productOptions.
|
AdminProductOption[] |
getProductOptionsPerName(java.lang.String name,
int langId)
Returns an array of productOptions with the specified name and languageId
|
AdminProductOptionValue[] |
getProductOptionValuesPerId(int productOptionValueId)
Returns an array of productOptionValues.
|
AdminProductOptionValue[] |
getProductOptionValuesPerName(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)
Get an array of product option value objects for a product option object
|
AdminProdOptionValToProdOption[] |
getProductOptionValueToProductOptions(AdminProdOptionValToProdOption prodOptValToProdOpt)
Gets an array of AdminProdOptionValToProdOption objects that have the specified optionId and
OptionValueId.
|
int |
getProductQuantity(java.lang.String sku,
int id)
A method that allows you to directly retrieve the quantity of a product.
|
int |
getProductQuantityWithOptions(java.lang.String sku,
int id,
AdminProductMgrOptions mgrOptions)
A method that allows you to directly retrieve the quantity of a product.
|
AdminProducts |
getProductsPerCategory(AdminDataDescriptor dataDesc,
int categoryId,
int languageId)
Get products for the category referenced by categoryId.
|
AdminProducts |
getProductsPerCategoryWithOptions(AdminDataDescriptor dataDesc,
int categoryId,
int languageId,
AdminProductMgrOptions mgrOptions)
Get products for the category referenced by categoryId.
|
AdminProducts |
getProductsPerManufacturer(AdminDataDescriptor dataDesc,
int manufacturerId,
int languageId)
Get products for the manufacturer referenced by manufacturerId.
|
AdminProducts |
getProductsPerManufacturerWithOptions(AdminDataDescriptor dataDesc,
int manufacturerId,
int languageId,
AdminProductMgrOptions mgrOptions)
Get products for the manufacturer referenced by manufacturerId.
|
AdminProductToStore[] |
getProductsToStores(AdminDataDescriptor dataDesc,
AdminSearch search)
Returns an array of AdminProductToStore objects for the specified store
|
AdminProducts |
getProductsToSynchronize(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(int productId,
AdminProductMgrOptions mgrOptions)
Get the product referenced by this product id, from the database.
|
AdminProducts |
getRelatedProducts(AdminDataDescriptor dataDesc,
int productId,
int relationType,
int languageId)
Find products related to the product defined by the productId parameter.
|
AdminProducts |
getRelatedProductsWithOptions(AdminDataDescriptor dataDesc,
int productId,
int relationType,
int languageId,
AdminProductMgrOptions mgrOptions)
Find products related to the product defined by the productId parameter.
|
java.lang.String |
getSku(AdminOrderProduct orderProd)
Get the SKU for an orderProduct object.
|
java.lang.String |
getSku(int productId)
Gets the SKU for a product directly from the product table.
|
java.lang.String[] |
getSkus(AdminOrderProduct[] orderProds)
Get the SKUs for an array orderProduct objects.
|
AdminSpecial |
getSpecial(int specialId)
Gets a special object
|
AdminProducts |
getSpecialsPerCategory(AdminDataDescriptor dataDesc,
int categoryId,
boolean searchInSubCats,
int languageId)
Return all products with a special price for a category referenced by categoryId
|
int |
importDigitalDownload(AdminDigitalDownload digDownload)
Import a new digital download record.
|
int |
insertCatalog(AdminCatalog catalog)
Insert a new catalog
|
void |
insertCatalogPrices(AdminProductPrice[] prices,
AdminInsertCatalogPriceOptions options)
This API call is intended to provide a fast way to load catalog prices.
|
void |
insertDigitalDownload(int customerId,
int productId)
Create and insert a digital download record for the product identified by the productId and
the customer identified by the customerId.
|
int |
insertGiftCertificateDigitalDownload(int customerId,
int productId,
java.lang.String filePath)
Create and insert a digital download record for the product identified by the productId and
the customer identified by the customerId.
|
int |
insertProduct(AdminProduct product)
Insert a product
|
int |
insertProductAttribute(AdminProductAttribute prodAttr)
Inserts the product attribute
|
boolean |
insertProductCategory(int prodId,
int catId)
Inserts a new product category record into the database if it doesn't already exist.
|
void |
insertProductOption(AdminProductOption productOption)
Insert a product option
|
int |
insertProductOptions(AdminProductOption[] productOptions)
Inserts an array of product options which will all have the same id but different languages.
|
void |
insertProductOptionValue(AdminProductOptionValue productOptionValue,
int productOptionId)
Insert a product option value for a product option
|
int |
insertProductOptionValues(AdminProductOptionValue[] productOptionValues,
int productOptionId)
Inserts an array of product option values which will all have the same id but different
languages.
|
int |
insertProductsOptionsValuesToProductsOptions(AdminProdOptionValToProdOption prodOptValToProdOpt)
Insert a product option value to product option record
|
void |
insertProductsToStores(AdminProductToStore[] productToStores)
Inserts an array of AdminProductToStore objects
|
int |
insertProductWithOptions(AdminProduct product,
AdminProductMgrOptions mgrOptions)
Insert a product
|
int |
insertSpecial(AdminSpecial special)
Insert a special
|
void |
refreshConfigs()
Update the caches
|
void |
removeProductFromCatalog(int productId,
java.lang.String catalogId)
Removes product prices and quantities from the catalog referenced by catalogId for the
product referenced by productId.
|
void |
removeProductsToStores(AdminProductToStore[] productToStores)
Removes an array of AdminProductToStore objects
|
void |
removeRelatedProduct(int productIdFrom,
int productIdTo,
int relationType)
Removes the relation between the product defined by productIdFrom and the product defined by
productIdTo.
|
void |
removeRelatedProducts(int productId,
int relationType)
Removes related products from the product defined by productId.
|
AdminDigitalDownloadSearchResult |
searchDigitalDownloads(AdminDigitalDownloadSearch search,
int offset,
int size)
Retrieve the Digital Download records matching the search criteria
|
AdminProducts |
searchForProducts(AdminDataDescriptor dataDesc,
AdminProductSearch prodSearch,
int languageId)
Search for products
|
AdminProducts |
searchForProductsWithOptions(AdminDataDescriptor dataDesc,
AdminProductSearch prodSearch,
int languageId,
AdminProductMgrOptions mgrOptions)
Search for products
|
void |
setDigitalDownloadCriteria(com.konakart.db.KKCriteria c)
Sets the criteria with the standard attributes so as not to have to repeat this code many
times.
|
void |
setProductAvailability(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 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 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 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.
|
void |
setProductQuantityWithOptions(java.lang.String sku,
int id,
int quantity,
int operation,
java.lang.String variantCode,
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.
|
void |
setProductsSharedCriteria(com.konakart.db.KKCriteria c)
Add criteria to get shared products from the database
|
void |
setProductsSharedCriteria(com.konakart.db.KKCriteria c,
boolean addSelectPriceId)
Add criteria to get shared products from the database
|
void |
updateCatalog(AdminCatalog catalog)
Update an existing catalog
|
void |
updateProductImageFields(AdminProduct prod)
Updates the image-related fields for the product.
|
void |
updateProductReviewInfo(int productId)
The product referenced by the
productId parameter is updated with information
regarding the average rating and the number of reviews present for the product.It's normally called after a review is inserted. |
int insertProduct(AdminProduct product) throws java.lang.Exception
product
- the productjava.lang.Exception
- an unexpected exceptionint insertProductWithOptions(AdminProduct product, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
product
- the productmgrOptions
- It defines whether to insert prices and quantity for the catalog defined by the
catalogId.java.lang.Exception
- an unexpected exceptionint insertSpecial(AdminSpecial special) throws java.lang.Exception
special
- the specialjava.lang.Exception
- an unexpected exceptionboolean insertProductCategory(int prodId, int catId) throws java.lang.Exception
prodId
- Product IDcatId
- Category IDjava.lang.Exception
- an unexpected exceptionint[] getProductCategoryIds(int prodId) throws java.lang.Exception
prodId
- the prodIdjava.lang.Exception
- an unexpected exceptionvoid editSpecial(AdminSpecial special) throws java.lang.Exception
special
- the specialjava.lang.Exception
- an unexpected exceptionvoid editProduct(AdminProduct product) throws java.lang.Exception
product
- the productjava.lang.Exception
- an unexpected exceptionvoid editProductWithOptions(AdminProduct product, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
product
- the productmgrOptions
- Allows you to define whether the quantity and prices can have different values
depending on the catalogId. May be set to null.java.lang.Exception
- an unexpected exceptionboolean doesProductExist(int productId) throws org.apache.torque.TorqueException, KKAdminException
productId
- the productIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminProduct getProduct(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptionAdminProduct getProduct(int productId, java.sql.Connection con) throws java.lang.Exception
productId
- the productIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionAdminProduct getProduct(int productId, boolean getBundleQuantity, AdminProductMgrOptions mgrOptions, boolean allStores) throws java.lang.Exception
productId
- the productIdgetBundleQuantity
- When set to true we calculate the quantity of a product if it is a bundlemgrOptions
- the mgrOptionsallStores
- When set to true we don't put in the store constraints in multi store shared
product modejava.lang.Exception
- an unexpected exceptionAdminProduct getProductWithOptions(int productId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
productId
- the productIdmgrOptions
- It defines whether to use prices and quantity for the catalog defined by the
catalogId.java.lang.Exception
- an unexpected exceptionAdminSpecial getSpecial(int specialId) throws java.lang.Exception
specialId
- the specialIdjava.lang.Exception
- an unexpected exceptionvoid deleteSpecial(int specialId) throws java.lang.Exception
specialId
- the specialIdjava.lang.Exception
- an unexpected exceptionvoid deleteProduct(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptionvoid deleteProducts(AdminCommonOptions options) throws java.lang.Exception
options
- An AdminCommonOptions object. Set the ids of the products to delete in the ids
attribute.java.lang.Exception
- an unexpected exceptionAdminProducts getProductsPerCategory(AdminDataDescriptor dataDesc, int categoryId, int languageId) throws java.lang.Exception
dataDesc
- the dataDesccategoryId
- the categoryIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionAdminProducts getProductsPerCategoryWithOptions(AdminDataDescriptor dataDesc, int categoryId, int languageId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
dataDesc
- the dataDesccategoryId
- the categoryIdlanguageId
- the languageIdmgrOptions
- Allows you to define whether the quantity and prices can have different values
depending on the catalogId. May be set to null.java.lang.Exception
- an unexpected exceptionAdminProducts getProductsPerManufacturer(AdminDataDescriptor dataDesc, int manufacturerId, int languageId) throws java.lang.Exception
dataDesc
- the dataDescmanufacturerId
- the manufacturerIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionint[] getProductIdsPerManufacturer(AdminDataDescriptor dataDesc, int manufacturerId) throws java.lang.Exception
dataDesc
- the data descriptor is only used for setting the offset and the limitmanufacturerId
- the manufacturerIdjava.lang.Exception
- an unexpected exceptionAdminProducts getProductsPerManufacturerWithOptions(AdminDataDescriptor dataDesc, int manufacturerId, int languageId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
dataDesc
- the dataDescmanufacturerId
- the manufacturerIdlanguageId
- the languageIdmgrOptions
- Allows you to define whether the quantity and prices can have different values
depending on the catalogId. May be set to null.java.lang.Exception
- an unexpected exceptionAdminProducts searchForProducts(AdminDataDescriptor dataDesc, AdminProductSearch prodSearch, int languageId) throws java.lang.Exception
dataDesc
- the dataDescprodSearch
- the prodSearchlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionAdminProducts searchForProductsWithOptions(AdminDataDescriptor dataDesc, AdminProductSearch prodSearch, int languageId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
dataDesc
- the dataDescprodSearch
- the prodSearchlanguageId
- the languageIdmgrOptions
- It defines whether to use prices and quantity for the catalog defined by the
catalogId.java.lang.Exception
- an unexpected exceptionvoid deleteProductsPerCategory(int categoryId) throws java.lang.Exception
categoryId
- the categoryIdjava.lang.Exception
- an unexpected exceptionvoid setProductsSharedCriteria(com.konakart.db.KKCriteria c) throws KKAdminException
c
- the cKKAdminException
- an unexpected exception in the KonaKart Admin enginevoid setProductsSharedCriteria(com.konakart.db.KKCriteria c, boolean addSelectPriceId) throws KKAdminException
c
- the caddSelectPriceId
- if true BaseProductToStoresPeer.PRICE_ID and custom fields will be added as select
columnsKKAdminException
- an unexpected exception in the KonaKart Admin enginevoid deleteDirectProductsPerCategory(int categoryId) throws java.lang.Exception
categoryId
- the categoryIdjava.lang.Exception
- an unexpected exceptionvoid deleteProductsPerManufacturer(int manufacturerId) throws java.lang.Exception
manufacturerId
- the manufacturerIdjava.lang.Exception
- an unexpected exceptionAdminProducts getAllSpecials(AdminDataDescriptor dataDesc, int languageId) throws java.lang.Exception
dataDesc
- the dataDesclanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionAdminProducts getSpecialsPerCategory(AdminDataDescriptor dataDesc, int categoryId, boolean searchInSubCats, int languageId) throws java.lang.Exception
dataDesc
- the dataDesccategoryId
- the categoryIdsearchInSubCats
- the searchInSubCatslanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionAdminProductOption[] getAllProductOptions(int languageId) throws java.lang.Exception
languageId
- specifies that the product options should be returned for this language. Can
specify AdminLanguageMgr.DEFAULT_LANG to specify the default language, or specify
AdminLanguageMgr.ALL_LANGUAGES to specify all languagesjava.lang.Exception
- an unexpected exceptionAdminProductOptionValue[] getAllProductOptionValues(int languageId) throws java.lang.Exception
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 languagesjava.lang.Exception
- an unexpected exceptionAdminProductOptionSearchResult getProductOptions(AdminProductOptionSearch search, int offset, int size) throws java.lang.Exception
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 dbsize
- the number of records from the specified offsetjava.lang.Exception
- an unexpected exceptionAdminProductOptionValue[] getProductOptionValuesPerOption(int productOptionId, int languageId) throws java.lang.Exception
productOptionId
- the productOptionIdlanguageId
- 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 languagesjava.lang.Exception
- an unexpected exceptionAdminProductOptionValue[] getProductOptionValuesPerName(java.lang.String name, int languageId) throws java.lang.Exception
name
- product option value namelanguageId
- language id (can use AdminLanguageMgr.DEFAULT_LANG to get the default language)java.lang.Exception
- an unexpected exceptionAdminProductAttribute[] getProductAttributesPerProduct(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptionAdminProductAttribute[] getProductAttributesPerProduct(int productId, AdminProductMgrOptions mgrOptions, java.lang.String priceCatalog) throws java.lang.Exception
productId
- the productIdmgrOptions
- the mgrOptionspriceCatalog
- Catalog used for future pricesjava.lang.Exception
- an unexpected exceptionvoid deleteProductAttribute(int productAttributeId) throws java.lang.Exception
productAttributeId
- the productAttributeIdjava.lang.Exception
- an unexpected exceptionvoid deleteProductAttributesPerProduct(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptionvoid editProductAttribute(AdminProductAttribute prodAttr) throws java.lang.Exception
prodAttr
- the prodAttrjava.lang.Exception
- an unexpected exceptionint insertProductAttribute(AdminProductAttribute prodAttr) throws java.lang.Exception
prodAttr
- the prodAttrjava.lang.Exception
- an unexpected exceptionvoid deleteProductOptions(int productOptionId) throws java.lang.Exception
productOptionId
- the productOptionIdjava.lang.Exception
- an unexpected exceptionvoid deleteProductOptionValues(int productOptionValueId) throws java.lang.Exception
productOptionValueId
- the productOptionValueIdjava.lang.Exception
- an unexpected exceptionAdminProductOption[] getProductOptionsPerId(int productOptionId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, KKAdminException
productOptionId
- the productOptionIdcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminProductOption[] getProductOptionsPerName(java.lang.String name, int langId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, KKAdminException
name
- Product Option NamelangId
- Language Idcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminProdOptionValToProdOption[] getProductOptionValueToProductOptions(AdminProdOptionValToProdOption prodOptValToProdOpt) throws java.lang.Exception
prodOptValToProdOpt
- the AdminProdOptionValToProdOption to look up. Only uses the optionId and
OptionValueId in this objectjava.lang.Exception
- an unexpected exceptionAdminProductOptionValue[] getProductOptionValuesPerId(int productOptionValueId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
productOptionValueId
- the productOptionValueIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineint insertProductOptions(AdminProductOption[] productOptions) throws java.lang.Exception
productOptions
- the productOptionsjava.lang.Exception
- an unexpected exceptionvoid insertProductOption(AdminProductOption productOption) throws java.lang.Exception
productOption
- the productOptionjava.lang.Exception
- an unexpected exceptionvoid editProductOption(AdminProductOption productOption) throws java.lang.Exception
productOption
- the productOptionjava.lang.Exception
- an unexpected exceptionint insertProductOptionValues(AdminProductOptionValue[] productOptionValues, int productOptionId) throws java.lang.Exception
productOptionValues
- the productOptionValuesproductOptionId
- the productOptionIdjava.lang.Exception
- an unexpected exceptionvoid insertProductOptionValue(AdminProductOptionValue productOptionValue, int productOptionId) throws java.lang.Exception
productOptionValue
- the productOptionValueproductOptionId
- 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.java.lang.Exception
- an unexpected exceptionint insertProductsOptionsValuesToProductsOptions(AdminProdOptionValToProdOption prodOptValToProdOpt) throws java.lang.Exception
prodOptValToProdOpt
- a AdminProdOptionValToProdOption object to insert. The optionId and optionValueId
defined in the object must be valid otherwise an exception is thrown.java.lang.Exception
- an unexpected exceptionvoid editProductOptionValue(AdminProductOptionValue productOptionValue) throws java.lang.Exception
productOptionValue
- the productOptionValuejava.lang.Exception
- an unexpected exceptionint getNextProductOptionId() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineint getNextProductOptionValuesId() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminProducts getRelatedProducts(AdminDataDescriptor dataDesc, int productId, int relationType, int languageId) throws java.lang.Exception
dataDesc
- the dataDescproductId
- the productIdrelationType
- the relationTypelanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionAdminProducts getRelatedProductsWithOptions(AdminDataDescriptor dataDesc, int productId, int relationType, int languageId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
dataDesc
- the dataDescproductId
- the productIdrelationType
- the relationTypelanguageId
- the languageIdmgrOptions
- It defines whether to use prices and quantity for the catalog defined by the
catalogId.java.lang.Exception
- an unexpected exceptionvoid removeRelatedProduct(int productIdFrom, int productIdTo, int relationType) throws java.lang.Exception
productIdFrom
- the productId the relation generates fromproductIdTo
- the productId the relation points torelationType
- the relationTypejava.lang.Exception
- an unexpected exceptionvoid removeRelatedProducts(int productId, int relationType) throws java.lang.Exception
productId
- the productIdrelationType
- the relationTypejava.lang.Exception
- an unexpected exceptionvoid addRelatedProducts(AdminProduct[] products, int productId, int relationType) throws org.apache.torque.TorqueException, KKAdminException
products
- the productsproductId
- the productIdrelationType
- the relationTypeorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid addRelatedProductsWithOptions(AdminProduct[] products, int productId, int relationType, AdminProductMgrOptions mgrOptions) throws org.apache.torque.TorqueException, KKAdminException
products
- the productsproductId
- the productIdrelationType
- the relationTypemgrOptions
- The options object allows you to set relationCustom1 and relationCustom2
attributes that are set on the product to product relationship. It may be set to
null.org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginejava.lang.String[] getSkus(AdminOrderProduct[] orderProds) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
orderProds
- the orderProdscom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginejava.lang.String getSku(AdminOrderProduct orderProd) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
orderProd
- the orderProdKKAdminException
- an unexpected exception in the KonaKart Admin enginecom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)java.lang.String getSku(int productId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
productId
- the productIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginevoid insertDigitalDownload(int customerId, int productId) throws java.lang.Exception
customerId
- the customerIdproductId
- the productIdjava.lang.Exception
- an unexpected exceptionvoid setDigitalDownloadCriteria(com.konakart.db.KKCriteria c)
c
- the cAdminDigitalDownloadSearchResult searchDigitalDownloads(AdminDigitalDownloadSearch search, int offset, int size) throws java.lang.Exception
search
- search definition for digital downloadsoffset
- offset in results (for paging)size
- maximum number of records to return from the offset (for paging)java.lang.Exception
- an unexpected exceptionint importDigitalDownload(AdminDigitalDownload digDownload) throws java.lang.Exception
digDownload
- the Digital Download object to importjava.lang.Exception
- an unexpected exception if the digital download record specified is invalid or
there are database problemsAdminProduct getBundleProductDetails(int bundleId, AdminProduct[] bundledProductsArray, AdminDiscount discount) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
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.bundledProductsArray
- If bundleId is less than zero, we use the products in this array otherwise it is
ignored.discount
- The discount to apply which can be an amount or a percentageorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)java.lang.Exception
- an unexpected exceptionvoid setProductQuantity(java.lang.String sku, int id, int quantity, int operation) throws java.lang.Exception
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:
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 quantityoperation
- Determines whether to set, add or subtract the quantity. See above for valid
values.java.lang.Exception
- an unexpected exceptionvoid setProductQuantityWithOptions(java.lang.String sku, int id, int quantity, int operation, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
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:
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 quantityoperation
- 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.java.lang.Exception
- an unexpected exceptionvoid setProductQuantityWithOptions(java.lang.String sku, int id, int quantity, int operation, java.lang.String variantCode, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
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:
variantCode
parameter is used to identified the variant of the product which
we want to update the quantity.
The mgrOptions object allows you to define whether the quantity can have different values
depending on the catalogId. It may be set to null.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 quantityoperation
- Determines whether to set, add or subtract the quantity. See above for valid
values.variantCode
- The variantCode of the products in order to set a quantity for a variant of the
product.mgrOptions
- Allows you to define whether the quantity can have different values depending on
the catalogId. May be set to null.java.lang.Exception
- an unexpected exceptionint getProductQuantity(java.lang.String sku, int id) throws java.lang.Exception
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.java.lang.Exception
- an unexpected exceptionint getProductQuantityWithOptions(java.lang.String sku, int id, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
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.java.lang.Exception
- an unexpected exceptionvoid setProductAvailability(java.lang.String sku, int id, java.util.Calendar dateAvailable) throws java.lang.Exception
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 availablejava.lang.Exception
- an unexpected exceptionvoid setProductAvailabilityWithOptions(java.lang.String sku, int id, java.util.Calendar dateAvailable, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
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 availablemgrOptions
- Allows you to define whether the availability date can have different values
depending on the catalogId. May be set to null.java.lang.Exception
- an unexpected exceptionjava.util.Calendar getProductAvailability(java.lang.String sku, int id) throws java.lang.Exception
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.java.lang.Exception
- an unexpected exceptionjava.util.Calendar getProductAvailabilityWithOptions(java.lang.String sku, int id, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
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.java.lang.Exception
- an unexpected exceptionAdminProductToStore[] getProductsToStores(AdminDataDescriptor dataDesc, AdminSearch search) throws java.lang.Exception
dataDesc
- 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_DESCENDINGsearch
- Defines the records to be returned. Populate the id with the productId (or set to
KonaKartAdminConstant.NOT_SET to get all products or set an array of product Ids
in the ids attribute to retrieve records for all of the products specified in the
array) and the name with the storeId (or leave null for all stores).java.lang.Exception
- an unexpected exceptionvoid insertProductsToStores(AdminProductToStore[] productToStores) throws java.lang.Exception
productToStores
- an array of AdminProductToStore objects to insert into the databasejava.lang.Exception
- an unexpected exceptionvoid removeProductsToStores(AdminProductToStore[] productToStores) throws java.lang.Exception
productToStores
- an array of AdminProductToStore objects to delete from the databasejava.lang.Exception
- an unexpected exceptionint insertGiftCertificateDigitalDownload(int customerId, int productId, java.lang.String filePath) throws java.lang.Exception
customerId
- the customerIdproductId
- the productIdfilePath
- the filePathjava.lang.Exception
- an unexpected exceptionvoid deleteCatalog(int catalogId) throws org.apache.torque.TorqueException, KKAdminException, java.lang.Exception
catalogId
- the catalogIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginejava.lang.Exception
- an unexpected exceptionvoid deleteCatalogWithOptions(int catalogId, AdminDeleteCatalogOptions options) throws KKAdminException, org.apache.torque.TorqueException, java.lang.Exception
catalogId
- The numeric id of the catalogoptions
- define whether or not to remove prices for this catalog as well.KKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)java.lang.Exception
- an unexpected exceptionAdminCatalogSearchResult getCatalogs(AdminCatalogSearch search, int offset, int size) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
search
- the searchoffset
- the offsetsize
- the sizeorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineint insertCatalog(AdminCatalog catalog) throws KKAdminException, org.apache.torque.TorqueException
catalog
- the catalogKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void updateCatalog(AdminCatalog catalog) throws java.lang.Exception
catalog
- the catalogjava.lang.Exception
- an unexpected exceptionAdminCatalog getCatalogById(int catalogId) throws java.lang.Exception
catalogId
- the catalogIdjava.lang.Exception
- an unexpected exceptionint copyProductToStore(int productId, java.lang.String storeIdFrom, java.lang.String storeIdTo, AdminCopyProductOptions options) throws java.lang.Exception
productId
- The numeric id of the product to copystoreIdFrom
- The id of the source storestoreIdTo
- The id of the destination storeoptions
- Options to configure the copy operationjava.lang.Exception
- an unexpected exceptionAdminProducts getProductsToSynchronize(java.lang.String storeIdFrom, java.lang.String storeIdTo, AdminDataDescriptor dataDesc, int languageId, AdminSynchProductsOptions options, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
storeIdFrom
- The id of the source storestoreIdTo
- The id of the destination storedataDesc
- 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 languageoptions
- 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.java.lang.Exception
- an unexpected exceptionvoid updateProductReviewInfo(int productId) throws java.lang.Exception
productId
parameter is updated with information
regarding the average rating and the number of reviews present for the product.productId
- the productIdjava.lang.Exception
- an unexpected exceptionjava.util.Set<java.lang.Integer> getProductDescriptionLanguageIds(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptioncom.konakart.db.KKCriteria getProductCriteria() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminProduct getProductImageFields(int productId) throws KKAdminException
productId
- the productIdKKAdminException
- an unexpected exception in the KonaKart Admin enginevoid updateProductImageFields(AdminProduct prod) throws KKAdminException
prod
- A product object with just the image-related fields set. The product must have its
id set as well.KKAdminException
- an unexpected exception in the KonaKart Admin enginecom.konakart.app.ProductImages getProductImages(com.konakart.appif.ProductImagesOptionsIf options) throws KKAdminException
options
- a ProductImagesOptions object for specifying the criteria used to define which
product images should be returned. Within this search object you can specify
productId and a file name filter (which is a regular expression).KKAdminException
- an unexpected exception in the KonaKart Admin engine if options is null or an
unexpected error.com.konakart.app.ProductImages getProductImagesForProduct(AdminProduct prod, com.konakart.appif.ProductImagesOptionsIf options) throws KKAdminException
prod
- An AdminProduct object with the ImageDir attribute specified.options
- a ProductImagesOptions object for specifying the criteria used to define which
product images should be returned. Within this search object you can specify
productId and a file name filter (which is a regular expression).KKAdminException
- an unexpected exception in the KonaKart Admin engine if options is null or an
unexpected error.void removeProductFromCatalog(int productId, java.lang.String catalogId) throws java.lang.Exception
productId
- The numeric id of the product to be removedcatalogId
- Id of the catalog from which the product prices and quantities will be removedjava.lang.Exception
- an unexpected exceptionvoid addCatalogRules(java.lang.String catalogId, AdminCatalogRule[] rules) throws java.lang.Exception
createCatalogPricesFromRules()
method. They are used to
make price adjustments to products within selected categories and to include or exclude
products from selected categories.catalogId
- Id of the catalog to which the rules applyrules
- An array of rulesjava.lang.Exception
- an unexpected exceptionAdminCatalogRule[] getCatalogRules(java.lang.String catalogId) throws java.lang.Exception
createCatalogPricesFromRules()
to make price adjustments to products within
selected categories and to include or exclude products from selected categories.catalogId
- The alphanumeric catalog identifierjava.lang.Exception
- an unexpected exceptionAdminCreateCatalogPricesResult createCatalogPricesFromRules(java.lang.String catalogId, AdminCreateCatalogPriceOptions options) throws java.lang.Exception
addCatalogRules()
method. The rules are used to make price
adjustments to products within selected categories and to include or exclude products from
selected categories.catalogId
- Id of the catalogoptions
- All products are read from the database in a loop to add to the catalog. This
options object allows you to define the maximum number of records read at a time.java.lang.Exception
- an unexpected exceptionvoid refreshConfigs() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid insertCatalogPrices(AdminProductPrice[] prices, AdminInsertCatalogPriceOptions options) throws java.lang.Exception
The options object allows you:
singleTransaction
attribute is set to true,
the prices are updated / inserted within a single database transaction and a rollback is
performed if an exception is caught. When false, the API call terminates as soon as an
exception is caught, but no rollback is performed. The default is false.insertKKEvent
attribute is set to true, a product update event is inserted for all products which have had
price changes. The event ensures that the product is removed from the cache in order to pick
up the new prices. The default is false.prices
- An array of AdminProductPrice objectsoptions
- Allows you to manage the transaction and events. May be left empty for default
behaviour.java.lang.Exception
- an unexpected exceptionvoid deleteCatalogPrices(java.lang.String catalogName) throws org.apache.torque.TorqueException, KKAdminException
catalogName
- the catalogNameorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the Admin EngineCopyright © 2018 DS Data Systems UK Ltd.