public class ProductMgr extends BaseMgr implements ProductMgrIf
| Modifier and Type | Class and Description |
|---|---|
protected class |
ProductMgr.OptionSortOrderComparator
Used to sort the Option objects based on option id
|
protected class |
ProductMgr.ProdAttr
protected class used to create the encoded key
|
protected class |
ProductMgr.ProdAttrSortOrderComparator
Used to sort the ProdAttr objects based on option id
|
protected class |
ProductMgr.ProdSortOrderComparator
Used to sort products for getBundlesThatProductBelongsTo()
|
protected class |
ProductMgr.StaticData
Used to store the static data of this manager
|
protected class |
ProductMgr.TagSortOrderComparator
Used to sort a list of tags
|
| Modifier and Type | Field and Description |
|---|---|
static int |
ACCESSORY
Accessories
|
static int |
ALL_RELATIONSHIPS
Returns all related products
|
static int |
BOOKABLE_PRODUCT_TYPE
Bookable Product Type
|
static int |
BUNDLE_PRODUCT_TYPE
Bundle Product Type
|
static int |
BUNDLED_PRODUCT_RELATIONSHIP
Bundled product
|
static int |
CROSS_SELL
Cross Sell related products
|
static int |
CUSTOM_RELATIONSHIP_1
Custom relationship
|
static int |
CUSTOM_RELATIONSHIP_2
Custom relationship
|
static int |
CUSTOM_RELATIONSHIP_3
Custom relationship
|
static int |
CUSTOM_RELATIONSHIP_4
Custom relationship
|
static int |
CUSTOM_RELATIONSHIP_5
Custom relationship
|
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 |
FREE_SHIPPING
Physical product with free shipping
|
static int |
FREE_SHIPPING_BUNDLE_PRODUCT_TYPE
Free Shipping Bundle Product Type
|
static int |
GIFT_CERTIFICATE_PRODUCT_TYPE
Gift Certificate Product Type
|
protected static org.apache.commons.logging.Log |
log
the log
|
static int |
PHYSICAL_PRODUCT
Physical product
|
protected static java.lang.String |
prodMgrMutex
Mutex for the product manager
|
protected static int |
productViewCountMaxRetries
Number of times to retry the product view count update SQL
|
protected static java.lang.String |
prodViewMutex
Mutex for updating product viewed count
|
protected static java.lang.String |
reserveStockMutex
Mutex for reserving stock
|
protected static java.util.Map<java.lang.String,ProductMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
protected static java.lang.String |
tagMutex
Mutex for updating tags
|
static int |
UP_SELL
Up Sell related products
|
protected static java.lang.String |
updateStockMutex
Mutex for updating stock
|
static int |
VIRTUAL_PRODUCT_TYPE
Virtual Product Type
|
templateBaseDir| Constructor and Description |
|---|
ProductMgr(KKEngIf eng)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addProductDescriptions(Product[] prods,
int langId,
boolean multiStoreSearch)
Adds the description to an array of products
|
protected void |
addProductsToStoresConstraint(KKCriteria c,
org.apache.torque.map.ColumnMap cm)
If we're sharing products we need to add a constraint to the criteria object so that we only
get records if there is a record for this product and storeId in the products_to_stores
table.
|
protected void |
addTax(Customer cust,
Product product)
We set the price of the product including tax for the customer identified by cust.
|
protected void |
addTax(Customer cust,
Products products,
Product[] productArray)
We iterate through the array of products and for each product, we set the price including
tax.
|
protected KKCriteria |
beforeSendCriteria(java.lang.String sessionId,
java.lang.String apiCall,
KKCriteria criteria,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
int languageId,
FetchProductOptionsIf options)
Method that can be used to customize the KKCriteria object before it is used to create the
query string that is sent to the database.
|
protected java.lang.String |
beforeSendQuery(java.lang.String sessionId,
java.lang.String apiCall,
java.lang.String queryString,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
int languageId,
FetchProductOptionsIf options)
Method that can be used to customize the query string before being sent to the database.
|
boolean |
cacheThisProduct(Product product)
Should this particular product be cached? The default implementation returns false for null
products and Bundle products (according to the setting of the configuration value) and simply
returns true for every other product.
|
java.lang.String |
createEncodedProductIdFromProductQuantityEncodedKey(int productId,
java.lang.String productQuantityEncodedKey)
Takes in a productQuantityEncodedKey and a productId and returns an encoded product Id.
|
OptionIf[] |
createOptionsFromProductQuantityEncodedKey(java.lang.String encodedKey)
Receives an encoded key from the products_quantity table in the format 3{4}4{6} and creates
an array of Option objects.
|
ProductQuantity |
createProductQuantityEncodedKeyFromEncodedProductId(java.lang.String encodedProductId)
Takes in an encodedProductId and returns an encoded key for the products_quantity table
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. |
java.lang.String |
createProductQuantityEncodedKeyFromOptions(OptionIf[] opts)
Takes in an an array of options and returns an encoded key for the products_quantity table
The format of the encoded key for the products_quantity table 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. |
protected int |
decProductQuantitiesWithOptions(int productId,
int quantitySold,
boolean setProductStatus,
boolean onlyOrdered,
FetchProductOptionsIf options)
An internal method to avoid code duplication.
|
protected void |
deleteDigitalDownload(DigitalDownload dd)
Deletes the digital download passed in as a parameter
|
protected boolean |
doesExtQuantityExist(int productId,
java.lang.String encodedOptionValues,
java.lang.String catalogId,
KKCriteria selectC)
Returns true if the external quantity record exists
|
boolean |
doesProductExist(int productId)
Figure out whether a product exists
|
protected boolean |
doTierPricesExist()
Returns true if at least one TierPrice record exists in the database.
|
void |
editDigitalDownload(DigitalDownloadIf digitalDownload)
Edits the digital download object
|
void |
editDigitalDownload(java.lang.String sessionId,
DigitalDownloadIf digitalDownload)
Edits the digital download object
|
protected void |
editExtQuantity(int productId,
java.lang.String encodedOptionValues,
int quantity,
java.lang.String catalogId,
KKCriteria selectC,
KKCriteria updateC)
Used to edit a quantity in the external quantity table.
|
protected boolean |
fetchDescriptionsSeparately()
This can be specialized to modify the way the product descriptions are queried or the
configuration variable can be set to the value you require to be returned here.
|
Address[] |
getAddressesPerProduct(int productId)
Returns all of the addresses for the given product.
|
ProductRelationship[] |
getAllProductRelationships()
Returns all product relationships in a single call.
|
Products |
getAllProducts(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int languageId)
Returns all products
|
Products |
getAllProductsWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int languageId,
FetchProductOptionsIf options)
Returns all products.
|
Products |
getAllSpecials(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int languageId)
Returns all special priced products
|
Product[] |
getAlsoPurchased(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int productId,
int languageId)
Find products that were in the same order as orders containing the product referenced by
productId.
|
Product[] |
getAlsoPurchasedWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int productId,
int languageId,
FetchProductOptionsIf options)
Find products that were in the same order as orders containing the product referenced by
productId.
|
Product[] |
getBestSellers(DataDescriptorIf dataDesc,
int categoryId,
int languageId)
Calls getBestSellersWithOptions
|
Product[] |
getBestSellersWithOptions(DataDescriptorIf dataDesc,
int categoryId,
int languageId,
FetchProductOptionsIf options)
Returns an array of bestseller products for the category and its children.
|
protected ProductQuantityIf |
getBundleProductQuantityWithOptions(Product product,
FetchProductOptionsIf options)
Get the quantity and date available of a bundle product.
|
Products |
getBundlesThatProductBelongsTo(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int productId,
int languageId,
FetchProductOptionsIf options)
The method fetches an array of bundles (products of type bundle), all of which contain the
product with id
productId as one of the bundled products. |
Products |
getBundlesThatProductsBelongTo(java.lang.String sessionId,
DataDescriptorIf dataDescriptor,
int[] productIds,
boolean exactMatch,
int languageId,
FetchProductOptionsIf options)
The method fetches an array of bundles (products of type bundle), all of which contain the
product ids
productIds as one or more of the bundled products. |
Catalog |
getCatalogPerKey(java.lang.String catalogKey)
Returns a catalog object for the catalog key.
|
protected int |
getCount(java.lang.String sessionId,
java.lang.String apiCall,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
KKCriteria criteria,
boolean fixQuery,
boolean tagCount,
boolean multiStoreSearch,
int languageId,
FetchProductOptionsIf options)
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
|
ProdCustAttr[] |
getCustomAttrsFromXML(java.lang.String xml)
Create an array of custom attributes from the XML
|
protected DigitalDownload |
getDigitalDownload(int customerId,
int productId)
Returns a Digital Download object for the customerId and productId passed in as parameters.
|
DigitalDownload |
getDigitalDownloadById(int digitalDownloadId)
Returns a Digital Download object for the digital download id.
|
DigitalDownload |
getDigitalDownloadById(java.lang.String sessionId,
int digitalDownloadId)
Returns a Digital Download object for the digital download id.
|
DigitalDownload[] |
getDigitalDownloads(java.lang.String sessionId)
Returns an array of Digital Download objects for the customer identified by the sessionId
parameter.
|
DigitalDownload[] |
getDigitalDownloadsWithOptions(java.lang.String sessionId,
int languageId,
FetchDigitalDownloadOptionsIf ddOptions,
FetchProductOptionsIf prodOptions)
Returns an array of Digital Download objects for the customer identified by the sessionId
parameter.
|
protected java.util.Date |
getExpiryDate(int maxDownloadDays)
Common code to get the expiry date
|
protected java.util.Date |
getLastAddedDateFromTagToProduct()
Get the last date added for a tag to product record
|
protected Product |
getLightProduct(int productId)
Fetches a very "light" product with few attributes
|
protected int |
getMaxDownloadDays(Product prod)
Common code to get the maximum number of download days
|
protected int |
getMaxNumDownloads(Product prod)
Common code to get the maximum number of downloads
|
Option |
getOption(int productId,
int optionId,
int optionValueId,
int priceId,
int languageId,
FetchProductOptionsIf options)
Finds a single Option object for the parameters passed in by reading from the
product_attributes, product_options and product_options_values tables.
|
Product[] |
getOrderHistory(DataDescriptorIf dataDesc,
java.lang.String sessionId,
int languageId)
Get a list of the products ordered by the customer referenced by the sessionId.
|
Product[] |
getOrderHistoryWithOptions(DataDescriptorIf dataDesc,
java.lang.String sessionId,
int languageId,
FetchProductOptionsIf options)
Get a list of the products ordered by the customer referenced by the sessionId.
|
int |
getPaymentScheduleId(int productId)
A utility method to return just the Payment Schedule Id from a product to determine whether
it requires recurring billing.
|
int |
getPriceId(Customer customer)
Get the priceId from the customer
|
Product |
getProduct(int customerId,
int productId,
int languageId)
Fetches a fully populated product object for a customer referenced by customerId.
|
Product |
getProduct(java.lang.String sessionId,
int productId,
int languageId)
Fetches a fully populated product object.
|
protected void |
getProductCountForTag(TagIf tag)
Get the number of products for a tag and add the number to the tag object
|
ProductImages |
getProductImages(ProductImagesOptionsIf options)
Get the image file names associated with the product whose id is specified.
|
protected java.util.HashMap<java.lang.String,Option> |
getProductOptions(KKCriteria criteria,
Product prod,
int priceId,
int langId,
FetchProductOptionsIf options)
Common code for setting the product options of a product.
|
Product |
getProductPerSku(java.lang.String sessionId,
java.lang.String sku,
int languageId)
Get a product from its SKU.
|
Product |
getProductPerSkuWithOptions(java.lang.String sessionId,
java.lang.String sku,
int languageId,
FetchProductOptionsIf options)
Get a product from its SKU.
|
protected ProductQuantityIf[] |
getProductQuantitiesPerProductWithOptions(int productId,
FetchProductOptionsIf options,
java.util.HashMap<java.lang.String,Option> optionMap)
Return all of the product quantities associated with a product
|
ProductQuantityIf |
getProductQuantity(java.lang.String encodedProductId)
The stock level of the product is returned.
|
protected ProductQuantityIf |
getProductQuantityPerProductWithOptions(int productId,
java.lang.String encodedOptionValues,
FetchProductOptionsIf options)
Return all of the product quantities associated with a product
|
protected ProductQuantityIf |
getProductQuantityWithOptions(int productId,
FetchProductOptionsIf options)
The stock level and available date of the product is returned assuming it has no attributes.
|
ProductQuantityIf |
getProductQuantityWithOptions(java.lang.String encodedProductId,
FetchProductOptionsIf options)
The stock level of the product is returned.
|
int |
getProductReorderLevel(int productId)
Return the re-order level of the product.
|
protected Products |
getProductsAllCases(java.lang.String apiCall,
java.lang.String sessionId,
DataDescriptorIf dataDesc,
int categoryId,
int languageId,
int manufacturerId,
FetchProductOptionsIf options)
This protected method gets called by various flavours of public methods to get an array of
products with differing criteria.
|
Product[] |
getProductsFromIds(java.lang.String sessionId,
java.util.ArrayList<java.lang.Integer> prodIdList,
int languageId)
Returns an array of products referenced by the ids in prodIdList.
|
Product[] |
getProductsFromIdsWithOptions(java.lang.String sessionId,
java.util.ArrayList<java.lang.Integer> prodIdList,
int languageId,
FetchProductOptionsIf options)
Returns an array of products referenced by the ids in prodIdList.
|
Product[] |
getProductsFromIdsWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int[] prodIdArray,
int languageId,
FetchProductOptionsIf options)
Returns an array of products referenced by the ids in prodIdArray.
|
Products |
getProductsPerCategory(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int categoryId,
boolean searchInSubCats,
int languageId)
Returns the products for a category
|
Products |
getProductsPerCategoryPerManufacturer(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int categoryId,
int manufacturerId,
int languageId)
Returns the products for a category and a manufacturer
|
Products |
getProductsPerCategoryPerManufacturerWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int categoryId,
int manufacturerId,
int languageId,
FetchProductOptionsIf options)
Returns the products for a category and a manufacturer.
|
Products |
getProductsPerCategoryWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int categoryId,
boolean searchInSubCats,
int languageId,
FetchProductOptionsIf options)
Returns the products for a category.An options object is passed in to customize from where
some of the product attributes (such as price and quantity) are fetched from.
|
Products |
getProductsPerManufacturer(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int manufacturerId,
int languageId)
Returns the products for a manufacturer
|
Products |
getProductsPerManufacturerWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int manufacturerId,
int languageId,
FetchProductOptionsIf options)
Returns the products for a manufacturer.An options object is passed in to customize from
where some of the product attributes (such as price and quantity) are fetched from.
|
protected int |
getProductType(int productId)
Return the product type
|
int |
getProductViewCountMaxRetries() |
protected Product |
getProductWithOptions(int productId,
Customer cust,
int languageId,
FetchProductOptionsIf options) |
Product |
getProductWithOptions(int customerId,
int productId,
int languageId,
FetchProductOptionsIf options)
Fetches a fully populated product object for a customer referenced by customerId.
|
protected Product |
getProductWithOptions(int productId,
java.lang.String catalogId,
int priceId,
int langId,
FetchProductOptionsIf options) |
Product |
getProductWithOptions(java.lang.String sessionId,
int productId,
int languageId,
FetchProductOptionsIf options)
Fetches a fully populated product object.
|
Products |
getRelatedProducts(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int productId,
int relationType,
int languageId)
Find products related to the product defined by the productId parameter.
|
protected Products |
getRelatedProducts(java.lang.String sessionId,
DataDescriptorIf dataDescriptor,
int productId,
int relationType,
int languageId,
java.util.HashMap<java.lang.String,Product> bundleProductMap,
int loopInput,
int quantity,
FetchProductOptionsIf options)
A protected version of getRelatedProducts with a hash map passed in for recursion
|
Products |
getRelatedProductsWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int productId,
int relationType,
int languageId,
FetchProductOptionsIf options)
Find products related to the product defined by the productId parameter.
|
protected java.lang.String |
getSku(int productId)
Gets the SKU for a product directly from the product table.
|
java.lang.String |
getSku(OrderProductIf orderProd)
This method is deprecated since release 4.0.0.0 because an SKU attribute was added to the
OrderProduct.
|
Products |
getSpecialsPerCategory(java.lang.String sessionId,
DataDescriptorIf dataDescriptor,
int categoryId,
boolean searchInSubCats,
int languageId)
Returns all special priced products for a category
|
TagIf |
getTag(int tagId,
boolean getProdCount,
int languageId)
Returns a Tag object for the id passed in as a parameter.
|
TagGroupIf |
getTagGroup(int tagGroupId,
boolean getProdCount,
int languageId)
Returns a TagGroup object for the id passed in as a parameter.
|
TagGroup[] |
getTagGroupsPerCategory(int categoryId,
boolean getProdCount,
int languageId)
Return an array of TagGroup objects for a category.
|
TagGroup[] |
getTagGroupsPerCategoryWithOptions(int categoryId,
int languageId,
FetchTagGroupOptionsIf options)
Return an array of TagGroup objects for a category.
|
TagIf[] |
getTagsPerCategory(int categoryId,
boolean getProdCount,
int languageId)
Return an array of Tag objects for a category.
|
protected Tag[] |
getTagsPerProduct(int productId,
int langId)
Get the tags for a product.
|
protected TagIf[] |
getTagsPerTagGroup(int tagGroupId,
boolean getProdCount,
int languageId)
Returns an array of Tags for a TagGroup
|
protected int |
getTagToProductCount()
Get the number of records in the tag to product table
|
int |
getTaxClassId(int productId)
Returns the tax class id for a product
|
protected TierPrice[] |
getTierPrices(Product prod,
int productPriceId,
FetchProductOptionsIf options)
Return the An array of TierPrice objects (or null) for the product referenced by productId
|
protected VariantPriceIf[] |
getVariantPrices(Product prod,
int productPriceId,
FetchProductOptionsIf options)
Return the An array of VariantPrice objects (or null) for the product referenced by productId
|
protected VariantPriceIf[] |
getVariantPricesPerProductWithOptions(int productId,
FetchProductOptionsIf options,
java.util.HashMap<java.lang.String,Option> optionMap)
Return all of the variant prices associated with a product
|
java.lang.String |
getXMLFromCustomAttrs(ProdCustAttrIf[] attrDescArray)
Create an XML structure for the custom attributes
|
int |
insertDigitalDownload(int customerId,
int productId)
Create and insert a digital download record for the product identified by the productId and
the customer identified by the customerId.
|
int |
insertDigitalDownload(java.lang.String sessionId,
int productId)
Create and insert a digital download record for the product identified by the productId and
the customer identified by the sessionId.
|
protected void |
insertExtQuantity(int productId,
java.lang.String encodedOptionValues,
int quantity,
java.lang.String catalogId,
KKCriteria insertC)
Used to insert a quantity in the external quantity 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.
|
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(DataDescriptorIf dataDesc,
org.apache.torque.util.Criteria c,
java.lang.String price)
Provides common code to deal with the management of the DataDescriptor.
|
protected void |
manageDataDescriptor(DataDescriptorIf dataDesc,
org.apache.torque.util.Criteria c,
java.lang.String price,
boolean addConstraints)
Provides common code to deal with the management of the DataDescriptor.
|
void |
refreshConfigs()
Refresh the configuration of the product manager
|
int |
removeStockReservationsForBasketItems(int customerId,
BasketIf[] basketItems,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
int |
removeStockReservationsForBasketItems(java.lang.String sessionId,
BasketIf[] basketItems,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
int |
removeStockReservationsForIds(int customerId,
int[] idArray,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
int |
removeStockReservationsForIds(java.lang.String sessionId,
int[] idArray,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
int |
removeStockReservationsForOrderProducts(int customerId,
OrderProductIf[] orderProducts,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
int |
removeStockReservationsForOrderProducts(java.lang.String sessionId,
OrderProductIf[] orderProducts,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
Basket[] |
reserveStock(java.lang.String sessionId,
BasketIf[] basketItems,
StockReservationOptionsIf stockReservationOptions)
The purpose of this API call is to reserve stock in order to give a customer enough time to
checkout without risking that the products being ordered become unavailable while checking
out.
|
Products |
searchForProducts(java.lang.String sessionId,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
int languageId)
Returns products matching the search criteria.
|
protected Products |
searchForProductsPrivate(KKCriteria criteria,
java.lang.String apiCall,
java.lang.String sessionId,
DataDescriptorIf dataDescriptor,
ProductSearchIf productSearch,
java.util.ArrayList<java.lang.Integer> productIdList,
int languageId,
FetchProductOptionsIf options)
Returns products matching the search criteria in the format defined by the data descriptor.
|
Products |
searchForProductsWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
int languageId,
FetchProductOptionsIf options)
Returns products matching the search criteria.
|
protected int |
selectActiveProduct(java.lang.String sessionId,
java.util.ArrayList<java.lang.Integer> productIdList,
int languageId,
FetchProductOptionsIf options)
For the case when multiple products exist for the same SKU, we give priority to products not
disabled and not invisible
|
protected java.util.List<com.workingdogs.village.Record> |
sendQuery(java.lang.String sessionId,
java.lang.String apiCall,
KKCriteria crit,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
int languageId,
boolean fixQuery,
FetchProductOptionsIf options)
Common code to send a query string
|
protected void |
setBundledProducts(ProductIf currentParent,
java.util.ArrayList<ProductIf> childProdList)
Private method to avoid duplicating code
|
protected void |
setCriteriaWithStandardAttributes(KKCriteria c,
int languageId,
boolean manuOuterJoin,
boolean multiStoreSearch,
FetchProductOptionsIf options,
DataDescriptorIf dd,
boolean singleProduct,
ProductSearchIf prodSearch)
Initializes the criteria with the standard attributes for the product.
|
protected void |
setCriteriaWithStandardAttributes(KKCriteria c,
int languageId,
FetchProductOptionsIf options,
boolean singleProduct)
Initializes the criteria with the standard attributes for the product.
|
protected void |
setDigitalDownloadCriteria(KKCriteria c)
Sets the criteria with the standard attributes so as not to have to repeat this code many
times.
|
protected void |
setExtPriceProductAttributeCriteria(KKCriteria c,
int productId,
FetchProductOptionsIf options)
Add criteria for getting the prices from another table based on the catalog id .
|
protected void |
setExtPriceProductCriteria(KKCriteria c,
FetchProductOptionsIf options)
Add criteria for getting the prices from another table based on the catalog id .
|
protected void |
setExtPricesVariantPriceCriteria(KKCriteria c,
int productId,
FetchProductOptionsIf options)
Add criteria for getting the variant prices from another table based on the catalog id .
|
void |
setExtPriceTierPriceCriteria(KKCriteria c,
int prodId,
FetchProductOptionsIf options)
Add criteria for getting the tier prices from another table based on the catalog id .
|
protected void |
setExtQuantityProductCriteria(KKCriteria c,
FetchProductOptionsIf options)
Add criteria for getting the product quantity from another table based on the catalog id .
|
protected void |
setExtQuantityProductQuantityCriteria(KKCriteria c,
int productId,
FetchProductOptionsIf options)
Add criteria for getting the product quantity from another table based on the catalog id .
|
protected void |
setOptionPrice(Option opt,
Product prod,
int productId,
int productPriceId)
Edit the product option to use the correct price based on the product price Id
|
protected void |
setProductPrice(Product prod,
int productPriceId)
Edit the product to use the correct price based on the product price Id
|
protected void |
setProductsSharedCriteria(KKCriteria c,
boolean getPriceId,
FetchProductOptionsIf options)
Add criteria to get shared products from the database
|
void |
setProductViewCountMaxRetries(int productViewCountMaxRetries)
The maximum number of optimistic concurrency retries when setting the product viewed count
|
protected void |
setStockReservationCriteriaOnProduct(KKCriteria c,
FetchProductOptionsIf options)
Add criteria for getting stock reservation information .
|
protected void |
setStockReservationCriteriaOnProductQuantity(KKCriteria c,
int productId,
FetchProductOptionsIf options)
Add criteria for getting stock reservation information .
|
protected void |
setTagCriteriaWithStandardAttributes(KKCriteria c,
int languageId)
Set the Criteria attribute with standard attributes for a Tag object
|
protected void |
setTagGroupCriteriaWithStandardAttributes(KKCriteria c,
int languageId)
Set the Criteria attribute with standard attributes for a TagGroup object
|
protected void |
synchronizeTagProductCount()
We save the product count for each tag, in a hash table.
|
protected void |
updateBundleProductQuantityWithOptions(int productId,
int quantitySold,
boolean setStatus,
FetchProductOptionsIf options)
Updates the quantities for a bundle product.
|
int |
updateDigitalDownloadCount(java.lang.String sessionId,
int productId)
Updates the count of the Digital Download that defines how many times it has been downloaded.
|
int |
updateDigitalDownloadCountById(java.lang.String sessionId,
int digitalDownloadId)
Updates the count of the Digital Download (identified by id) that defines how many times it
has been downloaded.
|
int |
updateProductLockItems(java.lang.String productId,
java.lang.String shopIds)
Lockes a Product for all shops in the ;-separated
shopIds |
int |
updateProductNotLockedItems(java.lang.String[] productIds)
Resets all Locked Products which are not in the List
productIds |
int |
updateProductQuantity(int productId,
OptionIf[] opts,
int quantitySold,
boolean setStatus)
The product quantity is updated by subtracting quantitySold from the current quantity.
|
int |
updateProductQuantity(int productId,
OptionIf[] opts,
java.lang.String encodedOptions,
int quantitySold,
boolean setStatus)
The product quantity is updated by subtracting quantitySold from the current quantity.
|
int |
updateProductQuantityWithOptions(int productId,
OptionIf[] opts,
java.lang.String encodedOptions,
int quantitySold,
boolean setStatus,
FetchProductOptionsIf options)
The product quantity is updated by subtracting quantitySold from the current quantity.
|
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. |
void |
updateProductsOrdered(OrderIf order)
Update the products ordered count for the products sold in an order
|
void |
updateProductViewedCount(int productId,
int languageId)
Increments the viewed count for the product.
|
protected boolean |
useSpecialPrice()
This can be specialized to return false if special prices aren't used.
|
protected Product |
validateDigitalDownload(int productId)
Validate the digital download productId
|
acquireLock, addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkRequired, escapeHTML, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCacheMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getEventMgr, getExportMgr, getHTMLEscaper, getKonaKartConfig, getKonaKartConfig, getKonaKartConfig, getLangMgr, getManuMgr, getMiscItemMgr, getMiscPriceMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderIntegrationMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getProductsToCategoresCriteria, getPromMgr, getPunchOutMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getStoreTime, getSuggestionMgr, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isClassPresent, isCommunity, isDeadlockException, isEnterprise, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreSharedDb, isMultiStoreShareProducts, isMultiVendor, isUnix, manageThrowable, releaseLock, updateStaticVariablesNowprotected static org.apache.commons.logging.Log log
public static final int DONT_INCLUDE
public static final int ALL_RELATIONSHIPS
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_PRODUCT_RELATIONSHIP
public static final int CUSTOM_RELATIONSHIP_1
public static final int CUSTOM_RELATIONSHIP_2
public static final int CUSTOM_RELATIONSHIP_3
public static final int CUSTOM_RELATIONSHIP_4
public static final int CUSTOM_RELATIONSHIP_5
public static final int PHYSICAL_PRODUCT
public static final int DIGITAL_DOWNLOAD
public static final int FREE_SHIPPING
public static final int BUNDLE_PRODUCT_TYPE
public static final int FREE_SHIPPING_BUNDLE_PRODUCT_TYPE
public static final int GIFT_CERTIFICATE_PRODUCT_TYPE
public static final int BOOKABLE_PRODUCT_TYPE
public static final int VIRTUAL_PRODUCT_TYPE
protected static java.util.Map<java.lang.String,ProductMgr.StaticData> staticDataHM
public static java.lang.Boolean customAttrAnOracleCLOB
protected static int productViewCountMaxRetries
protected static java.lang.String updateStockMutex
protected static java.lang.String reserveStockMutex
protected static java.lang.String prodViewMutex
protected static java.lang.String tagMutex
protected static java.lang.String prodMgrMutex
public ProductMgr(KKEngIf eng) throws java.lang.Exception
eng - the engjava.lang.Exception - an unexpected exceptionpublic Products getProductsPerCategory(java.lang.String sessionId, DataDescriptorIf dataDesc, int categoryId, boolean searchInSubCats, int languageId) throws java.lang.Exception
ProductMgrIfgetProductsPerCategory in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDesccategoryId - the categoryIdsearchInSubCats - the searchInSubCatslanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Products getProductsPerCategoryWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int categoryId, boolean searchInSubCats, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
ProductMgrIfgetProductsPerCategoryWithOptions in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDesccategoryId - the categoryIdsearchInSubCats - the searchInSubCatslanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic Products getProductsPerCategoryPerManufacturer(java.lang.String sessionId, DataDescriptorIf dataDesc, int categoryId, int manufacturerId, int languageId) throws java.lang.Exception
ProductMgrIfgetProductsPerCategoryPerManufacturer in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDesccategoryId - the categoryIdmanufacturerId - the manufacturerIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Products getProductsPerCategoryPerManufacturerWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int categoryId, int manufacturerId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
ProductMgrIfgetProductsPerCategoryPerManufacturerWithOptions in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDesccategoryId - the categoryIdmanufacturerId - the manufacturerIdlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic Products getAllProducts(java.lang.String sessionId, DataDescriptorIf dataDesc, int languageId) throws java.lang.Exception
ProductMgrIfgetAllProducts in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDesclanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Products getAllProductsWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
ProductMgrIfgetAllProductsWithOptions in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDesclanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic Products getProductsPerManufacturer(java.lang.String sessionId, DataDescriptorIf dataDesc, int manufacturerId, int languageId) throws java.lang.Exception
ProductMgrIfgetProductsPerManufacturer in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDescmanufacturerId - the manufacturerIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Products getProductsPerManufacturerWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int manufacturerId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
ProductMgrIfgetProductsPerManufacturerWithOptions in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDescmanufacturerId - the manufacturerIdlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected Products getProductsAllCases(java.lang.String apiCall, java.lang.String sessionId, DataDescriptorIf dataDesc, int categoryId, int languageId, int manufacturerId, FetchProductOptionsIf options) throws java.lang.Exception
apiCall - the apiCallsessionId - the sessionIddataDesc - the dataDesccategoryId - the categoryIdlanguageId - the languageIdmanufacturerId - the manufacturerIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic int getTaxClassId(int productId)
throws org.apache.torque.TorqueException,
com.konakart.app.KKException,
com.workingdogs.village.DataSetException
ProductMgrIfgetTaxClassId in interface ProductMgrIfproductId - the productIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptioncom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)public Product getProduct(java.lang.String sessionId, int productId, int languageId) throws java.lang.Exception
ProductMgrIfgetProduct in interface ProductMgrIfsessionId - the sessionIdproductId - the productIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Product getProductWithOptions(java.lang.String sessionId, int productId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
ProductMgrIfgetProductWithOptions in interface ProductMgrIfsessionId - the sessionIdproductId - the productIdlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic Product getProduct(int customerId, int productId, int languageId) throws java.lang.Exception
ProductMgrIfgetProduct in interface ProductMgrIfcustomerId - the customerIdproductId - the productIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Product getProductWithOptions(int customerId, int productId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
ProductMgrIfgetProductWithOptions in interface ProductMgrIfcustomerId - the customerIdproductId - the productIdlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected Product getProductWithOptions(int productId, Customer cust, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
productId - the productIdcust - the custlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected Product getProductWithOptions(int productId, java.lang.String catalogId, int priceId, int langId, FetchProductOptionsIf options) throws java.lang.Exception
productId - the productIdcatalogId - the catalogIdpriceId - the priceIdlangId - the langIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected java.util.HashMap<java.lang.String,Option> getProductOptions(KKCriteria criteria, Product prod, int priceId, int langId, FetchProductOptionsIf options) throws java.lang.Exception
criteria - the criteriaprod - the prodpriceId - the priceIdlangId - the langIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected Tag[] getTagsPerProduct(int productId, int langId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, com.konakart.app.KKException
productId - the productIdlangId - the langIdcom.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)com.konakart.app.KKException - an unexpected KKException exceptionpublic void updateProductViewedCount(int productId,
int languageId)
throws java.lang.Exception
ProductMgrIfupdateProductViewedCount in interface ProductMgrIfproductId - the productIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Products getAllSpecials(java.lang.String sessionId, DataDescriptorIf dataDesc, int languageId) throws java.lang.Exception
ProductMgrIfgetAllSpecials in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDesclanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Products getSpecialsPerCategory(java.lang.String sessionId, DataDescriptorIf dataDescriptor, int categoryId, boolean searchInSubCats, int languageId) throws java.lang.Exception
ProductMgrIfgetSpecialsPerCategory in interface ProductMgrIfsessionId - the sessionIddataDescriptor - the dataDescriptorcategoryId - the categoryIdsearchInSubCats - the searchInSubCatslanguageId - the languageIdjava.lang.Exception - an unexpected exceptionprotected void addTax(Customer cust, Products products, Product[] productArray) throws java.lang.Exception
cust - the custproductArray - the productArrayproducts - the productsjava.lang.Exception - an unexpected exceptionprotected void addTax(Customer cust, Product product) throws java.lang.Exception
cust - the custproduct - the productjava.lang.Exception - an unexpected exceptionpublic Product[] getProductsFromIds(java.lang.String sessionId, java.util.ArrayList<java.lang.Integer> prodIdList, int languageId) throws java.lang.Exception
getProductsFromIds in interface ProductMgrIfsessionId - the sessionIdprodIdList - the prodIdListlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Product[] getProductsFromIdsWithOptions(java.lang.String sessionId, java.util.ArrayList<java.lang.Integer> prodIdList, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
getProductsFromIdsWithOptions in interface ProductMgrIfsessionId - the sessionIdprodIdList - the prodIdListlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic Product[] getProductsFromIdsWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int[] prodIdArray, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
getProductsFromIdsWithOptions in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDescprodIdArray - the prodIdArraylanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic Products searchForProducts(java.lang.String sessionId, DataDescriptorIf dataDesc, ProductSearchIf prodSearch, int languageId) throws java.lang.Exception
ProductMgrIfsearchForProducts in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDescprodSearch - the prodSearchlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Products searchForProductsWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, ProductSearchIf prodSearch, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
ProductMgrIfsearchForProductsWithOptions in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDescprodSearch - the prodSearchlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected boolean useSpecialPrice()
protected boolean fetchDescriptionsSeparately()
throws com.konakart.app.KKException
com.konakart.app.KKException - an unexpected KKException exceptionprotected Products searchForProductsPrivate(KKCriteria criteria, java.lang.String apiCall, java.lang.String sessionId, DataDescriptorIf dataDescriptor, ProductSearchIf productSearch, java.util.ArrayList<java.lang.Integer> productIdList, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
criteria - the criteriaapiCall - the apiCallsessionId - the sessionIddataDescriptor - the dataDescriptorproductSearch - the productSearchproductIdList - If not null, it must contain a list of productIds which will be added to an IN
clause.languageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected java.lang.String getCustomAttrs(int productId)
throws java.lang.Exception
productId - the productIdjava.lang.Exception - an unexpected exceptionprotected boolean doTierPricesExist()
throws java.lang.Exception
java.lang.Exception - an unexpected exceptionprotected TierPrice[] getTierPrices(Product prod, int productPriceId, FetchProductOptionsIf options) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException
prod - the prodproductPriceId - the productPriceIdoptions - the optionsorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptioncom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)protected void setCriteriaWithStandardAttributes(KKCriteria c, int languageId, FetchProductOptionsIf options, boolean singleProduct) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException, java.lang.Exception
c - the clanguageId - the languageIdoptions - the optionssingleProduct - the singleProductjava.lang.Exception - an unexpected exceptioncom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)protected void setCriteriaWithStandardAttributes(KKCriteria c, int languageId, boolean manuOuterJoin, boolean multiStoreSearch, FetchProductOptionsIf options, DataDescriptorIf dd, boolean singleProduct, ProductSearchIf prodSearch) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException, java.lang.Exception
c - the clanguageId - the languageIdmanuOuterJoin - the manuOuterJoinmultiStoreSearch - the multiStoreSearchoptions - the optionsdd - the ddsingleProduct - the singleProductprodSearch - the product search objectjava.lang.Exception - an unexpected exceptioncom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)protected void setProductsSharedCriteria(KKCriteria c, boolean getPriceId, FetchProductOptionsIf options) throws com.konakart.app.KKException
c - the cgetPriceId - the getPriceIdoptions - the optionscom.konakart.app.KKException - an unexpected KKException exceptionprotected void manageDataDescriptor(DataDescriptorIf dataDesc, org.apache.torque.util.Criteria c, java.lang.String price)
manageDataDescriptor(DataDescriptorIf dataDesc, Criteria c, String price, boolean addConstraints)
with addConstraints set to true.dataDesc - the dataDescc - the cprice - the priceprotected void manageDataDescriptor(DataDescriptorIf dataDesc, org.apache.torque.util.Criteria c, java.lang.String price, boolean addConstraints)
dataDesc - the dataDescc - the cprice - the priceaddConstraints - If set to true, the custom field constraints are added.protected int getCount(java.lang.String sessionId,
java.lang.String apiCall,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
KKCriteria criteria,
boolean fixQuery,
boolean tagCount,
boolean multiStoreSearch,
int languageId,
FetchProductOptionsIf options)
throws java.lang.Exception
sessionId - the sessionIdapiCall - the apiCalldataDesc - the dataDescprodSearch - the prodSearchcriteria - the criteriafixQuery - the fixQuerytagCount - the tagCountmultiStoreSearch - the multiStoreSearchlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic Option getOption(int productId, int optionId, int optionValueId, int priceId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
getOption in interface ProductMgrIfproductId - the productIdoptionId - the optionIdoptionValueId - the optionValueIdpriceId - the priceIdlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic Product[] getBestSellersWithOptions(DataDescriptorIf dataDesc, int categoryId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
getBestSellersWithOptions in interface ProductMgrIfdataDesc - the dataDesccategoryId - the categoryIdlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected void addProductDescriptions(Product[] prods, int langId, boolean multiStoreSearch) throws java.lang.Exception
prods - the prodslangId - the langIdmultiStoreSearch - the multiStoreSearchjava.lang.Exception - an unexpected exceptionpublic Product[] getBestSellers(DataDescriptorIf dataDesc, int categoryId, int languageId) throws java.lang.Exception
getBestSellers in interface ProductMgrIfdataDesc - the dataDesccategoryId - the categoryIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Product[] getOrderHistoryWithOptions(DataDescriptorIf dataDesc, java.lang.String sessionId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
getOrderHistoryWithOptions in interface ProductMgrIfdataDesc - the dataDescsessionId - the sessionIdlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic Product[] getOrderHistory(DataDescriptorIf dataDesc, java.lang.String sessionId, int languageId) throws java.lang.Exception
ProductMgrIfgetOrderHistory in interface ProductMgrIfdataDesc - the dataDescsessionId - the sessionIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Product[] getAlsoPurchasedWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int productId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
getAlsoPurchasedWithOptions in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDescproductId - the productIdlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic Product[] getAlsoPurchased(java.lang.String sessionId, DataDescriptorIf dataDesc, int productId, int languageId) throws java.lang.Exception
ProductMgrIfgetAlsoPurchased in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDescproductId - the productIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Products getBundlesThatProductBelongsTo(java.lang.String sessionId, DataDescriptorIf dataDesc, int productId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
productId as one of the bundled products. Each of the returned
products has the bundledProducts attribute populated with all of the bundled
products. The quantity attribute of each bundled product determines the number
of instances of the product within the bundle and the encodedOptionValues
attribute of each bundled product contains a string with the encoded option values
determining the configuration of the product (e.g size, color etc.).getBundlesThatProductBelongsTo in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDescproductId - the productIdlanguageId - the languageIdoptions - the optionsbundledProducts attribute containing the products within the bundle.java.lang.Exception - an unexpected exceptionpublic Products getBundlesThatProductsBelongTo(java.lang.String sessionId, DataDescriptorIf dataDescriptor, int[] productIds, boolean exactMatch, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
productIds as one or more of the bundled products. Each of the
returned products has the bundledProducts attribute populated with all of the
bundled products. The quantity attribute of each bundled product determines the
number of instances of the product within the bundle and the encodedOptionValues
attribute of each bundled product contains a string with the encoded option values
determining the configuration of the product (e.g size, color etc.).getBundlesThatProductsBelongTo in interface ProductMgrIfsessionId - the sessionIddataDescriptor - the dataDescriptorproductIds - the productIdsexactMatch - determines whether the call should return only bundles which contain exactly the
products sent in the array of product IDs, or return all the bundles which contain
at least all the products in the passed product IDs.languageId - the languageIdoptions - the optionsbundledProducts attribute containing the products within the bundle.java.lang.Exception - an unexpected exceptionprotected void setBundledProducts(ProductIf currentParent, java.util.ArrayList<ProductIf> childProdList)
currentParent - the currentParentchildProdList - the childProdListpublic Products getRelatedProducts(java.lang.String sessionId, DataDescriptorIf dataDesc, int productId, int relationType, int languageId) throws java.lang.Exception
getRelatedProducts in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDescproductId - the productIdrelationType - the relationTypelanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Products getRelatedProductsWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int productId, int relationType, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
ProductMgrIfgetRelatedProductsWithOptions in interface ProductMgrIfsessionId - the sessionIddataDesc - the dataDescproductId - the productIdrelationType - the relationTypelanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected Products getRelatedProducts(java.lang.String sessionId, DataDescriptorIf dataDescriptor, int productId, int relationType, int languageId, java.util.HashMap<java.lang.String,Product> bundleProductMap, int loopInput, int quantity, FetchProductOptionsIf options) throws java.lang.Exception
sessionId - the sessionIddataDescriptor - the dataDescriptorproductId - the productIdrelationType - the relationTypelanguageId - the languageIdbundleProductMap - HashMap used to keep track of products during recursion.loopInput - 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.options - the optionsjava.lang.Exception - an unexpected exceptionpublic ProductRelationship[] getAllProductRelationships() throws java.lang.Exception
getAllProductRelationships in interface ProductMgrIfjava.lang.Exception - an unexpected exceptionpublic java.lang.String getSku(OrderProductIf orderProd) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getSku in interface ProductMgrIforderProd - the orderProdcom.konakart.app.KKException - an unexpected KKException 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)protected java.lang.String getSku(int productId)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
com.konakart.app.KKException
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)com.konakart.app.KKException - an unexpected KKException exceptionpublic int updateProductQuantity(int productId,
OptionIf[] opts,
int quantitySold,
boolean setStatus)
throws java.lang.Exception
updateProductQuantity in interface ProductMgrIfproductId - the productIdopts - the optsquantitySold - the quantitySoldsetStatus - the setStatusjava.lang.Exception - an unexpected exceptionpublic int updateProductQuantity(int productId,
OptionIf[] opts,
java.lang.String encodedOptions,
int quantitySold,
boolean setStatus)
throws java.lang.Exception
This method either uses opts or encodedOptions depending on which one isn't set to null.
updateProductQuantity in interface ProductMgrIfproductId - the productIdopts - the optsencodedOptions - the encodedOptionsquantitySold - the quantitySoldsetStatus - the setStatusjava.lang.Exception - an unexpected exceptionpublic int updateProductQuantityWithOptions(int productId,
OptionIf[] opts,
java.lang.String encodedOptions,
int quantitySold,
boolean setStatus,
FetchProductOptionsIf options)
throws java.lang.Exception
This method either uses opts or encodedOptions depending on which one isn't set to null.
updateProductQuantityWithOptions in interface ProductMgrIfproductId - the productIdopts - the optsencodedOptions - the encodedOptionsquantitySold - the quantitySoldsetStatus - the setStatusoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected void updateBundleProductQuantityWithOptions(int productId,
int quantitySold,
boolean setStatus,
FetchProductOptionsIf options)
throws java.lang.Exception
productId - the productIdquantitySold - the quantitySoldsetStatus - the setStatusoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected int decProductQuantitiesWithOptions(int productId,
int quantitySold,
boolean setProductStatus,
boolean onlyOrdered,
FetchProductOptionsIf options)
throws java.lang.Exception
productId - the productIdquantitySold - the quantitySoldsetProductStatus - the setProductStatusonlyOrdered - the onlyOrderedoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic void updateProductsOrdered(OrderIf order) throws java.lang.Exception
updateProductsOrdered in interface ProductMgrIforder - the orderjava.lang.Exception - an unexpected exceptionpublic ProductQuantityIf getProductQuantity(java.lang.String encodedProductId) throws java.lang.Exception
getProductQuantity in interface ProductMgrIfencodedProductId - the encodedProductIdjava.lang.Exception - an unexpected exceptionpublic ProductQuantityIf getProductQuantityWithOptions(java.lang.String encodedProductId, FetchProductOptionsIf options) throws java.lang.Exception
getProductQuantityWithOptions in interface ProductMgrIfencodedProductId - the encodedProductIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic java.lang.String createProductQuantityEncodedKeyFromOptions(OptionIf[] opts)
createProductQuantityEncodedKeyFromOptions in interface ProductMgrIfopts - the optspublic OptionIf[] createOptionsFromProductQuantityEncodedKey(java.lang.String encodedKey)
createOptionsFromProductQuantityEncodedKey in interface ProductMgrIfencodedKey - the encodedKeypublic ProductQuantity createProductQuantityEncodedKeyFromEncodedProductId(java.lang.String encodedProductId) throws com.konakart.app.KKException
createProductQuantityEncodedKeyFromEncodedProductId in interface ProductMgrIfencodedProductId - the encodedProductIdcom.konakart.app.KKException - an unexpected KKException exceptionpublic java.lang.String createEncodedProductIdFromProductQuantityEncodedKey(int productId,
java.lang.String productQuantityEncodedKey)
createEncodedProductIdFromProductQuantityEncodedKey in interface ProductMgrIfproductId - the productIdproductQuantityEncodedKey - the productQuantityEncodedKeyprotected ProductQuantityIf getProductQuantityWithOptions(int productId, FetchProductOptionsIf options) throws java.lang.Exception
productId - the productIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected ProductQuantityIf[] getProductQuantitiesPerProductWithOptions(int productId, FetchProductOptionsIf options, java.util.HashMap<java.lang.String,Option> optionMap) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
productId - the productIdoptions - the optionsoptionMap - the optionMaporg.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)com.konakart.app.KKException - an unexpected KKException exceptionprotected ProductQuantityIf getProductQuantityPerProductWithOptions(int productId, java.lang.String encodedOptionValues, FetchProductOptionsIf options) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
productId - the productIdencodedOptionValues - the encodedOptionValuesoptions - the optionsorg.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)com.konakart.app.KKException - an unexpected KKException exceptionprotected int getProductType(int productId)
throws org.apache.torque.TorqueException,
com.konakart.app.KKException,
com.workingdogs.village.DataSetException
productId - the productIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptioncom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)protected Product getLightProduct(int productId) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException
productId - the productIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptioncom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)public int insertDigitalDownload(java.lang.String sessionId,
int productId)
throws java.lang.Exception
insertDigitalDownload in interface ProductMgrIfsessionId - the sessionIdproductId - the productIdjava.lang.Exception - an unexpected exceptionpublic int insertDigitalDownload(int customerId,
int productId)
throws java.lang.Exception
insertDigitalDownload in interface ProductMgrIfproductId - the productIdcustomerId - the customerIdjava.lang.Exception - an unexpected exceptionpublic int insertGiftCertificateDigitalDownload(int customerId,
int productId,
java.lang.String filePath)
throws java.lang.Exception
insertGiftCertificateDigitalDownload in interface ProductMgrIfcustomerId - the customerIdproductId - the productIdfilePath - the filePathjava.lang.Exception - an unexpected exceptionprotected int getMaxDownloadDays(Product prod) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException, java.lang.Exception
prod - the prodorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptioncom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)java.lang.Exception - an unexpected exceptionprotected java.util.Date getExpiryDate(int maxDownloadDays)
maxDownloadDays - the maxDownloadDaysprotected int getMaxNumDownloads(Product prod) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException, java.lang.Exception
prod - the prodorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptioncom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)java.lang.Exception - an unexpected exceptionpublic DigitalDownload[] getDigitalDownloadsWithOptions(java.lang.String sessionId, int languageId, FetchDigitalDownloadOptionsIf ddOptions, FetchProductOptionsIf prodOptions) throws java.lang.Exception
getDigitalDownloadsWithOptions in interface ProductMgrIfsessionId - the sessionIdlanguageId - the languageIdddOptions - the ddOptionsprodOptions - the prodOptionsjava.lang.Exception - an unexpected exceptionpublic DigitalDownload[] getDigitalDownloads(java.lang.String sessionId) throws java.lang.Exception
getDigitalDownloads in interface ProductMgrIfsessionId - the sessionIdjava.lang.Exception - an unexpected exceptionprotected DigitalDownload getDigitalDownload(int customerId, int productId) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
customerId - the customerIdproductId - the productIdcom.konakart.app.KKException - an unexpected KKException 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)public DigitalDownload getDigitalDownloadById(java.lang.String sessionId, int digitalDownloadId) throws java.lang.Exception
getDigitalDownloadById in interface ProductMgrIfsessionId - the sessionIddigitalDownloadId - the digitalDownloadIdjava.lang.Exception - an unexpected exceptionpublic DigitalDownload getDigitalDownloadById(int digitalDownloadId) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getDigitalDownloadById in interface ProductMgrIfdigitalDownloadId - the digitalDownloadIdcom.konakart.app.KKException - an unexpected KKException 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)public void editDigitalDownload(java.lang.String sessionId,
DigitalDownloadIf digitalDownload)
throws java.lang.Exception
editDigitalDownload in interface ProductMgrIfsessionId - the sessionIddigitalDownload - the digitalDownloadjava.lang.Exception - an unexpected exceptionpublic void editDigitalDownload(DigitalDownloadIf digitalDownload) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
editDigitalDownload in interface ProductMgrIfdigitalDownload - the digitalDownloadcom.konakart.app.KKException - an unexpected KKException 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)protected void setDigitalDownloadCriteria(KKCriteria c) throws com.konakart.app.KKException
c - the ccom.konakart.app.KKException - an unexpected KKException exceptionpublic int updateDigitalDownloadCount(java.lang.String sessionId,
int productId)
throws java.lang.Exception
updateDigitalDownloadCount in interface ProductMgrIfsessionId - the sessionIdproductId - the productIdjava.lang.Exception - an unexpected exceptionpublic int updateDigitalDownloadCountById(java.lang.String sessionId,
int digitalDownloadId)
throws java.lang.Exception
updateDigitalDownloadCountById in interface ProductMgrIfsessionId - the sessionIddigitalDownloadId - the digitalDownloadIdjava.lang.Exception - an unexpected exceptionprotected void deleteDigitalDownload(DigitalDownload dd) throws org.apache.torque.TorqueException, com.konakart.app.KKException
dd - the ddorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionprotected Product validateDigitalDownload(int productId) throws java.lang.Exception
productId - the productIdjava.lang.Exception - an unexpected exceptionpublic int getPriceId(Customer customer)
getPriceId in interface ProductMgrIfcustomer - the customerprotected void setProductPrice(Product prod, int productPriceId) throws com.konakart.app.KKException
prod - the prodproductPriceId - the productPriceIdcom.konakart.app.KKException - an unexpected KKException exceptionprotected void setOptionPrice(Option opt, Product prod, int productId, int productPriceId) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
opt - the optprod - the prodproductId - the productIdproductPriceId - the productPriceIdcom.konakart.app.KKException - an unexpected KKException 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)protected ProductQuantityIf getBundleProductQuantityWithOptions(Product product, FetchProductOptionsIf options) throws java.lang.Exception
product - the productoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic TagGroup[] getTagGroupsPerCategory(int categoryId, boolean getProdCount, int languageId) throws java.lang.Exception
getTagGroupsPerCategory in interface ProductMgrIfcategoryId - - If set to -1 then all tag groups are returnedgetProdCount - the getProdCountlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic TagGroup[] getTagGroupsPerCategoryWithOptions(int categoryId, int languageId, FetchTagGroupOptionsIf options) throws java.lang.Exception
getTagGroupsPerCategoryWithOptions in interface ProductMgrIfcategoryId - - If set to -1 then all tag groups are returnedlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic TagIf[] getTagsPerCategory(int categoryId, boolean getProdCount, int languageId) throws java.lang.Exception
getTagsPerCategory in interface ProductMgrIfcategoryId - - If set to -1 then all tags are returnedgetProdCount - the getProdCountlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic TagGroupIf getTagGroup(int tagGroupId, boolean getProdCount, int languageId) throws java.lang.Exception
getTagGroup in interface ProductMgrIftagGroupId - the tagGroupIdgetProdCount - the getProdCountlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic TagIf getTag(int tagId, boolean getProdCount, int languageId) throws java.lang.Exception
getTag in interface ProductMgrIftagId - the tagIdgetProdCount - the getProdCountlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionprotected TagIf[] getTagsPerTagGroup(int tagGroupId, boolean getProdCount, int languageId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, com.konakart.app.KKException
tagGroupId - - If set to -1 then all tags are returnedgetProdCount - the getProdCountlanguageId - the languageIdcom.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)com.konakart.app.KKException - an unexpected KKException exceptionprotected void synchronizeTagProductCount()
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
com.konakart.app.KKException
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)com.konakart.app.KKException - an unexpected KKException exceptionprotected java.util.Date getLastAddedDateFromTagToProduct()
throws com.workingdogs.village.DataSetException,
org.apache.torque.TorqueException,
com.konakart.app.KKException
com.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)com.konakart.app.KKException - an unexpected KKException exceptionprotected int getTagToProductCount()
throws com.workingdogs.village.DataSetException,
org.apache.torque.TorqueException,
com.konakart.app.KKException
com.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)com.konakart.app.KKException - an unexpected KKException exceptionprotected void getProductCountForTag(TagIf tag) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, com.konakart.app.KKException
tag - the tagcom.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)com.konakart.app.KKException - an unexpected KKException exceptionprotected void setTagCriteriaWithStandardAttributes(KKCriteria c, int languageId)
c - the clanguageId - the languageIdprotected void setTagGroupCriteriaWithStandardAttributes(KKCriteria c, int languageId)
c - the clanguageId - the languageIdpublic int getProductReorderLevel(int productId)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
com.konakart.app.KKException
getProductReorderLevel in interface ProductMgrIfproductId - 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)com.konakart.app.KKException - an unexpected KKException exceptionpublic boolean doesProductExist(int productId)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
com.konakart.app.KKException
doesProductExist in interface ProductMgrIfproductId - 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)com.konakart.app.KKException - an unexpected KKException exceptionpublic int getPaymentScheduleId(int productId)
throws org.apache.torque.TorqueException,
com.konakart.app.KKException,
com.workingdogs.village.DataSetException
ProductMgrIfgetPaymentScheduleId in interface ProductMgrIfproductId - the productIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptioncom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)public Product getProductPerSku(java.lang.String sessionId, java.lang.String sku, int languageId) throws java.lang.Exception
getProductPerSku in interface ProductMgrIfsessionId - the sessionIdsku - the skulanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Product getProductPerSkuWithOptions(java.lang.String sessionId, java.lang.String sku, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
getProductPerSkuWithOptions in interface ProductMgrIfsessionId - the sessionIdsku - the skulanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected void addProductsToStoresConstraint(KKCriteria c, org.apache.torque.map.ColumnMap cm) throws com.konakart.app.KKException
c - the criteria that we will add our constraint to if necessarycm - the column used to join the products_to_stores products_id tocom.konakart.app.KKException - an unexpected KKException exceptionprotected int selectActiveProduct(java.lang.String sessionId,
java.util.ArrayList<java.lang.Integer> productIdList,
int languageId,
FetchProductOptionsIf options)
throws java.lang.Exception
sessionId - the sessionIdproductIdList - List of product idslanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected boolean doesExtQuantityExist(int productId,
java.lang.String encodedOptionValues,
java.lang.String catalogId,
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 void insertExtQuantity(int productId,
java.lang.String encodedOptionValues,
int quantity,
java.lang.String catalogId,
KKCriteria insertC)
throws org.apache.torque.TorqueException
productId - the productIdencodedOptionValues - the encodedOptionValuesquantity - the quantitycatalogId - the catalogIdinsertC - the insertCorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)protected void editExtQuantity(int productId,
java.lang.String encodedOptionValues,
int quantity,
java.lang.String catalogId,
KKCriteria selectC,
KKCriteria updateC)
throws org.apache.torque.TorqueException
productId - the productIdencodedOptionValues - the encodedOptionValuesquantity - the quantitycatalogId - the catalogIdselectC - the selectCupdateC - the updateCorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)public Address[] getAddressesPerProduct(int productId) throws java.lang.Exception
getAddressesPerProduct in interface ProductMgrIfproductId - the productIdjava.lang.Exception - an unexpected exceptionpublic void refreshConfigs()
throws java.lang.Exception
refreshConfigs in interface ProductMgrIfjava.lang.Exception - an unexpected exceptionpublic java.lang.String getXMLFromCustomAttrs(ProdCustAttrIf[] attrDescArray)
getXMLFromCustomAttrs in interface ProductMgrIfattrDescArray - Array of custom attributespublic ProdCustAttr[] getCustomAttrsFromXML(java.lang.String xml)
getCustomAttrsFromXML in interface ProductMgrIfxml - The custom attribute data in xml formatprotected java.util.List<com.workingdogs.village.Record> sendQuery(java.lang.String sessionId,
java.lang.String apiCall,
KKCriteria crit,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
int languageId,
boolean fixQuery,
FetchProductOptionsIf options)
throws java.lang.Exception
sessionId - the sessionIdapiCall - the apiCallcrit - the critdataDesc - the dataDescprodSearch - the prodSearchfixQuery - the fixQuerylanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected java.lang.String beforeSendQuery(java.lang.String sessionId,
java.lang.String apiCall,
java.lang.String queryString,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
int languageId,
FetchProductOptionsIf options)
throws java.lang.Exception
sessionId - The sessionId of the logged in userapiCall - Name of the Api call sending the queryqueryString - Query string that will be sent to the databasedataDesc - DataDescriptor objectprodSearch - ProductSearch object which may be nulllanguageId - Language idoptions - the optionsjava.lang.Exception - an unexpected exceptionprotected KKCriteria beforeSendCriteria(java.lang.String sessionId, java.lang.String apiCall, KKCriteria criteria, DataDescriptorIf dataDesc, ProductSearchIf prodSearch, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId - The sessionId of the logged in userapiCall - Name of the Api call sending the querycriteria - KKCriteria object that will be used to create the query stringdataDesc - DataDescriptor objectprodSearch - ProductSearch object which may be nulllanguageId - Language idoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic static boolean isCustomAttrAnOracleCLOB()
public 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 ProductMgrIfproductId - the productIdjava.lang.Exception - an unexpected exceptionpublic ProductImages getProductImages(ProductImagesOptionsIf options) throws com.konakart.app.KKException
ProductMgrIfgetProductImages in interface ProductMgrIfoptions - 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).com.konakart.app.KKException - if options is null or if no product with the specified productId can be found.public int getProductViewCountMaxRetries()
getProductViewCountMaxRetries in interface ProductMgrIfpublic void setProductViewCountMaxRetries(int productViewCountMaxRetries)
setProductViewCountMaxRetries in interface ProductMgrIfproductViewCountMaxRetries - the productViewCountMaxRetriespublic void setExtPriceTierPriceCriteria(KKCriteria c, int prodId, FetchProductOptionsIf options) throws com.konakart.app.KKException
c - criteria objectprodId - Product idoptions - fetch product optionscom.konakart.app.KKException - an unexpected KKException exceptionprotected void setExtPriceProductCriteria(KKCriteria c, FetchProductOptionsIf options) throws com.konakart.app.KKException
c - criteria objectoptions - fetch product optionscom.konakart.app.KKException - an unexpected KKException exceptionprotected void setExtQuantityProductCriteria(KKCriteria c, FetchProductOptionsIf options) throws com.konakart.app.KKException
c - criteria objectoptions - fetch product optionscom.konakart.app.KKException - an unexpected KKException exceptionprotected void setExtQuantityProductQuantityCriteria(KKCriteria c, int productId, FetchProductOptionsIf options) throws com.konakart.app.KKException
c - the cproductId - the productIdoptions - the optionscom.konakart.app.KKException - an unexpected KKException exceptionprotected void setExtPriceProductAttributeCriteria(KKCriteria c, int productId, FetchProductOptionsIf options) throws com.konakart.app.KKException
c - the cproductId - the productIdoptions - the optionscom.konakart.app.KKException - an unexpected KKException exceptionprotected void setStockReservationCriteriaOnProduct(KKCriteria c, FetchProductOptionsIf options) throws com.konakart.app.KKException
c - criteria objectoptions - fetch product optionscom.konakart.app.KKException - an unexpected KKException exceptionprotected void setStockReservationCriteriaOnProductQuantity(KKCriteria c, int productId, FetchProductOptionsIf options) throws com.konakart.app.KKException
c - the cproductId - the productIdoptions - the optionscom.konakart.app.KKException - an unexpected KKException exceptionpublic Basket[] reserveStock(java.lang.String sessionId, BasketIf[] basketItems, StockReservationOptionsIf stockReservationOptions) throws java.lang.Exception
ProductMgrIfThe options allow you to:
quantityInStock attribute. The reservation information is also persisted in the
database.
If any of the Basket items contain products or product variations no longer in the catalog then they are not included in the return array.
reserveStock in interface ProductMgrIfsessionId - the sessionIdbasketItems - the basketItemsstockReservationOptions - the stockReservationOptionsreservationId,
qtyResrvdForResId and reservationExpiryDate populated. The
reservationId is set to -1 if the reservation could not be made because
the stock was not available or for any other reason.java.lang.Exception - an unexpected exceptionpublic boolean cacheThisProduct(Product product) throws com.konakart.app.KKException
ProductMgrIfOnly relevant in the Enterprise version.
cacheThisProduct in interface ProductMgrIfproduct - the product to be considered for cachingcom.konakart.app.KKException - in unexpected circumstancespublic int removeStockReservationsForBasketItems(java.lang.String sessionId,
BasketIf[] basketItems,
StockReservationOptionsIf options)
throws java.lang.Exception
ProductMgrIfremoveStockReservationsForBasketItems in interface ProductMgrIfsessionId - the sessionIdbasketItems - the basketItemsoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic int removeStockReservationsForBasketItems(int customerId,
BasketIf[] basketItems,
StockReservationOptionsIf options)
throws java.lang.Exception
ProductMgrIfremoveStockReservationsForBasketItems in interface ProductMgrIfcustomerId - the customerIdbasketItems - the basketItemsoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic int removeStockReservationsForOrderProducts(java.lang.String sessionId,
OrderProductIf[] orderProducts,
StockReservationOptionsIf options)
throws java.lang.Exception
ProductMgrIfremoveStockReservationsForOrderProducts in interface ProductMgrIfsessionId - the sessionIdorderProducts - the orderProductsoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic int removeStockReservationsForOrderProducts(int customerId,
OrderProductIf[] orderProducts,
StockReservationOptionsIf options)
throws java.lang.Exception
ProductMgrIfremoveStockReservationsForOrderProducts in interface ProductMgrIfcustomerId - the customerIdorderProducts - the orderProductsoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic int removeStockReservationsForIds(java.lang.String sessionId,
int[] idArray,
StockReservationOptionsIf options)
throws java.lang.Exception
ProductMgrIfremoveStockReservationsForIds in interface ProductMgrIfsessionId - the sessionIdidArray - the idArrayoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic int removeStockReservationsForIds(int customerId,
int[] idArray,
StockReservationOptionsIf options)
throws java.lang.Exception
ProductMgrIfremoveStockReservationsForIds in interface ProductMgrIfcustomerId - the customerIdidArray - the idArrayoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic Catalog getCatalogPerKey(java.lang.String catalogKey) throws java.lang.Exception
ProductMgrIfgetCatalogPerKey in interface ProductMgrIfcatalogKey - the catalogKeyjava.lang.Exception - an unexpected exceptionprotected boolean isEnhancedVariantHandlingModeEnabled()
throws com.konakart.app.KKException
com.konakart.app.KKException - an unexpected KKException exceptionprotected VariantPriceIf[] getVariantPricesPerProductWithOptions(int productId, FetchProductOptionsIf options, java.util.HashMap<java.lang.String,Option> optionMap) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
productId - the productIdoptions - the optionsoptionMap - the optionMaporg.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)com.konakart.app.KKException - an unexpected KKException exceptionprotected void setExtPricesVariantPriceCriteria(KKCriteria c, int productId, FetchProductOptionsIf options) throws com.konakart.app.KKException
c - the cproductId - the productIdoptions - the optionscom.konakart.app.KKException - an unexpected KKException exceptionprotected VariantPriceIf[] getVariantPrices(Product prod, int productPriceId, FetchProductOptionsIf options) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException
prod - the prodproductPriceId - the productPriceIdoptions - the optionsorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptioncom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)public int updateProductLockItems(java.lang.String productId,
java.lang.String shopIds)
throws java.lang.Exception
ProductMgrIfshopIdsupdateProductLockItems in interface ProductMgrIfproductId - Product-ID for which the Lock should be setshopIds - ;-Separated-List with shop-Ids where the Product should be lockedjava.lang.Exception - an unexpected KKException exceptionpublic int updateProductNotLockedItems(java.lang.String[] productIds)
throws java.lang.Exception
ProductMgrIfproductIdsupdateProductNotLockedItems in interface ProductMgrIfproductIds - List with acutaly Locked Productsjava.lang.Exception - an unexpected KKException exceptionCopyright © 2018 DS Data Systems UK Ltd.