public class ProductMgrEE extends ProductMgr implements ProductMgrIf
ProductMgr.OptionSortOrderComparator, ProductMgr.ProdAttr, ProductMgr.ProdAttrSortOrderComparator, ProductMgr.ProdSortOrderComparator, ProductMgr.StaticData, ProductMgr.TagSortOrderComparator
Modifier and Type | Field and Description |
---|---|
protected static com.fasterxml.jackson.databind.ObjectMapper |
mapper
JSON Data Mapping Object
|
ACCESSORY, ALL_RELATIONSHIPS, BOOKABLE_PRODUCT_TYPE, BUNDLE_PRODUCT_TYPE, BUNDLED_PRODUCT_RELATIONSHIP, CROSS_SELL, CUSTOM_RELATIONSHIP_1, CUSTOM_RELATIONSHIP_2, CUSTOM_RELATIONSHIP_3, CUSTOM_RELATIONSHIP_4, CUSTOM_RELATIONSHIP_5, customAttrAnOracleCLOB, DEPENDENT_ITEM, DIGITAL_DOWNLOAD, DONT_INCLUDE, FREE_SHIPPING, FREE_SHIPPING_BUNDLE_PRODUCT_TYPE, GIFT_CERTIFICATE_PRODUCT_TYPE, log, PHYSICAL_PRODUCT, prodMgrMutex, productViewCountMaxRetries, prodViewMutex, reserveStockMutex, staticDataHM, tagMutex, UP_SELL, updateStockMutex, VIRTUAL_PRODUCT_TYPE
templateBaseDir
Constructor and Description |
---|
ProductMgrEE(KKEngIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected Basket |
clearBasketReservationData(Basket basketItem)
Utility method to clear the attributes of a Basket concerned with reservations
|
protected AddToBasketOptionsIf |
createAddToBasketOptions(StockReservationOptionsIf options)
Creates an AddToBasketOptions object from a StockReservationOptions
|
protected FetchProductOptionsIf |
createFetchProductOptions(StockReservationOptionsIf options)
Creates a FetchProductOptions object from a StockReservationOptions
|
protected void |
deleteStockReservation(int reservationId)
Delete a Stock Reservation object
|
Catalog |
getCatalogPerKey(java.lang.String catalogKey)
Returns a catalog object for the catalog key.
|
static com.fasterxml.jackson.databind.ObjectMapper |
getMapper() |
ProductImages |
getProductImages(ProductImagesOptionsIf options)
Get the image file names associated with the product whose id is specified.
|
protected Product |
getProductWithOptions(int productId,
java.lang.String catalogId,
int priceId,
int langId,
FetchProductOptionsIf options) |
protected StockReservation[] |
getStockReservations(int reservationId)
Used to get StockReservation objects using the reservation id.
|
void |
init()
Initialise the configuration of the product manager
|
protected int |
removeStockReservations(int customerId,
int[] idArray,
java.util.ArrayList<java.lang.Integer> idList,
StockReservationOptionsIf options)
A local method which actually implements the deletion of the stock reservations.
|
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.
|
protected BasketIf |
reserveStockSingleItem(int customerId,
Basket basketItem,
ProductQuantityIf[] bundlePQs,
int reservationTime,
StockReservationOptionsIf options,
ProductMgr.StaticData sd)
This method attempts to reserve stock for the Basket item passed in as a parameter.
|
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 |
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 |
updateBasketWithReservationInfo(Basket bItem,
int reservationId,
int reserveQty,
java.util.Date reservationStartTime,
java.util.Date reservationEndTime)
Utility method to avoid repeated code
|
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 |
addProductDescriptions, addProductsToStoresConstraint, addTax, addTax, beforeSendCriteria, beforeSendQuery, createEncodedProductIdFromProductQuantityEncodedKey, createOptionsFromProductQuantityEncodedKey, createProductQuantityEncodedKeyFromEncodedProductId, createProductQuantityEncodedKeyFromOptions, decProductQuantitiesWithOptions, deleteDigitalDownload, doesExtQuantityExist, doesProductExist, doTierPricesExist, editDigitalDownload, editDigitalDownload, editExtQuantity, fetchDescriptionsSeparately, getAddressesPerProduct, getAllProductRelationships, getAllProducts, getAllProductsWithOptions, getAllSpecials, getAlsoPurchased, getAlsoPurchasedWithOptions, getBestSellers, getBestSellersWithOptions, getBundleProductQuantityWithOptions, getBundlesThatProductBelongsTo, getBundlesThatProductsBelongTo, getCount, getCustomAttrs, getCustomAttrsFromXML, getDigitalDownload, getDigitalDownloadById, getDigitalDownloadById, getDigitalDownloads, getDigitalDownloadsWithOptions, getExpiryDate, getLastAddedDateFromTagToProduct, getLightProduct, getMaxDownloadDays, getMaxNumDownloads, getOption, getOrderHistory, getOrderHistoryWithOptions, getPaymentScheduleId, getPriceId, getProduct, getProduct, getProductCountForTag, getProductOptions, getProductPerSku, getProductPerSkuWithOptions, getProductQuantitiesPerProductWithOptions, getProductQuantity, getProductQuantityPerProductWithOptions, getProductQuantityWithOptions, getProductQuantityWithOptions, getProductReorderLevel, getProductsAllCases, getProductsFromIds, getProductsFromIdsWithOptions, getProductsFromIdsWithOptions, getProductsPerCategory, getProductsPerCategoryPerManufacturer, getProductsPerCategoryPerManufacturerWithOptions, getProductsPerCategoryWithOptions, getProductsPerManufacturer, getProductsPerManufacturerWithOptions, getProductType, getProductViewCountMaxRetries, getProductWithOptions, getProductWithOptions, getProductWithOptions, getRelatedProducts, getRelatedProducts, getRelatedProductsWithOptions, getSku, getSku, getSpecialsPerCategory, getTag, getTagGroup, getTagGroupsPerCategory, getTagGroupsPerCategoryWithOptions, getTagsPerCategory, getTagsPerProduct, getTagsPerTagGroup, getTagToProductCount, getTaxClassId, getTierPrices, getVariantPrices, getVariantPricesPerProductWithOptions, getXMLFromCustomAttrs, insertDigitalDownload, insertDigitalDownload, insertExtQuantity, insertGiftCertificateDigitalDownload, isCustomAttrAnOracleCLOB, isEnhancedVariantHandlingModeEnabled, manageDataDescriptor, manageDataDescriptor, refreshConfigs, searchForProducts, searchForProductsPrivate, searchForProductsWithOptions, selectActiveProduct, sendQuery, setBundledProducts, setCriteriaWithStandardAttributes, setCriteriaWithStandardAttributes, setDigitalDownloadCriteria, setOptionPrice, setProductPrice, setProductsSharedCriteria, setProductViewCountMaxRetries, setTagCriteriaWithStandardAttributes, setTagGroupCriteriaWithStandardAttributes, synchronizeTagProductCount, updateBundleProductQuantityWithOptions, updateDigitalDownloadCount, updateDigitalDownloadCountById, updateProductQuantity, updateProductQuantity, updateProductQuantityWithOptions, updateProductReviewInfo, updateProductsOrdered, updateProductViewedCount, useSpecialPrice, validateDigitalDownload
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, updateStaticVariablesNow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createEncodedProductIdFromProductQuantityEncodedKey, createOptionsFromProductQuantityEncodedKey, createProductQuantityEncodedKeyFromEncodedProductId, createProductQuantityEncodedKeyFromOptions, doesProductExist, editDigitalDownload, editDigitalDownload, getAddressesPerProduct, getAllProductRelationships, getAllProducts, getAllProductsWithOptions, getAllSpecials, getAlsoPurchased, getAlsoPurchasedWithOptions, getBestSellers, getBestSellersWithOptions, getBundlesThatProductBelongsTo, getBundlesThatProductsBelongTo, getCustomAttrsFromXML, getDigitalDownloadById, getDigitalDownloadById, getDigitalDownloads, getDigitalDownloadsWithOptions, getOption, getOrderHistory, getOrderHistoryWithOptions, getPaymentScheduleId, getPriceId, getProduct, getProduct, getProductPerSku, getProductPerSkuWithOptions, getProductQuantity, getProductQuantityWithOptions, getProductReorderLevel, getProductsFromIds, getProductsFromIdsWithOptions, getProductsFromIdsWithOptions, getProductsPerCategory, getProductsPerCategoryPerManufacturer, getProductsPerCategoryPerManufacturerWithOptions, getProductsPerCategoryWithOptions, getProductsPerManufacturer, getProductsPerManufacturerWithOptions, getProductViewCountMaxRetries, getProductWithOptions, getProductWithOptions, getRelatedProducts, getRelatedProductsWithOptions, getSku, getSpecialsPerCategory, getTag, getTagGroup, getTagGroupsPerCategory, getTagGroupsPerCategoryWithOptions, getTagsPerCategory, getTaxClassId, getXMLFromCustomAttrs, insertDigitalDownload, insertDigitalDownload, insertGiftCertificateDigitalDownload, refreshConfigs, searchForProducts, searchForProductsWithOptions, setProductViewCountMaxRetries, updateDigitalDownloadCount, updateDigitalDownloadCountById, updateProductQuantity, updateProductQuantity, updateProductQuantityWithOptions, updateProductReviewInfo, updateProductsOrdered, updateProductViewedCount
protected static com.fasterxml.jackson.databind.ObjectMapper mapper
public ProductMgrEE(KKEngIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic void setExtPriceTierPriceCriteria(KKCriteria c, int prodId, FetchProductOptionsIf options) throws com.konakart.app.KKException
setExtPriceTierPriceCriteria
in class ProductMgr
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
setExtPriceProductCriteria
in class ProductMgr
c
- criteria objectoptions
- fetch product optionscom.konakart.app.KKException
- an unexpected KKException exceptionprotected void setExtQuantityProductCriteria(KKCriteria c, FetchProductOptionsIf options) throws com.konakart.app.KKException
setExtQuantityProductCriteria
in class ProductMgr
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
setExtQuantityProductQuantityCriteria
in class ProductMgr
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
setExtPriceProductAttributeCriteria
in class ProductMgr
c
- the cproductId
- the productIdoptions
- the optionscom.konakart.app.KKException
- an unexpected KKException exceptionprotected Product getProductWithOptions(int productId, java.lang.String catalogId, int priceId, int langId, FetchProductOptionsIf options) throws java.lang.Exception
getProductWithOptions
in class ProductMgr
productId
- the productIdcatalogId
- the catalogIdpriceId
- the priceIdlangId
- the langIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic boolean cacheThisProduct(Product product) throws com.konakart.app.KKException
Only relevant in the Enterprise version.
cacheThisProduct
in interface ProductMgrIf
cacheThisProduct
in class ProductMgr
product
- the product to be considered for cachingcom.konakart.app.KKException
- an unexpected KKException exceptionpublic ProductImages getProductImages(ProductImagesOptionsIf options) throws com.konakart.app.KKException
ProductMgrIf
getProductImages
in interface ProductMgrIf
getProductImages
in class ProductMgr
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).com.konakart.app.KKException
- if options is null or if no product with the specified productId can be found.public void init() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionpublic static com.fasterxml.jackson.databind.ObjectMapper getMapper()
public Basket[] reserveStock(java.lang.String sessionId, BasketIf[] basketItems, StockReservationOptionsIf stockReservationOptions) throws java.lang.Exception
The 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 ProductMgrIf
reserveStock
in class ProductMgr
sessionId
- 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 exceptionprotected BasketIf reserveStockSingleItem(int customerId, Basket basketItem, ProductQuantityIf[] bundlePQs, int reservationTime, StockReservationOptionsIf options, ProductMgr.StaticData sd) throws java.lang.Exception
customerId
- the customerIdbasketItem
- the basketItembundlePQs
- If we have an array of bundle product quantities then we have to create a
reservation for each one of thesereservationTime
- the reservationTimeoptions
- the optionssd
- the sdjava.lang.Exception
- an unexpected exceptionprotected void updateBasketWithReservationInfo(Basket bItem, int reservationId, int reserveQty, java.util.Date reservationStartTime, java.util.Date reservationEndTime) throws org.apache.torque.TorqueException, com.konakart.app.KKException
bItem
- the bItemreservationId
- the reservationIdreserveQty
- the reserveQtyreservationStartTime
- the reservationStartTimereservationEndTime
- the reservationEndTimeorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionprotected StockReservation[] getStockReservations(int reservationId) throws java.lang.Exception
reservationId
- the reservationIdjava.lang.Exception
- an unexpected exceptionprotected void deleteStockReservation(int reservationId) throws java.lang.Exception
reservationId
- the reservationIdjava.lang.Exception
- an unexpected exceptionprotected Basket clearBasketReservationData(Basket basketItem)
basketItem
- the basketItempublic int removeStockReservationsForBasketItems(java.lang.String sessionId, BasketIf[] basketItems, StockReservationOptionsIf options) throws java.lang.Exception
removeStockReservationsForBasketItems
in interface ProductMgrIf
removeStockReservationsForBasketItems
in class ProductMgr
sessionId
- the sessionIdbasketItems
- the basketItemsoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic int removeStockReservationsForBasketItems(int customerId, BasketIf[] basketItems, StockReservationOptionsIf options) throws java.lang.Exception
removeStockReservationsForBasketItems
in interface ProductMgrIf
removeStockReservationsForBasketItems
in class ProductMgr
customerId
- 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
removeStockReservationsForOrderProducts
in interface ProductMgrIf
removeStockReservationsForOrderProducts
in class ProductMgr
sessionId
- the sessionIdorderProducts
- the orderProductsoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic int removeStockReservationsForOrderProducts(int customerId, OrderProductIf[] orderProducts, StockReservationOptionsIf options) throws java.lang.Exception
removeStockReservationsForOrderProducts
in interface ProductMgrIf
removeStockReservationsForOrderProducts
in class ProductMgr
customerId
- 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
removeStockReservationsForIds
in interface ProductMgrIf
removeStockReservationsForIds
in class ProductMgr
sessionId
- the sessionIdidArray
- the idArrayoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic int removeStockReservationsForIds(int customerId, int[] idArray, StockReservationOptionsIf options) throws java.lang.Exception
removeStockReservationsForIds
in interface ProductMgrIf
removeStockReservationsForIds
in class ProductMgr
customerId
- the customerIdidArray
- the idArrayoptions
- the optionsjava.lang.Exception
- an unexpected exceptionprotected int removeStockReservations(int customerId, int[] idArray, java.util.ArrayList<java.lang.Integer> idList, StockReservationOptionsIf options) throws java.lang.Exception
customerId
- the customerIdidArray
- the idArrayidList
- the idListoptions
- the optionsjava.lang.Exception
- an unexpected exceptionprotected AddToBasketOptionsIf createAddToBasketOptions(StockReservationOptionsIf options)
options
- the optionsprotected FetchProductOptionsIf createFetchProductOptions(StockReservationOptionsIf options)
options
- the optionsprotected void setStockReservationCriteriaOnProduct(KKCriteria c, FetchProductOptionsIf options) throws com.konakart.app.KKException
setStockReservationCriteriaOnProduct
in class ProductMgr
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
setStockReservationCriteriaOnProductQuantity
in class ProductMgr
c
- the cproductId
- the productIdoptions
- the optionscom.konakart.app.KKException
- an unexpected KKException exceptionpublic Catalog getCatalogPerKey(java.lang.String catalogKey) throws java.lang.Exception
getCatalogPerKey
in interface ProductMgrIf
getCatalogPerKey
in class ProductMgr
catalogKey
- the catalogKeyjava.lang.Exception
- an unexpected exceptionprotected void setExtPricesVariantPriceCriteria(KKCriteria c, int productId, FetchProductOptionsIf options) throws com.konakart.app.KKException
setExtPricesVariantPriceCriteria
in class ProductMgr
c
- the cproductId
- the productIdoptions
- the optionscom.konakart.app.KKException
- an unexpected KKException exceptionpublic int updateProductLockItems(java.lang.String productId, java.lang.String shopIds) throws java.lang.Exception
ProductMgrIf
shopIds
updateProductLockItems
in interface ProductMgrIf
updateProductLockItems
in class ProductMgr
productId
- 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
ProductMgrIf
productIds
updateProductNotLockedItems
in interface ProductMgrIf
updateProductNotLockedItems
in class ProductMgr
productIds
- List with acutaly Locked Productsjava.lang.Exception
- an unexpected KKException exceptionCopyright © 2018 DS Data Systems UK Ltd.