public class AdminProductMgr extends AdminBaseMgr implements AdminProductMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
AdminProductMgr.AttributeSortOrderComparator
Used to sort the AdminProductAttribute objects based on option id and then option value id
|
protected class |
AdminProductMgr.OptionSortOrderComparator
Used to sort the Option objects based on option id
|
protected class |
AdminProductMgr.StaticData
Static Data Object
|
Modifier and Type | Field and Description |
---|---|
static int |
ACCESSORY
Accessories
|
static int |
BOOKABLE_PRODUCT_TYPE
Bookable product
|
static int |
BUNDLED_PRODUCTS
Bundled products
|
protected static int |
CAT_PRICE_ATTR
Used by insertProductPriceForCatalog
|
protected static int |
CAT_PRICE_PROD
Used by insertProductPriceForCatalog
|
protected static int |
CAT_PRICE_TIER
Used by insertProductPriceForCatalog
|
protected static int |
CAT_PRICE_VARIANT
Used by insertProductPriceForCatalog
|
protected static int |
CAT_PROD_READ_LIMIT
Used by insertProductPriceForCatalog
|
static int |
CROSS_SELL
Cross Sell related products
|
static java.lang.Boolean |
customAttrAnOracleCLOB
is Oracle CLOB used for custom_attrs column on the products table?
|
static int |
DEPENDENT_ITEM
Dependent items, such as warranties
|
static int |
DIGITAL_DOWNLOAD
Digital download product
|
static int |
DONT_INCLUDE
Used to not include values in the query
|
static int |
GIFT_CERTIFICATE_PRODUCT_TYPE
Gift Certificate product
|
protected static org.apache.commons.logging.Log |
log
the log
|
protected static java.lang.String |
mutex
Mutex for this manager
|
protected static java.util.Map<java.lang.String,AdminProductMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
static int |
UP_SELL
Up Sell related products
|
static int |
VIRTUAL_PRODUCT_TYPE
Virtual product
|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminProductMgr(KKAdminIf eng)
Constructor
|
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. |
protected void |
addDigitalDownloadOrderBy(com.konakart.db.KKCriteria c,
AdminDigitalDownloadSearch search) |
protected int |
addDigitalDownloadSearchCriteria(com.konakart.db.KKCriteria c,
AdminDigitalDownloadSearch search) |
protected void |
addProductImageFields(com.konakart.db.KKCriteria c) |
protected void |
addProductOptionOrderBy(com.konakart.db.KKCriteria c,
AdminProductOptionSearch search)
Add order by constraints for ProductOptions
|
protected int |
addProductOptionSearchCriteria(com.konakart.db.KKCriteria c,
AdminProductOptionSearch search,
int langId)
Add search criteria for ProductOptions
|
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.
|
protected java.util.List<AdminProductAttribute> |
convertProdAttrArrayToOrderedList(AdminProductAttribute[] prodAttrs) |
protected void |
copyProductPrices(AdminProduct prodFrom,
AdminProduct prodTo)
This copies the prices between two identical products.
|
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. |
protected java.lang.String |
createEncodedProductIdFromProductQuantityEncodedKey(int productId,
java.lang.String productQuantityEncodedKey)
Takes in a productQuantityEncodedKey and a productId and returns an encoded product Id.
|
protected java.lang.String |
createProductQuantityEncodedKeyFromOptions(AdminOption[] opts)
Takes in an an array of options and returns an encoded key for the products_quantity table
|
protected java.lang.String |
decodeVariantCodeFromOptionAndValue(java.lang.String encodedOptionValue,
java.sql.Connection con)
Used to process an encoded option value used in KonaKart to get a piece of variant code string
|
protected java.lang.String |
decodeVariantCodeFromOptionsAndValues(java.lang.String encodedOptionValues,
java.sql.Connection con)
Used to process the encoded option values used in KonaKart to get the variant code string.
|
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.
|
protected void |
deleteExtPrice(int productId,
int prodAttrId,
int tierPriceId,
java.lang.String catalogId,
java.lang.String productOptions,
com.konakart.db.KKCriteria deleteC,
java.sql.Connection con)
Used to delete a price in the external price table.
|
protected void |
deleteExtQuantity(int productId,
java.lang.String encodedOptionValues,
java.lang.String catalogId,
com.konakart.db.KKCriteria deleteC,
java.sql.Connection con)
Used to delete and external quantity record
|
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.
|
protected boolean |
doesExtPriceExist(int productId,
int prodAttrId,
int tierPriceId,
java.lang.String catalogId,
java.lang.String productOptions,
com.konakart.db.KKCriteria selectC)
Returns true if the external price record exists
|
protected boolean |
doesExtPriceExist(int productId,
int prodAttrId,
int tierPriceId,
java.lang.String catalogId,
java.lang.String productOptions,
com.konakart.db.KKCriteria selectC,
java.sql.Connection con)
Returns true if the external price record exists
|
protected boolean |
doesExtQuantityExist(int productId,
java.lang.String encodedOptionValues,
java.lang.String catalogId,
com.konakart.db.KKCriteria selectC)
Returns true if the external quantity record exists
|
protected boolean |
doesExtQuantityExist(int productId,
java.lang.String encodedOptionValues,
java.lang.String catalogId,
com.konakart.db.KKCriteria selectC,
java.sql.Connection con)
Returns true if the external quantity record exists
|
boolean |
doesProductExist(int productId)
Return true if the product exists.
|
boolean |
doesProductExist(int productId,
java.sql.Connection con)
Return true if the product exists.
|
protected boolean |
doesSpecialExist(int productId)
Determines whether a special exists for this product
|
protected boolean |
doesSpecialExist(int productId,
java.sql.Connection con)
Determines whether a special exists for this product
|
protected void |
editCustAttrTemplates(AdminProduct product,
java.sql.Connection con,
com.konakart.db.KKCriteria selectC,
com.konakart.db.KKCriteria deleteC,
com.konakart.db.KKCriteria updateC,
com.konakart.db.KKCriteria insertC)
protected method to edit the product template links
|
protected void |
editExtPrice(AdminProduct product,
java.lang.String catalogId,
com.konakart.db.KKCriteria selectC,
com.konakart.db.KKCriteria updateC,
java.sql.Connection con)
Used to edit a price in the external price table.
|
protected void |
editExtProdAttrPrice(AdminProductAttribute prodAttr,
java.lang.String catalogId,
com.konakart.db.KKCriteria selectC,
com.konakart.db.KKCriteria updateC,
java.sql.Connection con)
Used to edit a product attribute price in the external price table.
|
protected void |
editExtQuantity(AdminProductQuantity prodQ,
java.lang.String catalogId,
boolean setQuantity,
boolean setDate,
com.konakart.db.KKCriteria selectC,
com.konakart.db.KKCriteria updateC,
java.sql.Connection con)
Used to edit a quantity in the external quantity table.
|
protected void |
editExtTierPrice(AdminTierPrice tierPrice,
java.lang.String catalogId,
com.konakart.db.KKCriteria selectC,
com.konakart.db.KKCriteria updateC,
java.sql.Connection con)
Used to edit a product tier price in the external price table.
|
protected void |
editExtVariantPrice(AdminVariantPrice variantPrice,
java.lang.String catalogId,
com.konakart.db.KKCriteria selectC,
com.konakart.db.KKCriteria updateC,
java.sql.Connection con)
Used to edit a product variant prices in the external price table.
|
protected void |
editMiscPrices(AdminProduct product,
java.sql.Connection con)
Edit the Misc prices within the Transaction.
|
void |
editProduct(AdminProduct product)
Edit a product and its product description objects
|
void |
editProductAttribute(AdminProductAttribute prodAttr)
Edits the product attribute
|
protected java.util.HashMap<java.lang.String,java.lang.String> |
editProductAttributes(AdminProduct product,
java.sql.Connection con,
com.konakart.db.KKCriteria selectC,
com.konakart.db.KKCriteria deleteC,
com.konakart.db.KKCriteria updateC,
com.konakart.db.KKCriteria insertC,
AdminProductMgrOptions mgrOptions,
java.lang.String priceCatalog)
protected method to edit the product attribute records
|
protected void |
editProductDescriptions(AdminProduct product,
java.sql.Connection con,
com.konakart.db.KKCriteria selectC,
com.konakart.db.KKCriteria deleteC,
com.konakart.db.KKCriteria updateC,
com.konakart.db.KKCriteria insertC,
AdminProductMgrOptions mgrOptions)
protected method to edit the product descriptions
|
void |
editProductOption(AdminProductOption productOption)
Edit a product option
|
void |
editProductOptionValue(AdminProductOptionValue productOptionValue)
Edit a product option value
|
protected void |
editProductQuantities(AdminProduct product,
java.util.HashMap<java.lang.String,java.lang.String> prodAttrMap,
java.sql.Connection con,
com.konakart.db.KKCriteria selectC,
com.konakart.db.KKCriteria deleteC,
com.konakart.db.KKCriteria updateC,
com.konakart.db.KKCriteria insertC,
AdminProductMgrOptions mgrOptions)
protected method to edit the product quantity records
|
protected void |
editProductToCategory(AdminProduct product,
java.sql.Connection con)
Edit the product to category records
|
void |
editProductWithOptions(AdminProduct product,
AdminProductMgrOptions mgrOptions)
Edit a product and its product description objects.
|
protected void |
editProductWithOptions(AdminProduct product,
AdminProductMgrOptions mgrOptions,
boolean setMasterDate,
boolean allStores,
boolean manageSolr,
java.sql.Connection conIn)
Edit a product and its product description objects.
|
void |
editSpecial(AdminSpecial special)
Edit a special
|
protected void |
editSpecial(AdminSpecial special,
java.sql.Connection con)
Edit a special using a transaction already open
|
protected void |
editTierPrices(AdminProduct product,
java.sql.Connection con,
com.konakart.db.KKCriteria selectC,
com.konakart.db.KKCriteria deleteC,
com.konakart.db.KKCriteria updateC,
com.konakart.db.KKCriteria insertC,
AdminProductMgrOptions mgrOptions,
java.lang.String priceCatalog)
protected method to edit the tier price records
|
protected void |
editVariantPrices(AdminProduct product,
java.util.HashMap<java.lang.String,java.lang.String> prodAttrMap,
java.sql.Connection con,
com.konakart.db.KKCriteria selectC,
com.konakart.db.KKCriteria deleteC,
com.konakart.db.KKCriteria updateC,
com.konakart.db.KKCriteria insertC,
AdminProductMgrOptions mgrOptions,
java.lang.String priceCatalog)
protected method to edit the variant price records
|
protected java.lang.String |
encodeOptionsAndValuesFromVariantCode(java.lang.String variantCode,
java.sql.Connection con)
Used to process the variant code from ESP to get an encoded options values used in KonaKart
|
protected void |
formatProductPrices(AdminProduct product)
Format the prices of the product object
|
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.
|
AdminProduct |
getBundleProductDetails(int bundleId,
AdminProduct[] bundledProductsArray,
AdminDiscount discount,
java.sql.Connection con)
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
|
protected int |
getCatalogCount(com.konakart.db.KKCriteria c)
Get the number of catalogs
|
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
|
protected KKAdminException |
getCombinedExceptionStack(java.lang.String msg,
KKAdminException currentStack,
java.lang.Exception e)
If there's a previous exception we convert that to a String and create a new exception using
that String representation of the previous exception and this exception with it's current
stack.
|
protected int |
getCount(com.konakart.db.KKCriteria c,
boolean fixQuery)
This method is mainly used for paging.
|
protected int |
getCount(com.konakart.db.KKCriteria c,
boolean fixQuery,
java.sql.Connection con)
This method is mainly used for paging.
|
protected java.lang.String |
getCustomAttrs(int productId)
Get the custom_attrs for the product with the specified Id.
|
protected java.lang.String |
getCustomAttrs(int productId,
java.sql.Connection con)
Get the custom_attrs for the product with the specified Id.
|
protected AdminDigitalDownload |
getDigitalDownload(int customerId,
int productId)
Returns a Digital Download object for the customerId and productId passed in as parameters.
|
protected java.util.Date |
getExpiryDate(int maxDownloadDays)
Common code to get the expiry date
|
protected java.lang.String |
getFuturePriceCatalogId(java.lang.String catalogId,
java.util.Date futureRoundedDate,
java.lang.String futureDateFormat)
Create the id of the catalog used to store future prices
|
protected int |
getMappedProductId(int idFrom,
java.lang.String storeIdTo)
Returns the idTo if the product exists in storeIdTo.
|
protected int |
getMaxDownloadDays(AdminProduct prod)
Common code to get the maximum number of download days
|
protected int |
getMaxNumDownloads(AdminProduct prod)
Common code to get the maximum number of downloads
|
AdminMiscItem[] |
getMiscItems(AdminSearch search)
Get the MiscItems associated with the specified search criteria
|
AdminMiscItem[] |
getMiscItems(AdminSearch search,
java.sql.Connection con)
Get the MiscItems associated with the specified search criteria
|
AdminMiscItem[] |
getMiscItems(int productId)
Get the MiscItems associated with the specified productId
|
AdminMiscItem[] |
getMiscItems(int productId,
java.sql.Connection con)
Get the MiscItems associated with the specified productId
|
java.util.HashMap<java.lang.Integer,java.util.ArrayList<AdminMiscItem>> |
getMiscItemsHash(AdminSearch search)
Get the MiscItems associated with the specified search criteria
|
AdminMiscPrice[] |
getMiscPrices(int productId)
Get the Misc Prices associated with the specified productId
|
AdminMiscPrice[] |
getMiscPrices(int productId,
java.sql.Connection con)
Get the Misc Prices associated with the specified productId
|
protected int |
getNewQuantity(int currentQuantity,
int newQuantity,
int operation)
Utility method used by setProductQuantity()
|
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
|
protected java.lang.String |
getP2PHash(AdminProductToProduct p2p)
Returns a unique value for the productToProduct so that we can compare them
|
protected java.lang.String |
getPriceCatalogToUse(AdminProductMgrOptions mgrOptions)
If we are inserting a price for a future date then we insert it into a different catalog
which may already exist.
|
protected java.math.BigDecimal[] |
getPriceFromEncodedOptions(int productId,
java.lang.String encodedOptionValues)
For a product and a string containing encoded option values, this method returns an array of
BigDecimal objects for price0 to price3.
|
AdminProduct |
getProduct(int productId)
Gets a product object with full details
|
protected AdminProduct |
getProduct(int productId,
boolean getBundleQuantity)
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,
boolean getBundleQuantity,
AdminProductMgrOptions mgrOptions,
boolean allStores,
java.sql.Connection con)
Gets a product object with full details.
|
protected AdminProduct |
getProduct(int productId,
boolean getBundleQuantity,
java.sql.Connection con)
Gets a product object with full details
|
AdminProduct |
getProduct(int productId,
java.sql.Connection con)
Gets a product object with full details
|
protected AdminProductAttribute |
getProductAttribute(int productId,
int optionId,
int optionValueId)
Gets the product attributes object for the parameters.
|
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
|
AdminProductAttribute[] |
getProductAttributesPerProduct(int productId,
AdminProductMgrOptions mgrOptions,
java.lang.String priceCatalog,
java.sql.Connection con)
Gets all of the product attributes for the product
|
AdminProductAttribute[] |
getProductAttributesPerProduct(int productId,
java.sql.Connection con)
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
|
int[] |
getProductCategoryIds(int prodId,
boolean allStores) |
int[] |
getProductCategoryIds(int prodId,
boolean allStores,
java.sql.Connection con) |
int[] |
getProductCategoryIds(int prodId,
java.sql.Connection con) |
com.konakart.db.KKCriteria |
getProductCriteria()
Gets a new KKCriteria object 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
|
java.util.Set<java.lang.Integer> |
getProductDescriptionLanguageIds(int productId,
java.sql.Connection con)
Retrieve the complete set of languages used by the product descriptions of the specified
product Id
|
protected int |
getProductIdFromUUIDAndStore(java.lang.String uuid,
java.lang.String storeId)
Get the id of a product in a store based on its UUID
|
int[] |
getProductIdsPerManufacturer(AdminDataDescriptor dataDesc,
int manufacturerId)
Get product Ids for the manufacturer referenced by manufacturerId.
|
int[] |
getProductIdsPerManufacturer(AdminDataDescriptor dataDesc,
int manufacturerId,
java.sql.Connection con)
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.
|
protected int |
getProductOptionCount(AdminProductOptionSearch search,
int languageId)
Returns a count of the number of ProductOptions
|
protected int |
getProductOptionIdPerCode(java.lang.String code)
Given the code of a product options return the correspondent id.
|
protected int |
getProductOptionIdPerCode(java.lang.String code,
java.sql.Connection con)
Given the code of a product options return the correspondent id.
|
AdminProductOptionSearchResult |
getProductOptions(AdminProductOptionSearch search,
int offset,
int size)
This returns an AdminProductOptionSearchResult object.
|
java.lang.String |
getProductOptionsCodePerId(int productOptionId,
java.sql.Connection con)
Used to get the code of a product option with a given id
|
AdminProductOption[] |
getProductOptionsPerId(int productOptionId)
Returns an array of productOptions.
|
AdminProductOption[] |
getProductOptionsPerId(int productOptionId,
java.sql.Connection con)
Returns an array of productOptions.
|
AdminProductOption[] |
getProductOptionsPerName(java.lang.String name,
int langId)
Returns an array of productOptions with the specified name and languageId
|
protected java.lang.String |
getProductOptionValueCodePerProductOptionId(int productOptionValueId,
java.sql.Connection con)
Used to get the code of a product option value with a given id
|
protected int |
getProductOptionValueIdPerCodeAndProductOptionId(java.lang.String code,
int productOptionId,
java.sql.Connection con)
Used to get the id of a product option value with a given a code and a product option id
|
AdminProductOptionValue[] |
getProductOptionValuesPerId(int productOptionValueId)
Returns an array of productOptionValues.
|
AdminProductOptionValue[] |
getProductOptionValuesPerId(int productOptionValueId,
java.sql.Connection con)
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
|
protected AdminProductOptionValue[] |
getProductOptionValuesPerOption(int productOptionId,
int languageId,
java.sql.Connection con)
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.
|
protected AdminProductQuantity[] |
getProductQuantitiesPerProduct(int productId,
AdminProductAttribute[] prodAttrs,
AdminProductMgrOptions mgrOptions)
Create an array of AdminProductQuantity objects with zero quantity for all combinations of
options.
|
protected AdminProductQuantity[] |
getProductQuantitiesPerProduct(int productId,
AdminProductAttribute[] prodAttrs,
AdminProductMgrOptions mgrOptions,
java.sql.Connection con)
Create an array of AdminProductQuantity objects with zero quantity for all combinations of
options.
|
protected AdminProductQuantity[] |
getProductQuantitiesPerSKU(java.lang.String sku,
int rule)
Get a list of productQuantity objects for an SKU
|
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.
|
protected AdminProducts |
getProductsAllCasesWithOptions(AdminDataDescriptor dataDesc,
int categoryId,
int languageId,
int manufacturerId,
AdminProductMgrOptions mgrOptions)
This protected method gets called by various flavours of public methods to get an array of
products with differing criteria.
|
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 dataDescIn,
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)
Gets a product object with full details.
|
AdminProduct |
getProductWithOptions(int productId,
AdminProductMgrOptions mgrOptions,
java.sql.Connection con)
Gets a product object with full details.
|
AdminProducts |
getRelatedProducts(AdminDataDescriptor dataDesc,
int productId,
int relationType,
int languageId)
Find products related to the product defined by the productId parameter.
|
AdminProducts |
getRelatedProducts(AdminDataDescriptor dataDesc,
int productId,
int relationType,
int languageId,
java.sql.Connection con)
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.
|
AdminProducts |
getRelatedProductsWithOptions(AdminDataDescriptor dataDesc,
int productId,
int relationType,
int languageId,
AdminProductMgrOptions mgrOptions,
java.sql.Connection con)
Find products related to the product defined by the productId parameter.
|
protected AdminProducts |
getRelatedProductsWithOptions(AdminDataDescriptor dataDesc,
int productId,
int relationType,
int languageId,
java.util.HashMap<java.lang.String,AdminProduct> bundleProductMap,
int loopCounter,
int quantity,
AdminProductMgrOptions mgrOptions)
A protected version of getRelatedProducts with a hash map passed in for recursion
|
protected AdminProducts |
getRelatedProductsWithOptions(AdminDataDescriptor dataDesc,
int productId,
int relationType,
int languageId,
java.util.HashMap<java.lang.String,AdminProduct> bundleProductMap,
int loopCounter,
int quantity,
AdminProductMgrOptions mgrOptions,
java.sql.Connection con)
A protected version of getRelatedProducts with a hash map passed in for recursion
|
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 for a specialId
|
AdminSpecial |
getSpecial(int specialId,
java.sql.Connection con)
Gets a special object for a specialId
|
protected AdminSpecial |
getSpecialForProductId(int productId)
Gets a special object for a productId
|
protected AdminSpecial |
getSpecialForProductId(int productId,
java.sql.Connection con)
Gets a special object for a productId
|
protected AdminSpecial |
getSpecialForSpecialOrProductId(int specialId,
int productId)
Gets a special object for a specialId or productId.
|
protected AdminSpecial |
getSpecialForSpecialOrProductId(int specialId,
int productId,
java.sql.Connection con)
Gets a special object for a specialId or productId.
|
AdminProducts |
getSpecialsPerCategory(AdminDataDescriptor dataDesc,
int categoryId,
boolean searchInSubCats,
int languageId)
Return all products with a special price for a category referenced by categoryId
|
AdminProducts |
getSpecialsPerCategory(AdminDataDescriptor dataDesc,
int categoryId,
boolean searchInSubCats,
int languageId,
java.sql.Connection con) |
AdminTierPrice[] |
getTierPricesPerProduct(int productId,
AdminProductMgrOptions mgrOptions,
java.lang.String priceCatalog)
Gets all of the tier prices for the product
|
AdminTierPrice[] |
getTierPricesPerProduct(int productId,
AdminProductMgrOptions mgrOptions,
java.lang.String priceCatalog,
java.sql.Connection con)
Gets all of the tier prices for the product
|
protected AdminVariantPrice[] |
getVariantPricesPerProduct(int productId,
AdminProductMgrOptions mgrOptions,
java.lang.String priceCatalog,
java.sql.Connection con)
Gets all of the variant prices for the product
|
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.
|
protected void |
insertCustAttrTemplates(AdminProduct prod,
com.konakart.db.KKCriteria insertC,
java.sql.Connection con)
Insert links to templates while inserting the product
|
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.
|
protected void |
insertExtPrice(AdminProduct product,
java.lang.String catalogId,
com.konakart.db.KKCriteria insertC,
java.sql.Connection con)
Used to insert a price in the external price table.
|
protected void |
insertExtProdAttrPrice(AdminProductAttribute prodAttr,
java.lang.String catalogId,
com.konakart.db.KKCriteria insertC,
java.sql.Connection con)
Used to insert a product attribute price in the external price table.
|
protected void |
insertExtQuantity(AdminProductQuantity prodQ,
java.lang.String catalogId,
boolean setQuantity,
boolean setDate,
com.konakart.db.KKCriteria insertC,
java.sql.Connection con)
Used to insert a quantity in the external quantity table.
|
protected void |
insertExtTierPrice(AdminTierPrice tierPrice,
java.lang.String catalogId,
com.konakart.db.KKCriteria insertC,
java.sql.Connection con)
Used to insert a product tier price in the external price table.
|
protected void |
insertExtVariantPrice(AdminVariantPrice variantPrice,
java.lang.String catalogId,
com.konakart.db.KKCriteria insertC,
java.sql.Connection con)
Used to insert a product variant price in the external price table.
|
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.
|
protected void |
insertProductIntoExternalSystems(AdminProduct product,
boolean manageSolr)
Insert the product into external systems
|
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
|
protected int |
insertProductWithOptions(AdminProduct product,
AdminProductMgrOptions mgrOptions,
boolean setMasterDate,
boolean manageSolr,
java.lang.String storeId,
java.sql.Connection conIn)
Insert a product.
|
int |
insertSpecial(AdminSpecial special)
Insert a special
|
protected int |
insertSpecial(AdminSpecial special,
java.sql.Connection con)
Insert a special using a transaction already open
|
protected void |
insertVariantPrice(AdminVariantPrice variantPrice,
int productId,
com.konakart.db.KKCriteria insertC,
java.sql.Connection con)
protected method to insert new variant price records
|
static boolean |
isCustomAttrAnOracleCLOB()
Is the custom_attrs column is an Oracle CLOB? We only check once and save the result in a
static variable.
|
protected boolean |
isEnhancedVariantHandlingModeEnabled()
Check in the static data if enhanced variant handling mode is enabled.
|
protected void |
manageDataDescriptor(AdminDataDescriptor dataDesc,
com.konakart.db.KKCriteria c,
org.apache.torque.map.ColumnMap colMap)
Provides common code to deal with the management of the DataDescriptor.
|
protected void |
manageDataDescriptor(AdminDataDescriptor dataDesc,
com.konakart.db.KKCriteria c,
java.lang.String price)
Provides common code to deal with the management of the DataDescriptor.
|
protected void |
manageProductToStoreDataDescriptor(AdminDataDescriptor dataDesc,
com.konakart.db.KKCriteria c)
Provides common code to deal with the management of the DataDescriptor for ProductToStore
calls.
|
protected void |
processQuantity(AdminProductQuantity productQuantity,
java.sql.Connection con)
This method is used to process the product quantity in order to encode the variantCode
received from ESP or to decode the productOptionsValue from KonaKart into variantCode
useful when we should transmit an order to MAGO.
|
boolean |
productCategoryExists(int prodId,
int catId)
Returns true if the ProducstToCategories table contains a record for the specified productId
and categoryId
|
void |
refreshConfigs()
Retrieve some commonly-used properties and set the velocity log file location
|
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.
|
protected void |
removeProductFromExternalSystems(int productId)
Remove the product from external systems
|
protected void |
removeProductsToCatgeories(int productId)
Remove records for the specified productId from products_to_categories.
|
void |
removeProductsToStores(AdminProductToStore[] productToStores)
Removes an array of AdminProductToStore objects
|
void |
removeRelatedProduct(int productIdFrom,
int productIdTo,
int relationType)
Remove any existing relation of type == relationType between product with id == productIdFrom
and product with id == productIdTo.
|
void |
removeRelatedProducts(int productId,
int relationType)
Removes any existing relation of type == relationType defined on the product with id ==
productId.
|
protected void |
removeRelatedProductShared(int productIdFrom,
int productIdTo,
int relationType)
Remove any existing relation of type == relationType defined between product with id ==
productIdFrom and product with id == productIdTo.
|
protected java.util.Date |
roundDate(java.util.Calendar calendar,
java.lang.String granularity)
Method used to round a date to second, minute or hour precision
|
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
|
protected AdminProducts |
searchForProductsPrivateWithOptions(AdminDataDescriptor dataDesc,
AdminProductSearch prodSearch,
java.util.ArrayList<java.lang.Integer> prodIdList,
int languageId,
AdminProductMgrOptions mgrOptions)
Returns products matching the search criteria in the format defined by the data descriptor.
|
protected AdminProducts |
searchForProductsPrivateWithOptions(AdminDataDescriptor dataDesc,
AdminProductSearch prodSearch,
java.util.ArrayList<java.lang.Integer> prodIdList,
int languageId,
AdminProductMgrOptions mgrOptions,
java.sql.Connection con)
Returns products matching the search criteria in the format defined by the data descriptor.
|
AdminProducts |
searchForProductsWithOptions(AdminDataDescriptor dataDesc,
AdminProductSearch prodSearch,
int languageId,
AdminProductMgrOptions mgrOptions)
Search for products
|
protected void |
setBundleQuantity(AdminProduct prod)
Calculates the quantity if this product is a bundle and sets the quantity of the product
|
protected void |
setBundleQuantity(AdminProduct prod,
java.sql.Connection con)
Calculates the quantity if this product is a bundle and sets the quantity of the product
|
protected void |
setCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c,
int languageId,
AdminProductMgrOptions options,
java.lang.String priceCatalog,
AdminDataDescriptor dataDesc)
Initializes the criteria with the standard attributes for the product.
|
protected void |
setCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c,
int languageId,
boolean manuOuterJoin,
boolean catOuterJoin,
AdminProductMgrOptions options,
java.lang.String priceCatalog,
AdminDataDescriptor dataDesc)
Initializes the criteria with the standard attributes for the product.
|
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.
|
protected void |
setExtPriceProductCriteria(com.konakart.db.KKCriteria c,
AdminProductMgrOptions options,
java.lang.String priceCatalog)
Add criteria for getting the prices from another table based on the catalog id .
|
protected void |
setExtQuantityProductCriteria(com.konakart.db.KKCriteria c,
AdminProductMgrOptions options)
Add criteria for getting the quantity from another table based on the catalog id .
|
protected void |
setProductAttributeCriteria(com.konakart.db.KKCriteria c,
int langId)
Sets the product attribute criteria with standard attributes
|
void |
setProductAvailability(java.lang.String sku,
int id,
java.util.Calendar dateAvailable)
Sets the date when the product will be available
|
void |
setProductAvailabilityWithOptions(java.lang.String sku,
int id,
java.util.Calendar dateAvailable,
AdminProductMgrOptions mgrOptions)
Sets the date when the product will be available
|
protected void |
setProductOptionCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c)
Add product option attributes to Criteria
|
protected void |
setProductOptionValueCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c)
Add product option value attributes to Criteria
|
void |
setProductQuantity(java.lang.String sku,
int id,
int quantity,
int operation)
Sets the quantity of the product.
|
void |
setProductQuantityWithOptions(java.lang.String sku,
int id,
int quantity,
int operation,
AdminProductMgrOptions mgrOptions)
Sets the quantity of the product in an external table if the catalogId has a non null value.
|
void |
setProductQuantityWithOptions(java.lang.String sku,
int id,
int quantity,
int operation,
java.lang.String variantCode,
AdminProductMgrOptions mgrOptions)
Sets the quantity of the product in an external table if the catalogId has a non null value.
|
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.
|
protected void |
updateProductInExternalSystems(AdminProduct product,
boolean manageSolr,
boolean insert)
Update the product in external systems
|
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. |
protected boolean |
useExternalPrices(AdminProductMgrOptions mgrOptions)
Utility method for determining whether to use external prices
|
protected boolean |
useExternalQuantity(AdminProductMgrOptions mgrOptions)
Utility method for determining whether to use external quantity
|
protected AdminProduct |
validateDigitalDownload(int productId)
Validate the digital download productId
|
protected void |
validateProdOptionValToProdOption(AdminProdOptionValToProdOption productOptionValueToProductOption)
Used to validate a AdminProdOptionValToProdOption object before editing or inserting
|
protected void |
validateProduct(AdminProduct product)
Used to validate a product before editing or inserting
|
protected void |
validateProduct(AdminProduct product,
java.sql.Connection con)
Used to validate a product before editing or inserting
|
protected void |
validateProductAttribute(AdminProductAttribute productAttr,
boolean testProdId)
Used to validate a productAttribute before editing or inserting
|
protected void |
validateProductAttribute(AdminProductAttribute productAttr,
boolean testProdId,
java.sql.Connection con)
Used to validate a productAttribute before editing or inserting
|
protected void |
validateProductOption(AdminProductOption productOption)
Used to validate a productOption before editing or inserting
|
protected void |
validateProductOptionValue(AdminProductOptionValue productOptionValue)
Used to validate a productOptionValue before editing or inserting
|
protected void |
validateProductQuantity(AdminProductQuantity productQuantity)
Used to validate a productQuantity before editing or inserting
|
protected void |
validateSpecial(AdminSpecial special,
boolean checkProduct)
Used to validate a special before editing or inserting
|
protected void |
validateSpecial(AdminSpecial special,
boolean checkProduct,
java.sql.Connection con)
Used to validate a special before editing or inserting
|
protected void |
validateTierPrices(AdminTierPrice[] tierPrices)
Used to validate TierPrices before editing or inserting
|
protected void |
validateVariantPrices(AdminVariantPrice[] variantPrices,
java.sql.Connection con)
Used to validate AdminVariantPrices before editing or inserting
|
addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkAPICallEnabled, checkIntInRange, checkIntIsSet, checkRequired, executeQuery, executeQuery, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminContentMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustPwdHistMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminEngineCacheMgr, getAdminEventMgr, getAdminExecuteMgr, getAdminFileMgr, getAdminFilterMgr, getAdminHtmlMgr, getAdminImportMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminMiscPriceMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminServletMgr, getAdminShipmentMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminSuggestionMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getDebugStackTraceExclusions, getEmailThreadGracefulShutdownTimeout, getExportMgr, getExportMgr, getExportXMLData, getIntFromString, getKkAdminPropsFilePath, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getNewCriteria, getNewCriteria, getOtherModuleByName, getPostSearchText, getPreSearchText, getProductsToCategoresCriteria, getPropertyValue, getPropertyValue, getPropertyValueAsBool, getPropertyValueAsInt, getPropertyValueAsLong, getRecordCount, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isCommunity, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, isUnix, isWindows, manageException, manageThrowable, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNow
protected static org.apache.commons.logging.Log log
public static final int DONT_INCLUDE
public static final int UP_SELL
public static final int CROSS_SELL
public static final int ACCESSORY
public static final int DEPENDENT_ITEM
public static final int BUNDLED_PRODUCTS
public static final int DIGITAL_DOWNLOAD
public static final int GIFT_CERTIFICATE_PRODUCT_TYPE
public static final int BOOKABLE_PRODUCT_TYPE
public static final int VIRTUAL_PRODUCT_TYPE
protected static final int CAT_PRICE_PROD
protected static final int CAT_PRICE_ATTR
protected static final int CAT_PRICE_TIER
protected static final int CAT_PRICE_VARIANT
protected static final int CAT_PROD_READ_LIMIT
public static java.lang.Boolean customAttrAnOracleCLOB
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,AdminProductMgr.StaticData> staticDataHM
public AdminProductMgr(KKAdminIf eng) throws java.lang.Exception
eng
- KKAdmin enginejava.lang.Exception
- an unexpected exceptionpublic int insertProduct(AdminProduct product) throws java.lang.Exception
insertProduct
in interface AdminProductMgrIf
product
- the productjava.lang.Exception
- an unexpected exceptionpublic int insertProductWithOptions(AdminProduct product, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
insertProductWithOptions
in interface AdminProductMgrIf
product
- the productmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionprotected int insertProductWithOptions(AdminProduct product, AdminProductMgrOptions mgrOptions, boolean setMasterDate, boolean manageSolr, java.lang.String storeId, java.sql.Connection conIn) throws java.lang.Exception
product
- the productmgrOptions
- the mgrOptionssetMasterDate
- When set to true, the master date of the product is set. If a product is being
copied from one store to another then we don't want to change this since it shows
the last modified date of the master data.manageSolr
- If false, then inserts are not replicated in SOLRstoreId
- The store where to insert the productconIn
- database Connectionjava.lang.Exception
- an unexpected exceptionprotected void insertProductIntoExternalSystems(AdminProduct product, boolean manageSolr) throws java.lang.Exception
product
- the product to insertmanageSolr
- If false, then inserts are not replicated in SOLRjava.lang.Exception
- an unexpected exceptionpublic int insertSpecial(AdminSpecial special) throws java.lang.Exception
insertSpecial
in interface AdminProductMgrIf
special
- the specialjava.lang.Exception
- an unexpected exceptionprotected int insertSpecial(AdminSpecial special, java.sql.Connection con) throws java.lang.Exception
special
- the specialcon
- the conjava.lang.Exception
- an unexpected exceptionpublic void editSpecial(AdminSpecial special) throws java.lang.Exception
editSpecial
in interface AdminProductMgrIf
special
- the specialjava.lang.Exception
- an unexpected exceptionprotected void editSpecial(AdminSpecial special, java.sql.Connection con) throws java.lang.Exception
special
- the specialcon
- the conjava.lang.Exception
- an unexpected exceptionpublic void editProduct(AdminProduct product) throws java.lang.Exception
editProduct
in interface AdminProductMgrIf
product
- the productjava.lang.Exception
- an unexpected exceptionpublic void editProductWithOptions(AdminProduct product, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
editProductWithOptions
in interface AdminProductMgrIf
product
- the productmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionprotected void editProductWithOptions(AdminProduct product, AdminProductMgrOptions mgrOptions, boolean setMasterDate, boolean allStores, boolean manageSolr, java.sql.Connection conIn) throws java.lang.Exception
product
- the productmgrOptions
- the mgrOptionssetMasterDate
- When set to true, the master date of the product is set. If a product is being
copied from one store to another then we don't want to change this since it shows
the last modified date of the master data.allStores
- When set to true we don't check that the product exists in this store. It has to
exist but in shared products mode it could be attached to any storemanageSolr
- If false, then inserts are not replicated in SOLRconIn
- database Connectionjava.lang.Exception
- an unexpected exceptionprotected void editProductQuantities(AdminProduct product, java.util.HashMap<java.lang.String,java.lang.String> prodAttrMap, java.sql.Connection con, com.konakart.db.KKCriteria selectC, com.konakart.db.KKCriteria deleteC, com.konakart.db.KKCriteria updateC, com.konakart.db.KKCriteria insertC, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
product
- the productprodAttrMap
- Contains a hash map of strings, each containing the encoded optId{optValId} for
the product attributescon
- the conselectC
- the selectCdeleteC
- the deleteCupdateC
- the updateCinsertC
- the insertCmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionprotected void editMiscPrices(AdminProduct product, java.sql.Connection con) throws java.lang.Exception
product
- the productcon
- the conjava.lang.Exception
- an unexpected exceptionprotected void editTierPrices(AdminProduct product, java.sql.Connection con, com.konakart.db.KKCriteria selectC, com.konakart.db.KKCriteria deleteC, com.konakart.db.KKCriteria updateC, com.konakart.db.KKCriteria insertC, AdminProductMgrOptions mgrOptions, java.lang.String priceCatalog) throws java.lang.Exception
product
- the productcon
- the conselectC
- the selectCdeleteC
- the deleteCupdateC
- the updateCinsertC
- the insertCmgrOptions
- the mgrOptionspriceCatalog
- Catalog used for future pricesjava.lang.Exception
- an unexpected exceptionprotected java.util.HashMap<java.lang.String,java.lang.String> editProductAttributes(AdminProduct product, java.sql.Connection con, com.konakart.db.KKCriteria selectC, com.konakart.db.KKCriteria deleteC, com.konakart.db.KKCriteria updateC, com.konakart.db.KKCriteria insertC, AdminProductMgrOptions mgrOptions, java.lang.String priceCatalog) throws java.lang.Exception
product
- the productcon
- the conselectC
- the selectCdeleteC
- the deleteCupdateC
- the updateCinsertC
- the insertCmgrOptions
- the mgrOptionspriceCatalog
- Catalog used for future pricesjava.lang.Exception
- an unexpected exceptionprotected void editProductToCategory(AdminProduct product, java.sql.Connection con) throws java.lang.Exception
product
- the productcon
- the conjava.lang.Exception
- an unexpected exceptionpublic java.util.Set<java.lang.Integer> getProductDescriptionLanguageIds(int productId) throws java.lang.Exception
getProductDescriptionLanguageIds
in interface AdminProductMgrIf
productId
- the productIdjava.lang.Exception
- an unexpected exceptionpublic java.util.Set<java.lang.Integer> getProductDescriptionLanguageIds(int productId, java.sql.Connection con) throws java.lang.Exception
productId
- the productIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected void editProductDescriptions(AdminProduct product, java.sql.Connection con, com.konakart.db.KKCriteria selectC, com.konakart.db.KKCriteria deleteC, com.konakart.db.KKCriteria updateC, com.konakart.db.KKCriteria insertC, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
product
- the productcon
- the conselectC
- the selectCdeleteC
- the deleteCupdateC
- the updateCinsertC
- the insertCmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionprotected void editCustAttrTemplates(AdminProduct product, java.sql.Connection con, com.konakart.db.KKCriteria selectC, com.konakart.db.KKCriteria deleteC, com.konakart.db.KKCriteria updateC, com.konakart.db.KKCriteria insertC) throws java.lang.Exception
product
- the productcon
- the conselectC
- the selectCdeleteC
- the deleteCupdateC
- the updateCinsertC
- the insertCjava.lang.Exception
- an unexpected exceptionprotected void updateProductInExternalSystems(AdminProduct product, boolean manageSolr, boolean insert) throws java.lang.Exception
product
- the product to updatemanageSolr
- If false, then updates are not replicated in SOLRinsert
- true if this is an insert of a new productjava.lang.Exception
- an unexpected exceptionprotected void validateProduct(AdminProduct product) throws java.lang.Exception
product
- the product to validatejava.lang.Exception
- an unexpected exceptionprotected void validateProduct(AdminProduct product, java.sql.Connection con) throws java.lang.Exception
product
- the product to validatecon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected void validateSpecial(AdminSpecial special, boolean checkProduct) throws java.lang.Exception
special
- the specialcheckProduct
- the checkProductjava.lang.Exception
- an unexpected exceptionprotected void validateSpecial(AdminSpecial special, boolean checkProduct, java.sql.Connection con) throws java.lang.Exception
special
- the specialcheckProduct
- the checkProductcon
- the conjava.lang.Exception
- an unexpected exceptionpublic boolean doesProductExist(int productId) throws org.apache.torque.TorqueException, KKAdminException
doesProductExist
in interface AdminProductMgrIf
productId
- the productIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic boolean doesProductExist(int productId, java.sql.Connection con) throws org.apache.torque.TorqueException, KKAdminException
productId
- the productIdcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminProduct getProduct(int productId) throws java.lang.Exception
getProduct
in interface AdminProductMgrIf
productId
- the productIdjava.lang.Exception
- an unexpected exceptionpublic AdminProduct getProduct(int productId, java.sql.Connection con) throws java.lang.Exception
getProduct
in interface AdminProductMgrIf
productId
- the productIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic AdminProduct getProductWithOptions(int productId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
getProductWithOptions
in interface AdminProductMgrIf
productId
- the productIdmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionpublic AdminProduct getProductWithOptions(int productId, AdminProductMgrOptions mgrOptions, java.sql.Connection con) throws java.lang.Exception
productId
- the productIdmgrOptions
- the mgrOptionscon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected AdminProduct getProduct(int productId, boolean getBundleQuantity) throws java.lang.Exception
productId
- the productIdgetBundleQuantity
- When set to true we calculate the quantity of a product if it is a bundlejava.lang.Exception
- an unexpected exceptionprotected AdminProduct getProduct(int productId, boolean getBundleQuantity, java.sql.Connection con) throws java.lang.Exception
productId
- the productIdgetBundleQuantity
- When set to true we calculate the quantity of a product if it is a bundlecon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic AdminProduct getProduct(int productId, boolean getBundleQuantity, AdminProductMgrOptions mgrOptions, boolean allStores) throws java.lang.Exception
getProduct
in interface AdminProductMgrIf
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 exceptionpublic AdminProduct getProduct(int productId, boolean getBundleQuantity, AdminProductMgrOptions mgrOptions, boolean allStores, java.sql.Connection con) 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 modecon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic AdminSpecial getSpecial(int specialId) throws java.lang.Exception
getSpecial
in interface AdminProductMgrIf
specialId
- the specialIdjava.lang.Exception
- an unexpected exceptionpublic AdminSpecial getSpecial(int specialId, java.sql.Connection con) throws java.lang.Exception
specialId
- the specialIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected AdminSpecial getSpecialForProductId(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptionprotected AdminSpecial getSpecialForProductId(int productId, java.sql.Connection con) throws java.lang.Exception
productId
- the productIdcon
- the conjava.lang.Exception
- an unexpected exceptionprotected AdminSpecial getSpecialForSpecialOrProductId(int specialId, int productId) throws java.lang.Exception
specialId
- Used if greater than 0productId
- Used if greater than 0java.lang.Exception
- an unexpected exceptionprotected AdminSpecial getSpecialForSpecialOrProductId(int specialId, int productId, java.sql.Connection con) throws java.lang.Exception
specialId
- Used if greater than 0productId
- Used if greater than 0con
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected boolean doesSpecialExist(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptionprotected boolean doesSpecialExist(int productId, java.sql.Connection con) throws java.lang.Exception
productId
- the productIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic void deleteSpecial(int specialId) throws java.lang.Exception
deleteSpecial
in interface AdminProductMgrIf
specialId
- the specialIdjava.lang.Exception
- an unexpected exceptionpublic void deleteProducts(AdminCommonOptions options) throws java.lang.Exception
deleteProducts
in interface AdminProductMgrIf
options
- An AdminCommonOptions object. Set the ids of the products to delete in the ids
attribute.java.lang.Exception
- an unexpected exceptionpublic void deleteProduct(int productId) throws java.lang.Exception
deleteProduct
in interface AdminProductMgrIf
productId
- the productIdjava.lang.Exception
- an unexpected exceptionprotected void removeProductsToCatgeories(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptionprotected void removeProductFromExternalSystems(int productId) throws KKAdminException
productId
- the Id of the product to removeKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected KKAdminException getCombinedExceptionStack(java.lang.String msg, KKAdminException currentStack, java.lang.Exception e)
msg
- the msgcurrentStack
- the currentStacke
- the epublic AdminProducts getProductsPerCategory(AdminDataDescriptor dataDesc, int categoryId, int languageId) throws java.lang.Exception
AdminProductMgrIf
getProductsPerCategory
in interface AdminProductMgrIf
dataDesc
- the dataDesccategoryId
- the categoryIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic AdminProducts getProductsPerCategoryWithOptions(AdminDataDescriptor dataDesc, int categoryId, int languageId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
AdminProductMgrIf
getProductsPerCategoryWithOptions
in interface AdminProductMgrIf
dataDesc
- the dataDesccategoryId
- the categoryIdlanguageId
- the languageIdmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionpublic AdminProducts getProductsPerManufacturerWithOptions(AdminDataDescriptor dataDesc, int manufacturerId, int languageId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
AdminProductMgrIf
getProductsPerManufacturerWithOptions
in interface AdminProductMgrIf
dataDesc
- the dataDescmanufacturerId
- the manufacturerIdlanguageId
- the languageIdmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionpublic AdminProducts getProductsPerManufacturer(AdminDataDescriptor dataDesc, int manufacturerId, int languageId) throws java.lang.Exception
AdminProductMgrIf
getProductsPerManufacturer
in interface AdminProductMgrIf
dataDesc
- the dataDescmanufacturerId
- the manufacturerIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic int[] getProductIdsPerManufacturer(AdminDataDescriptor dataDesc, int manufacturerId) throws java.lang.Exception
getProductIdsPerManufacturer
in interface AdminProductMgrIf
dataDesc
- the data descriptor is only used for setting the offset and the limitmanufacturerId
- the manufacturerIdjava.lang.Exception
- an unexpected exceptionpublic int[] getProductIdsPerManufacturer(AdminDataDescriptor dataDesc, int manufacturerId, java.sql.Connection con) throws java.lang.Exception
dataDesc
- the data descriptor is only used for setting the offset and the limitmanufacturerId
- the manufacturerIdcon
- the conjava.lang.Exception
- an unexpected exceptionprotected AdminProducts getProductsAllCasesWithOptions(AdminDataDescriptor dataDesc, int categoryId, int languageId, int manufacturerId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
dataDesc
- the dataDesccategoryId
- the categoryIdlanguageId
- the languageIdmanufacturerId
- the manufacturerIdmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionpublic AdminProducts searchForProducts(AdminDataDescriptor dataDesc, AdminProductSearch prodSearch, int languageId) throws java.lang.Exception
searchForProducts
in interface AdminProductMgrIf
dataDesc
- the dataDescprodSearch
- the prodSearchlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic AdminProducts searchForProductsWithOptions(AdminDataDescriptor dataDesc, AdminProductSearch prodSearch, int languageId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
searchForProductsWithOptions
in interface AdminProductMgrIf
dataDesc
- the dataDescprodSearch
- the prodSearchlanguageId
- the languageIdmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionprotected AdminProducts searchForProductsPrivateWithOptions(AdminDataDescriptor dataDesc, AdminProductSearch prodSearch, java.util.ArrayList<java.lang.Integer> prodIdList, int languageId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
dataDesc
- the dataDescprodSearch
- the prodSearchprodIdList
- If not null, it must contain a list of productIds which will be added to an IN
clause.languageId
- the languageIdmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionprotected AdminProducts searchForProductsPrivateWithOptions(AdminDataDescriptor dataDesc, AdminProductSearch prodSearch, java.util.ArrayList<java.lang.Integer> prodIdList, int languageId, AdminProductMgrOptions mgrOptions, java.sql.Connection con) throws java.lang.Exception
dataDesc
- the dataDescprodSearch
- the prodSearchprodIdList
- If not null, it must contain a list of productIds which will be added to an IN
clause.languageId
- the languageIdmgrOptions
- the mgrOptionscon
- the conjava.lang.Exception
- an unexpected exceptionprotected java.lang.String getCustomAttrs(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptionprotected java.lang.String getCustomAttrs(int productId, java.sql.Connection con) throws java.lang.Exception
productId
- the productIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected void setCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c, int languageId, AdminProductMgrOptions options, java.lang.String priceCatalog, AdminDataDescriptor dataDesc) throws KKAdminException
c
- the clanguageId
- the languageIdoptions
- the optionspriceCatalog
- Catalog used for future pricesdataDesc
- the dataDescKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void setCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c, int languageId, boolean manuOuterJoin, boolean catOuterJoin, AdminProductMgrOptions options, java.lang.String priceCatalog, AdminDataDescriptor dataDesc) throws KKAdminException
c
- the clanguageId
- the languageIdmanuOuterJoin
- the manuOuterJoincatOuterJoin
- the catOuterJoinoptions
- the optionspriceCatalog
- Catalog used for future pricesdataDesc
- the dataDescKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void setProductsSharedCriteria(com.konakart.db.KKCriteria c) throws KKAdminException
setProductsSharedCriteria
in interface AdminProductMgrIf
c
- the cKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void setProductsSharedCriteria(com.konakart.db.KKCriteria c, boolean addSelectPriceId) throws KKAdminException
setProductsSharedCriteria
in interface AdminProductMgrIf
c
- the caddSelectPriceId
- if true BaseProductToStoresPeer.PRICE_ID and custom fields will be added as select
columnsKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void setExtPriceProductCriteria(com.konakart.db.KKCriteria c, AdminProductMgrOptions options, java.lang.String priceCatalog)
c
- the coptions
- the optionspriceCatalog
- Catalog used for future pricesprotected void setExtQuantityProductCriteria(com.konakart.db.KKCriteria c, AdminProductMgrOptions options)
c
- the coptions
- the optionsprotected void setProductAttributeCriteria(com.konakart.db.KKCriteria c, int langId)
c
- the clangId
- the langIdprotected void manageDataDescriptor(AdminDataDescriptor dataDesc, com.konakart.db.KKCriteria c, org.apache.torque.map.ColumnMap colMap)
dataDesc
- the dataDescc
- the ccolMap
- the colMapprotected void manageDataDescriptor(AdminDataDescriptor dataDesc, com.konakart.db.KKCriteria c, java.lang.String price)
dataDesc
- the dataDescc
- the cprice
- the priceprotected int getCount(com.konakart.db.KKCriteria c, boolean fixQuery) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
c
- the cfixQuery
- the fixQueryorg.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 Engineprotected int getCount(com.konakart.db.KKCriteria c, boolean fixQuery, java.sql.Connection con) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
c
- the cfixQuery
- the fixQuerycon
- Connection for transactionorg.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 Enginepublic void deleteProductsPerCategory(int categoryId) throws java.lang.Exception
deleteProductsPerCategory
in interface AdminProductMgrIf
categoryId
- the categoryIdjava.lang.Exception
- an unexpected exceptionpublic void deleteDirectProductsPerCategory(int categoryId) throws java.lang.Exception
deleteDirectProductsPerCategory
in interface AdminProductMgrIf
categoryId
- the categoryIdjava.lang.Exception
- an unexpected exceptionpublic void deleteProductsPerManufacturer(int manufacturerId) throws java.lang.Exception
deleteProductsPerManufacturer
in interface AdminProductMgrIf
manufacturerId
- the manufacturerIdjava.lang.Exception
- an unexpected exceptionpublic AdminProducts getAllSpecials(AdminDataDescriptor dataDesc, int languageId) throws java.lang.Exception
AdminProductMgrIf
getAllSpecials
in interface AdminProductMgrIf
dataDesc
- the dataDesclanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic AdminProducts getSpecialsPerCategory(AdminDataDescriptor dataDesc, int categoryId, boolean searchInSubCats, int languageId) throws java.lang.Exception
AdminProductMgrIf
getSpecialsPerCategory
in interface AdminProductMgrIf
dataDesc
- the dataDesccategoryId
- the categoryIdsearchInSubCats
- the searchInSubCatslanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic AdminProducts getSpecialsPerCategory(AdminDataDescriptor dataDesc, int categoryId, boolean searchInSubCats, int languageId, java.sql.Connection con) throws java.lang.Exception
dataDesc
- the dataDesccategoryId
- the categoryIdsearchInSubCats
- the searchInSubCatslanguageId
- the languageIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic AdminProductOption[] getAllProductOptions(int languageId) throws java.lang.Exception
AdminProductMgrIf
getAllProductOptions
in interface AdminProductMgrIf
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 exceptionpublic AdminProductOptionSearchResult getProductOptions(AdminProductOptionSearch search, int offset, int size) throws java.lang.Exception
getProductOptions
in interface AdminProductMgrIf
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 exceptionpublic AdminProductOptionValue[] getAllProductOptionValues(int languageId) throws java.lang.Exception
getAllProductOptionValues
in interface AdminProductMgrIf
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 exceptionpublic AdminProductOptionValue[] getProductOptionValuesPerOption(int productOptionId, int languageId) throws java.lang.Exception
getProductOptionValuesPerOption
in interface AdminProductMgrIf
productOptionId
- the productOptionIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionprotected AdminProductOptionValue[] getProductOptionValuesPerOption(int productOptionId, int languageId, java.sql.Connection con) throws java.lang.Exception
productOptionId
- the productOptionIdlanguageId
- the languageIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic AdminProductOptionValue[] getProductOptionValuesPerName(java.lang.String name, int languageId) throws java.lang.Exception
getProductOptionValuesPerName
in interface AdminProductMgrIf
name
- product option value namelanguageId
- language id (can use AdminLanguageMgr.DEFAULT_LANG to get the default language)java.lang.Exception
- an unexpected exceptionpublic AdminProductAttribute[] getProductAttributesPerProduct(int productId) throws java.lang.Exception
getProductAttributesPerProduct
in interface AdminProductMgrIf
productId
- the productIdjava.lang.Exception
- an unexpected exceptionpublic AdminProductAttribute[] getProductAttributesPerProduct(int productId, java.sql.Connection con) throws java.lang.Exception
productId
- the productIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic AdminProductAttribute[] getProductAttributesPerProduct(int productId, AdminProductMgrOptions mgrOptions, java.lang.String priceCatalog) throws java.lang.Exception
getProductAttributesPerProduct
in interface AdminProductMgrIf
productId
- the productIdmgrOptions
- the mgrOptionspriceCatalog
- Catalog used for future pricesjava.lang.Exception
- an unexpected exceptionpublic AdminProductAttribute[] getProductAttributesPerProduct(int productId, AdminProductMgrOptions mgrOptions, java.lang.String priceCatalog, java.sql.Connection con) throws java.lang.Exception
productId
- the productIdmgrOptions
- the mgrOptionspriceCatalog
- the price Catalogcon
- Connection for Transactionjava.lang.Exception
- an unexpected exceptionpublic AdminTierPrice[] getTierPricesPerProduct(int productId, AdminProductMgrOptions mgrOptions, java.lang.String priceCatalog) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
productId
- the productIdmgrOptions
- the mgrOptionspriceCatalog
- Catalog used for future pricesorg.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 Enginepublic AdminTierPrice[] getTierPricesPerProduct(int productId, AdminProductMgrOptions mgrOptions, java.lang.String priceCatalog, java.sql.Connection con) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
productId
- the productIdmgrOptions
- the mgrOptionspriceCatalog
- Catalog used for future pricescon
- Connection for Transactionorg.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 Enginepublic void deleteProductAttribute(int productAttributeId) throws java.lang.Exception
deleteProductAttribute
in interface AdminProductMgrIf
productAttributeId
- the productAttributeIdjava.lang.Exception
- an unexpected exceptionpublic void deleteProductAttributesPerProduct(int productId) throws java.lang.Exception
deleteProductAttributesPerProduct
in interface AdminProductMgrIf
productId
- the productIdjava.lang.Exception
- an unexpected exceptionpublic void editProductAttribute(AdminProductAttribute prodAttr) throws java.lang.Exception
editProductAttribute
in interface AdminProductMgrIf
prodAttr
- the prodAttrjava.lang.Exception
- an unexpected exceptionpublic int insertProductAttribute(AdminProductAttribute prodAttr) throws java.lang.Exception
insertProductAttribute
in interface AdminProductMgrIf
prodAttr
- the prodAttrjava.lang.Exception
- an unexpected exceptionpublic void deleteProductOptions(int productOptionId) throws java.lang.Exception
deleteProductOptions
in interface AdminProductMgrIf
productOptionId
- the productOptionIdjava.lang.Exception
- an unexpected exceptionpublic void deleteProductOptionValues(int productOptionValueId) throws java.lang.Exception
deleteProductOptionValues
in interface AdminProductMgrIf
productOptionValueId
- the productOptionValueIdjava.lang.Exception
- an unexpected exceptionpublic AdminProductOption[] getProductOptionsPerId(int productOptionId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, KKAdminException
getProductOptionsPerId
in interface AdminProductMgrIf
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
- unexpected exception in the KonaKart Admin Enginepublic AdminProductOption[] getProductOptionsPerId(int productOptionId, java.sql.Connection con) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, KKAdminException
productOptionId
- the productOptionIdcon
- Connection object for transactioncom.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
- unexpected exception in the KonaKart Admin Enginepublic AdminProductOption[] getProductOptionsPerName(java.lang.String name, int langId) throws KKAdminException
getProductOptionsPerName
in interface AdminProductMgrIf
name
- Product Option NamelangId
- Language IdKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminProductOptionValue[] getProductOptionValuesPerId(int productOptionValueId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getProductOptionValuesPerId
in interface AdminProductMgrIf
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
- unexpected exception in the KonaKart Admin Enginepublic AdminProductOptionValue[] getProductOptionValuesPerId(int productOptionValueId, java.sql.Connection con) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
productOptionValueId
- the productOptionValueIdcon
- Connection object for transactionorg.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 Enginepublic int insertProductOptions(AdminProductOption[] productOptions) throws java.lang.Exception
insertProductOptions
in interface AdminProductMgrIf
productOptions
- the productOptionsjava.lang.Exception
- an unexpected exceptionpublic void insertProductOption(AdminProductOption productOption) throws java.lang.Exception
insertProductOption
in interface AdminProductMgrIf
productOption
- the productOptionjava.lang.Exception
- an unexpected exceptionpublic void editProductOption(AdminProductOption productOption) throws java.lang.Exception
editProductOption
in interface AdminProductMgrIf
productOption
- the productOptionjava.lang.Exception
- an unexpected exceptionpublic int insertProductOptionValues(AdminProductOptionValue[] productOptionValues, int productOptionId) throws java.lang.Exception
insertProductOptionValues
in interface AdminProductMgrIf
productOptionValues
- the productOptionValuesproductOptionId
- the productOptionIdjava.lang.Exception
- an unexpected exceptionpublic int insertProductsOptionsValuesToProductsOptions(AdminProdOptionValToProdOption prodOptValToProdOpt) throws java.lang.Exception
insertProductsOptionsValuesToProductsOptions
in interface AdminProductMgrIf
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 exceptionpublic AdminProdOptionValToProdOption[] getProductOptionValueToProductOptions(AdminProdOptionValToProdOption prodOptValToProdOpt) throws java.lang.Exception
getProductOptionValueToProductOptions
in interface AdminProductMgrIf
prodOptValToProdOpt
- the AdminProdOptionValToProdOption to look up. Only uses the optionId and
OptionValueId in this objectjava.lang.Exception
- an unexpected exceptionpublic void editProductOptionValue(AdminProductOptionValue productOptionValue) throws java.lang.Exception
editProductOptionValue
in interface AdminProductMgrIf
productOptionValue
- the productOptionValuejava.lang.Exception
- an unexpected exceptionprotected void validateProductOption(AdminProductOption productOption) throws java.lang.Exception
productOption
- the productOptionjava.lang.Exception
- an unexpected exceptionprotected void validateProductQuantity(AdminProductQuantity productQuantity) throws java.lang.Exception
productQuantity
- the productQuantityjava.lang.Exception
- an unexpected exceptionprotected void validateProductAttribute(AdminProductAttribute productAttr, boolean testProdId) throws java.lang.Exception
productAttr
- the productAttrtestProdId
- the testProdIdjava.lang.Exception
- an unexpected exceptionprotected void validateProductAttribute(AdminProductAttribute productAttr, boolean testProdId, java.sql.Connection con) throws java.lang.Exception
productAttr
- the productAttrtestProdId
- the testProdIdcon
- if we're in a transactionjava.lang.Exception
- an unexpected exceptionprotected void validateTierPrices(AdminTierPrice[] tierPrices) throws java.lang.Exception
tierPrices
- the tierPricesjava.lang.Exception
- an unexpected exceptionprotected void validateProductOptionValue(AdminProductOptionValue productOptionValue) throws java.lang.Exception
productOptionValue
- the productOptionValuejava.lang.Exception
- an unexpected exceptionprotected void validateProdOptionValToProdOption(AdminProdOptionValToProdOption productOptionValueToProductOption) throws java.lang.Exception
productOptionValueToProductOption
- the productOptionValueToProductOptionjava.lang.Exception
- an unexpected exceptionpublic int getNextProductOptionId() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getNextProductOptionId
in interface AdminProductMgrIf
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
- unexpected exception in the KonaKart Admin Enginepublic int getNextProductOptionValuesId() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getNextProductOptionValuesId
in interface AdminProductMgrIf
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
- unexpected exception in the KonaKart Admin Engineprotected void formatProductPrices(AdminProduct product) throws java.lang.Exception
product
- the productjava.lang.Exception
- an unexpected exceptionpublic AdminProducts getRelatedProducts(AdminDataDescriptor dataDesc, int productId, int relationType, int languageId) throws java.lang.Exception
getRelatedProducts
in interface AdminProductMgrIf
dataDesc
- the dataDescproductId
- the productIdrelationType
- the relationTypelanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic AdminProducts getRelatedProducts(AdminDataDescriptor dataDesc, int productId, int relationType, int languageId, java.sql.Connection con) throws java.lang.Exception
dataDesc
- the dataDescproductId
- the productIdrelationType
- the relationTypelanguageId
- the languageIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic AdminProducts getRelatedProductsWithOptions(AdminDataDescriptor dataDesc, int productId, int relationType, int languageId, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
getRelatedProductsWithOptions
in interface AdminProductMgrIf
dataDesc
- the dataDescproductId
- the productIdrelationType
- the relationTypelanguageId
- the languageIdmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionpublic AdminProducts getRelatedProductsWithOptions(AdminDataDescriptor dataDesc, int productId, int relationType, int languageId, AdminProductMgrOptions mgrOptions, java.sql.Connection con) throws java.lang.Exception
dataDesc
- the dataDescproductId
- the productIdrelationType
- the relationTypelanguageId
- the languageIdmgrOptions
- the mgrOptionscon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected AdminProducts getRelatedProductsWithOptions(AdminDataDescriptor dataDesc, int productId, int relationType, int languageId, java.util.HashMap<java.lang.String,AdminProduct> bundleProductMap, int loopCounter, int quantity, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
dataDesc
- the dataDescproductId
- the productIdrelationType
- the relationTypelanguageId
- the languageIdbundleProductMap
- HashMap used to keep track of products during recursion.loopCounter
- Used to stop recursion forever. Throws an exception if recursion occurs when a
bundle product is set to be a product within the bundle.quantity
- Used to multiply quantity during recursion. i.e. A bundled product may have a
quantity of two and itself be a bundle. This means that all of the products in its
bundle have to be multiplied by two.mgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionprotected AdminProducts getRelatedProductsWithOptions(AdminDataDescriptor dataDesc, int productId, int relationType, int languageId, java.util.HashMap<java.lang.String,AdminProduct> bundleProductMap, int loopCounter, int quantity, AdminProductMgrOptions mgrOptions, java.sql.Connection con) throws java.lang.Exception
dataDesc
- the dataDescproductId
- the productIdrelationType
- the relationTypelanguageId
- the languageIdbundleProductMap
- HashMap used to keep track of products during recursion.loopCounter
- Used to stop recursion forever. Throws an exception if recursion occurs when a
bundle product is set to be a product within the bundle.quantity
- Used to multiply quantity during recursion. i.e. A bundled product may have a
quantity of two and itself be a bundle. This means that all of the products in its
bundle have to be multiplied by two.mgrOptions
- the mgrOptionscon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected java.lang.String createEncodedProductIdFromProductQuantityEncodedKey(int productId, java.lang.String productQuantityEncodedKey)
The format of the encoded product id is 1{2}3{4}5 where the product id = 1, the first optionId / valueId pair have ids of 2,3 and the 2nd optionId / valueId pair have ids of 4,5.
The format of the encoded key for the products_quantitytable is 3{4}4{6} which means product_options of id==3 and product_options_values of id==4 followed by product_options of id==4 and product_options_values of id==6. The order is very important since the product option ids must be in ascending order.
productId
- the productIdproductQuantityEncodedKey
- the productQuantityEncodedKeypublic void removeRelatedProduct(int productIdFrom, int productIdTo, int relationType) throws java.lang.Exception
removeRelatedProduct
in interface AdminProductMgrIf
productIdFrom
- the productId the relation generates fromproductIdTo
- the productId the relation points torelationType
- the relationType ( see column: products_to_products.relation_type )java.lang.Exception
- an unexpected exceptionpublic void removeRelatedProducts(int productId, int relationType) throws java.lang.Exception
removeRelatedProducts
in interface AdminProductMgrIf
productId
- the productIdrelationType
- the relationTypejava.lang.Exception
- an unexpected exceptionprotected void removeRelatedProductShared(int productIdFrom, int productIdTo, int relationType) throws java.lang.Exception
productIdFrom
- the productId the relation generates from ( see column:
products_to_products.id_from )productIdTo
- the productId the relation points to ( see column: products_to_products.id_to )relationType
- the relationType ( see column: products_to_products.relation_type )java.lang.Exception
- an unexpected exceptionpublic void addRelatedProducts(AdminProduct[] products, int productId, int relationType) throws org.apache.torque.TorqueException, KKAdminException
addRelatedProducts
in interface AdminProductMgrIf
products
- the productsproductId
- the productIdrelationType
- the relationTypeorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void addRelatedProductsWithOptions(AdminProduct[] products, int productId, int relationType, AdminProductMgrOptions mgrOptions) throws org.apache.torque.TorqueException, KKAdminException
addRelatedProductsWithOptions
in interface AdminProductMgrIf
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
- unexpected exception in the KonaKart Admin Engineprotected AdminProductQuantity[] getProductQuantitiesPerSKU(java.lang.String sku, int rule) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
sku
- the skurule
- the ruleorg.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 Engineprotected AdminProductQuantity[] getProductQuantitiesPerProduct(int productId, AdminProductAttribute[] prodAttrs, AdminProductMgrOptions mgrOptions) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
productId
- the productIdmgrOptions
- the mgrOptionsprodAttrs
- the prodAttrsorg.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 Engineprotected AdminProductQuantity[] getProductQuantitiesPerProduct(int productId, AdminProductAttribute[] prodAttrs, AdminProductMgrOptions mgrOptions, java.sql.Connection con) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
productId
- the productIdmgrOptions
- the mgrOptionsprodAttrs
- the prodAttrscon
- Connection for transactionorg.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 Enginepublic java.lang.String[] getSkus(AdminOrderProduct[] orderProds) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getSkus
in interface AdminProductMgrIf
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
- unexpected exception in the KonaKart Admin Enginepublic java.lang.String getSku(AdminOrderProduct orderProd) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getSku
in interface AdminProductMgrIf
orderProd
- the orderProdKKAdminException
- 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)public java.lang.String getSku(int productId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getSku
in interface AdminProductMgrIf
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 Engineprotected java.lang.String createProductQuantityEncodedKeyFromOptions(AdminOption[] opts)
The format of the encoded key for the products_quantitytable is 3{4}4{6} which means product_options of id==3 and product_options_values of id==4 followed by product_options of id==4 and product_options_values of id==6. The order is very important since the product option ids must be in ascending order.
opts
- the optspublic void insertDigitalDownload(int customerId, int productId) throws java.lang.Exception
insertDigitalDownload
in interface AdminProductMgrIf
customerId
- the customerIdproductId
- the productIdjava.lang.Exception
- an unexpected exceptionpublic int insertGiftCertificateDigitalDownload(int customerId, int productId, java.lang.String filePath) throws java.lang.Exception
insertGiftCertificateDigitalDownload
in interface AdminProductMgrIf
customerId
- the customerIdproductId
- the productIdfilePath
- the filePathjava.lang.Exception
- an unexpected exceptionprotected int getMaxDownloadDays(AdminProduct prod) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException, java.lang.Exception
prod
- the prodjava.lang.Exception
- an unexpected exceptionKKAdminException
- 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)protected java.util.Date getExpiryDate(int maxDownloadDays)
maxDownloadDays
- the maxDownloadDaysprotected int getMaxNumDownloads(AdminProduct prod) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException, java.lang.Exception
prod
- the prodjava.lang.Exception
- an unexpected exceptionKKAdminException
- 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)protected AdminProduct validateDigitalDownload(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- Returns an exception if the product does not exist or is not a digital download
or gift certificate product.protected AdminDigitalDownload getDigitalDownload(int customerId, int productId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
customerId
- the customerIdproductId
- the productIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)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
- unexpected exception in the KonaKart Admin Enginepublic void setDigitalDownloadCriteria(com.konakart.db.KKCriteria c)
setDigitalDownloadCriteria
in interface AdminProductMgrIf
c
- the cpublic AdminProduct getBundleProductDetails(int bundleId, AdminProduct[] bundledProductsArray, AdminDiscount discount) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
getBundleProductDetails
in interface AdminProductMgrIf
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 exceptionpublic AdminProduct getBundleProductDetails(int bundleId, AdminProduct[] bundledProductsArray, AdminDiscount discount, java.sql.Connection con) 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 percentagecon
- Connection for transactionorg.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 exceptionprotected void setBundleQuantity(AdminProduct prod) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
prod
- the prodjava.lang.Exception
- an unexpected exceptioncom.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)protected void setBundleQuantity(AdminProduct prod, java.sql.Connection con) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
prod
- the prodcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptioncom.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)public AdminMiscItem[] getMiscItems(int productId) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException, java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public AdminMiscItem[] getMiscItems(int productId, java.sql.Connection con) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException, java.lang.Exception
productId
- the productIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public AdminMiscItem[] getMiscItems(AdminSearch search) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException, java.lang.Exception
search
- the searchjava.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public AdminMiscItem[] getMiscItems(AdminSearch search, java.sql.Connection con) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException, java.lang.Exception
search
- the searchcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public java.util.HashMap<java.lang.Integer,java.util.ArrayList<AdminMiscItem>> getMiscItemsHash(AdminSearch search) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException, java.lang.Exception
search
- the searchjava.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public AdminMiscPrice[] getMiscPrices(int productId) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException, java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public AdminMiscPrice[] getMiscPrices(int productId, java.sql.Connection con) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException, java.lang.Exception
productId
- the productIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected java.math.BigDecimal[] getPriceFromEncodedOptions(int productId, java.lang.String encodedOptionValues) throws java.lang.NumberFormatException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
productId
- the productIdencodedOptionValues
- the encodedOptionValuesjava.lang.NumberFormatException
- an unexpected NumberFormatException exceptionorg.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 Engineprotected AdminProductAttribute getProductAttribute(int productId, int optionId, int optionValueId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
productId
- the productIdoptionId
- the optionIdoptionValueId
- the optionValueIdorg.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 Enginepublic void setProductQuantity(java.lang.String sku, int id, int quantity, int operation) throws java.lang.Exception
setProductQuantity
in interface AdminProductMgrIf
sku
- the skuid
- the idquantity
- the quantityoperation
- the operationjava.lang.Exception
- an unexpected exceptionpublic void setProductQuantityWithOptions(java.lang.String sku, int id, int quantity, int operation, java.lang.String variantCode, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
setProductQuantityWithOptions
in interface AdminProductMgrIf
sku
- the skuid
- the idquantity
- the quantityoperation
- the operationvariantCode
- the variantCodemgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionpublic void setProductQuantityWithOptions(java.lang.String sku, int id, int quantity, int operation, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
setProductQuantityWithOptions
in interface AdminProductMgrIf
sku
- the skuid
- the idquantity
- the quantityoperation
- the operationmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionpublic int getProductQuantity(java.lang.String sku, int id) throws java.lang.Exception
AdminProductMgrIf
getProductQuantity
in interface AdminProductMgrIf
sku
- the skuid
- the idjava.lang.Exception
- an unexpected exceptionpublic int getProductQuantityWithOptions(java.lang.String sku, int id, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
AdminProductMgrIf
getProductQuantityWithOptions
in interface AdminProductMgrIf
sku
- the skuid
- the idmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionpublic void setProductAvailability(java.lang.String sku, int id, java.util.Calendar dateAvailable) throws java.lang.Exception
setProductAvailability
in interface AdminProductMgrIf
sku
- the skuid
- the iddateAvailable
- the dateAvailablejava.lang.Exception
- an unexpected exceptionpublic void setProductAvailabilityWithOptions(java.lang.String sku, int id, java.util.Calendar dateAvailable, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
setProductAvailabilityWithOptions
in interface AdminProductMgrIf
sku
- the skuid
- the iddateAvailable
- the dateAvailablemgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionpublic java.util.Calendar getProductAvailability(java.lang.String sku, int id) throws java.lang.Exception
AdminProductMgrIf
getProductAvailability
in interface AdminProductMgrIf
sku
- the skuid
- the idjava.lang.Exception
- an unexpected exceptionpublic java.util.Calendar getProductAvailabilityWithOptions(java.lang.String sku, int id, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
AdminProductMgrIf
getProductAvailabilityWithOptions
in interface AdminProductMgrIf
sku
- the skuid
- the idmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionprotected int getNewQuantity(int currentQuantity, int newQuantity, int operation)
currentQuantity
- the currentQuantitynewQuantity
- the newQuantityoperation
- the operationpublic void insertProductOptionValue(AdminProductOptionValue productOptionValue, int productOptionId) throws java.lang.Exception
insertProductOptionValue
in interface AdminProductMgrIf
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 exceptionpublic AdminProductToStore[] getProductsToStores(AdminDataDescriptor dataDesc, AdminSearch search) throws java.lang.Exception
AdminProductMgrIf
getProductsToStores
in interface AdminProductMgrIf
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 exceptionprotected void manageProductToStoreDataDescriptor(AdminDataDescriptor dataDesc, com.konakart.db.KKCriteria c)
dataDesc
- the dataDescc
- the cpublic void insertProductsToStores(AdminProductToStore[] productToStores) throws java.lang.Exception
AdminProductMgrIf
insertProductsToStores
in interface AdminProductMgrIf
productToStores
- an array of AdminProductToStore objects to insert into the databasejava.lang.Exception
- an unexpected exceptionpublic void removeProductsToStores(AdminProductToStore[] productToStores) throws java.lang.Exception
AdminProductMgrIf
removeProductsToStores
in interface AdminProductMgrIf
productToStores
- an array of AdminProductToStore objects to delete from the databasejava.lang.Exception
- an unexpected exceptionpublic AdminDigitalDownloadSearchResult searchDigitalDownloads(AdminDigitalDownloadSearch search, int offset, int size) throws java.lang.Exception
AdminProductMgrIf
searchDigitalDownloads
in interface AdminProductMgrIf
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 exceptionprotected int addDigitalDownloadSearchCriteria(com.konakart.db.KKCriteria c, AdminDigitalDownloadSearch search)
c
- the csearch
- the searchprotected void addDigitalDownloadOrderBy(com.konakart.db.KKCriteria c, AdminDigitalDownloadSearch search)
c
- the csearch
- the searchpublic int importDigitalDownload(AdminDigitalDownload digDownload) throws java.lang.Exception
AdminProductMgrIf
importDigitalDownload
in interface AdminProductMgrIf
digDownload
- the Digital Download object to importjava.lang.Exception
- an unexpected exception if the digital download record specified is invalid or
there are database problemsprotected boolean doesExtPriceExist(int productId, int prodAttrId, int tierPriceId, java.lang.String catalogId, java.lang.String productOptions, com.konakart.db.KKCriteria selectC) throws org.apache.torque.TorqueException
productId
- the productIdprodAttrId
- the prodAttrIdtierPriceId
- the tierPriceIdcatalogId
- the catalogIdproductOptions
- the productOptionsselectC
- the selectCorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected boolean doesExtPriceExist(int productId, int prodAttrId, int tierPriceId, java.lang.String catalogId, java.lang.String productOptions, com.konakart.db.KKCriteria selectC, java.sql.Connection con) throws org.apache.torque.TorqueException
productId
- the productIdprodAttrId
- the prodAttrIdtierPriceId
- the tierPriceIdcatalogId
- the catalogIdproductOptions
- the productOptionsselectC
- the selectCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void insertExtPrice(AdminProduct product, java.lang.String catalogId, com.konakart.db.KKCriteria insertC, java.sql.Connection con) throws org.apache.torque.TorqueException
product
- the productcatalogId
- the catalogIdinsertC
- the insertCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void insertExtProdAttrPrice(AdminProductAttribute prodAttr, java.lang.String catalogId, com.konakart.db.KKCriteria insertC, java.sql.Connection con) throws org.apache.torque.TorqueException
prodAttr
- the prodAttrcatalogId
- the catalogIdinsertC
- the insertCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void insertExtTierPrice(AdminTierPrice tierPrice, java.lang.String catalogId, com.konakart.db.KKCriteria insertC, java.sql.Connection con) throws org.apache.torque.TorqueException
tierPrice
- the tierPricecatalogId
- the catalogIdinsertC
- the insertCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void editExtPrice(AdminProduct product, java.lang.String catalogId, com.konakart.db.KKCriteria selectC, com.konakart.db.KKCriteria updateC, java.sql.Connection con) throws org.apache.torque.TorqueException
product
- the productcatalogId
- the catalogIdselectC
- the selectCupdateC
- the updateCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void editExtProdAttrPrice(AdminProductAttribute prodAttr, java.lang.String catalogId, com.konakart.db.KKCriteria selectC, com.konakart.db.KKCriteria updateC, java.sql.Connection con) throws org.apache.torque.TorqueException
prodAttr
- the prodAttrcatalogId
- the catalogIdselectC
- the selectCupdateC
- the updateCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void editExtTierPrice(AdminTierPrice tierPrice, java.lang.String catalogId, com.konakart.db.KKCriteria selectC, com.konakart.db.KKCriteria updateC, java.sql.Connection con) throws org.apache.torque.TorqueException
tierPrice
- the tierPricecatalogId
- the catalogIdselectC
- the selectCupdateC
- the updateCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void deleteExtPrice(int productId, int prodAttrId, int tierPriceId, java.lang.String catalogId, java.lang.String productOptions, com.konakart.db.KKCriteria deleteC, java.sql.Connection con) throws org.apache.torque.TorqueException
productId
- the productIdprodAttrId
- the prodAttrIdtierPriceId
- the tierPriceIdcatalogId
- the catalogIdproductOptions
- the productOptionsdeleteC
- the deleteCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void deleteCatalogPrices(java.lang.String catalogName) throws org.apache.torque.TorqueException, KKAdminException
deleteCatalogPrices
in interface AdminProductMgrIf
catalogName
- the catalogNameorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the Admin Engineprotected boolean doesExtQuantityExist(int productId, java.lang.String encodedOptionValues, java.lang.String catalogId, com.konakart.db.KKCriteria selectC) throws org.apache.torque.TorqueException
productId
- the productIdencodedOptionValues
- the encodedOptionValuescatalogId
- the catalogIdselectC
- the selectCorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected boolean doesExtQuantityExist(int productId, java.lang.String encodedOptionValues, java.lang.String catalogId, com.konakart.db.KKCriteria selectC, java.sql.Connection con) throws org.apache.torque.TorqueException
productId
- the productIdencodedOptionValues
- the encodedOptionValuescatalogId
- the catalogIdselectC
- the selectCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void insertExtQuantity(AdminProductQuantity prodQ, java.lang.String catalogId, boolean setQuantity, boolean setDate, com.konakart.db.KKCriteria insertC, java.sql.Connection con) throws org.apache.torque.TorqueException
prodQ
- the prodQcatalogId
- the catalogIdsetQuantity
- the setQuantitysetDate
- the setDateinsertC
- the insertCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void editExtQuantity(AdminProductQuantity prodQ, java.lang.String catalogId, boolean setQuantity, boolean setDate, com.konakart.db.KKCriteria selectC, com.konakart.db.KKCriteria updateC, java.sql.Connection con) throws org.apache.torque.TorqueException
prodQ
- the prodQcatalogId
- the catalogIdsetQuantity
- the setQuantitysetDate
- the setDateselectC
- the selectCupdateC
- the updateCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void deleteExtQuantity(int productId, java.lang.String encodedOptionValues, java.lang.String catalogId, com.konakart.db.KKCriteria deleteC, java.sql.Connection con) throws org.apache.torque.TorqueException
productId
- the productIdencodedOptionValues
- the encodedOptionValuescatalogId
- the catalogIddeleteC
- the deleteCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void insertCustAttrTemplates(AdminProduct prod, com.konakart.db.KKCriteria insertC, java.sql.Connection con) throws org.apache.torque.TorqueException
prod
- the prodinsertC
- the insertCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected boolean useExternalPrices(AdminProductMgrOptions mgrOptions)
mgrOptions
- the mgrOptionsprotected boolean useExternalQuantity(AdminProductMgrOptions mgrOptions)
mgrOptions
- the mgrOptionsprotected java.lang.String getPriceCatalogToUse(AdminProductMgrOptions mgrOptions) throws java.lang.Exception
mgrOptions
- product manager optionsjava.lang.Exception
- an unexpected exceptionprotected java.util.Date roundDate(java.util.Calendar calendar, java.lang.String granularity) throws KKAdminException
calendar
- the date to roundgranularity
- granularityKKAdminException
- an unexpected exception in the KKAdmin engineprotected java.lang.String getFuturePriceCatalogId(java.lang.String catalogId, java.util.Date futureRoundedDate, java.lang.String futureDateFormat) throws KKAdminException
catalogId
- catalogIdfutureRoundedDate
- future rounded datefutureDateFormat
- future date formatKKAdminException
- an unexpected exception in the KKAdmin engineprotected void setProductOptionCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c)
c
- the cprotected void setProductOptionValueCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c)
c
- the cprotected int getProductOptionCount(AdminProductOptionSearch search, int languageId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
search
- Search criterialanguageId
- the languageIdorg.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 Engineprotected int addProductOptionSearchCriteria(com.konakart.db.KKCriteria c, AdminProductOptionSearch search, int langId)
c
- the csearch
- the searchlangId
- the langIdprotected void addProductOptionOrderBy(com.konakart.db.KKCriteria c, AdminProductOptionSearch search)
c
- the csearch
- the searchpublic void deleteCatalog(int catalogId) throws org.apache.torque.TorqueException, KKAdminException, java.lang.Exception
deleteCatalog
in interface AdminProductMgrIf
catalogId
- the catalogIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginejava.lang.Exception
- an unexpected Exceptionpublic void deleteCatalogWithOptions(int catalogId, AdminDeleteCatalogOptions options) throws java.lang.Exception
deleteCatalogWithOptions
in interface AdminProductMgrIf
catalogId
- The numeric id of the catalogoptions
- define whether or not to remove prices for this catalog as well.java.lang.Exception
- an unexpected Exceptionpublic AdminCatalogSearchResult getCatalogs(AdminCatalogSearch search, int offset, int size) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getCatalogs
in interface AdminProductMgrIf
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
- unexpected exception in the KonaKart Admin Enginepublic int insertCatalog(AdminCatalog catalog) throws KKAdminException, org.apache.torque.TorqueException
insertCatalog
in interface AdminProductMgrIf
catalog
- the catalogKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void updateCatalog(AdminCatalog catalog) throws java.lang.Exception
updateCatalog
in interface AdminProductMgrIf
catalog
- the catalogjava.lang.Exception
- an unexpected exceptionpublic AdminCatalog getCatalogById(int catalogId) throws java.lang.Exception
getCatalogById
in interface AdminProductMgrIf
catalogId
- the catalogIdjava.lang.Exception
- an unexpected exceptionprotected int getCatalogCount(com.konakart.db.KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
c
- the corg.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 Enginepublic static boolean isCustomAttrAnOracleCLOB()
public int copyProductToStore(int productId, java.lang.String storeIdFrom, java.lang.String storeIdTo, AdminCopyProductOptions options) throws java.lang.Exception
copyProductToStore
in interface AdminProductMgrIf
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 exceptionprotected java.lang.String getP2PHash(AdminProductToProduct p2p)
p2p
- the p2pprotected int getProductIdFromUUIDAndStore(java.lang.String uuid, java.lang.String storeId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
uuid
- the uuidstoreId
- the storeIdorg.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)protected int getMappedProductId(int idFrom, java.lang.String storeIdTo) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
idFrom
- the idFromstoreIdTo
- the storeIdToorg.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)protected void copyProductPrices(AdminProduct prodFrom, AdminProduct prodTo) throws KKAdminException
prodFrom
- the prodFromprodTo
- the prodToKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminProducts getProductsToSynchronize(java.lang.String storeIdFrom, java.lang.String storeIdTo, AdminDataDescriptor dataDescIn, int languageId, AdminSynchProductsOptions options, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
getProductsToSynchronize
in interface AdminProductMgrIf
storeIdFrom
- The id of the source storestoreIdTo
- The id of the destination storedataDescIn
- 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 exceptionpublic void 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.updateProductReviewInfo
in interface AdminProductMgrIf
productId
- the productIdjava.lang.Exception
- an unexpected exceptionpublic boolean insertProductCategory(int prodId, int catId) throws java.lang.Exception
AdminProductMgrIf
insertProductCategory
in interface AdminProductMgrIf
prodId
- Product IDcatId
- Category IDjava.lang.Exception
- an unexpected exceptionpublic boolean productCategoryExists(int prodId, int catId) throws java.lang.Exception
prodId
- the prodIdcatId
- the catIdjava.lang.Exception
- an unexpected exceptionpublic int[] getProductCategoryIds(int prodId) throws java.lang.Exception
AdminProductMgrIf
getProductCategoryIds
in interface AdminProductMgrIf
prodId
- the prodIdjava.lang.Exception
- an unexpected exceptionpublic int[] getProductCategoryIds(int prodId, java.sql.Connection con) throws java.lang.Exception
prodId
- the prodIdcon
- the conjava.lang.Exception
- an unexpected exceptionpublic int[] getProductCategoryIds(int prodId, boolean allStores) throws java.lang.Exception
prodId
- the product Id whose categories we want to retrieveallStores
- if set to true we retrieve categories for all stores.java.lang.Exception
- an unexpected exceptionpublic int[] getProductCategoryIds(int prodId, boolean allStores, java.sql.Connection con) throws java.lang.Exception
prodId
- the product Id whose categories we want to retrieveallStores
- if set to true we retrieve categories for all stores.con
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic com.konakart.db.KKCriteria getProductCriteria() throws KKAdminException
getProductCriteria
in interface AdminProductMgrIf
KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminProduct getProductImageFields(int productId) throws KKAdminException
AdminProductMgrIf
getProductImageFields
in interface AdminProductMgrIf
productId
- the productIdKKAdminException
- an unexpected exception in the KonaKart Admin engineprotected void addProductImageFields(com.konakart.db.KKCriteria c)
c
- the cpublic void updateProductImageFields(AdminProduct prod) throws KKAdminException
AdminProductMgrIf
updateProductImageFields
in interface AdminProductMgrIf
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 enginepublic com.konakart.app.ProductImages getProductImages(com.konakart.appif.ProductImagesOptionsIf options) throws KKAdminException
AdminProductMgrIf
getProductImages
in interface AdminProductMgrIf
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.public com.konakart.app.ProductImages getProductImagesForProduct(AdminProduct prod, com.konakart.appif.ProductImagesOptionsIf options) throws KKAdminException
AdminProductMgrIf
getProductImagesForProduct
in interface AdminProductMgrIf
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.public void refreshConfigs() throws KKAdminException
refreshConfigs
in interface AdminProductMgrIf
refreshConfigs
in class AdminBaseMgr
KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void removeProductFromCatalog(int productId, java.lang.String catalogId) throws java.lang.Exception
AdminProductMgrIf
removeProductFromCatalog
in interface AdminProductMgrIf
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 exceptionpublic void addCatalogRules(java.lang.String catalogId, AdminCatalogRule[] rules) throws java.lang.Exception
AdminProductMgrIf
createCatalogPricesFromRules()
method. They are used to
make price adjustments to products within selected categories and to include or exclude
products from selected categories.addCatalogRules
in interface AdminProductMgrIf
catalogId
- Id of the catalog to which the rules applyrules
- An array of rulesjava.lang.Exception
- an unexpected exceptionpublic AdminCatalogRule[] getCatalogRules(java.lang.String catalogId) throws java.lang.Exception
AdminProductMgrIf
createCatalogPricesFromRules()
to make price adjustments to products within
selected categories and to include or exclude products from selected categories.getCatalogRules
in interface AdminProductMgrIf
catalogId
- The alphanumeric catalog identifierjava.lang.Exception
- an unexpected exceptionpublic AdminCreateCatalogPricesResult createCatalogPricesFromRules(java.lang.String catalogId, AdminCreateCatalogPriceOptions options) throws java.lang.Exception
AdminProductMgrIf
addCatalogRules()
method. The rules are used to make price
adjustments to products within selected categories and to include or exclude products from
selected categories.createCatalogPricesFromRules
in interface AdminProductMgrIf
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 exceptionpublic void insertCatalogPrices(AdminProductPrice[] prices, AdminInsertCatalogPriceOptions options) throws java.lang.Exception
AdminProductMgrIf
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.insertCatalogPrices
in interface AdminProductMgrIf
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 exceptionprotected boolean isEnhancedVariantHandlingModeEnabled() throws KKAdminException
KKAdminException
- an unexpected KKAdminException exceptionprotected void insertVariantPrice(AdminVariantPrice variantPrice, int productId, com.konakart.db.KKCriteria insertC, java.sql.Connection con) throws org.apache.torque.TorqueException
variantPrice
- the variantPriceproductId
- the productIdinsertC
- the insertCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void editVariantPrices(AdminProduct product, java.util.HashMap<java.lang.String,java.lang.String> prodAttrMap, java.sql.Connection con, com.konakart.db.KKCriteria selectC, com.konakart.db.KKCriteria deleteC, com.konakart.db.KKCriteria updateC, com.konakart.db.KKCriteria insertC, AdminProductMgrOptions mgrOptions, java.lang.String priceCatalog) throws java.lang.Exception
product
- the productprodAttrMap
- the prodAttrMapcon
- the conselectC
- the selectCdeleteC
- the deleteCupdateC
- the updateCinsertC
- the insertCmgrOptions
- the mgrOptionspriceCatalog
- Catalog used for future pricesjava.lang.Exception
- an unexpected exceptionprotected void validateVariantPrices(AdminVariantPrice[] variantPrices, java.sql.Connection con) throws java.lang.Exception
variantPrices
- the variantPricescon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected java.lang.String encodeOptionsAndValuesFromVariantCode(java.lang.String variantCode, java.sql.Connection con) throws java.lang.Exception
variantCode
- the variantCodecon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected java.lang.String decodeVariantCodeFromOptionsAndValues(java.lang.String encodedOptionValues, java.sql.Connection con) throws java.lang.Exception
encodedOptionValues
- the encodedOptionValuescon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected java.lang.String decodeVariantCodeFromOptionAndValue(java.lang.String encodedOptionValue, java.sql.Connection con) throws java.lang.Exception
encodedOptionValue
- the encodedOptionValuecon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected AdminVariantPrice[] getVariantPricesPerProduct(int productId, AdminProductMgrOptions mgrOptions, java.lang.String priceCatalog, java.sql.Connection con) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
productId
- the productIdmgrOptions
- the mgrOptionspriceCatalog
- Catalog used for future pricescon
- Connection for Transactionorg.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 Engineprotected int getProductOptionIdPerCode(java.lang.String code) throws java.lang.Exception
code
- the codejava.lang.Exception
- unexpected exceptionprotected int getProductOptionIdPerCode(java.lang.String code, java.sql.Connection con) throws java.lang.Exception
code
- the codecon
- Connection for transactionjava.lang.Exception
- unexpected exceptionprotected int getProductOptionValueIdPerCodeAndProductOptionId(java.lang.String code, int productOptionId, java.sql.Connection con) throws java.lang.Exception
code
- the codeproductOptionId
- the productOptionIdcon
- Connection for transactionjava.lang.Exception
- unexpected exceptionpublic java.lang.String getProductOptionsCodePerId(int productOptionId, java.sql.Connection con) throws java.lang.Exception
productOptionId
- the productOptionIdcon
- Connection for transactionjava.lang.Exception
- unexpected exceptionprotected java.lang.String getProductOptionValueCodePerProductOptionId(int productOptionValueId, java.sql.Connection con) throws java.lang.Exception
productOptionValueId
- the productOptionValueIdcon
- Connection for transactionjava.lang.Exception
- unexpected exceptionprotected void insertExtVariantPrice(AdminVariantPrice variantPrice, java.lang.String catalogId, com.konakart.db.KKCriteria insertC, java.sql.Connection con) throws org.apache.torque.TorqueException
variantPrice
- the variantPricecatalogId
- the catalogIdinsertC
- the insertCcon
- the insertCorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void editExtVariantPrice(AdminVariantPrice variantPrice, java.lang.String catalogId, com.konakart.db.KKCriteria selectC, com.konakart.db.KKCriteria updateC, java.sql.Connection con) throws org.apache.torque.TorqueException
variantPrice
- the variantPricecatalogId
- the catalogIdselectC
- the selectCupdateC
- the updateCcon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected java.util.List<AdminProductAttribute> convertProdAttrArrayToOrderedList(AdminProductAttribute[] prodAttrs)
protected void processQuantity(AdminProductQuantity productQuantity, java.sql.Connection con) throws java.lang.Exception
productQuantity
- an AdminProductQuantity objectcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.