public class AdminProductMgrEE extends AdminProductMgr implements AdminProductMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
AdminProductMgrEE.CatalogCategory
Class to manage a catalog and its rules for creating a catalog
|
protected class |
AdminProductMgrEE.CatalogCategoryComparator
Used to sort the Catalog Category objects
|
protected class |
AdminProductMgrEE.ProductPrice
Class to contain a product price
|
AdminProductMgr.AttributeSortOrderComparator, AdminProductMgr.OptionSortOrderComparator, AdminProductMgr.StaticData
ACCESSORY, BOOKABLE_PRODUCT_TYPE, BUNDLED_PRODUCTS, CAT_PRICE_ATTR, CAT_PRICE_PROD, CAT_PRICE_TIER, CAT_PRICE_VARIANT, CAT_PROD_READ_LIMIT, CROSS_SELL, customAttrAnOracleCLOB, DEPENDENT_ITEM, DIGITAL_DOWNLOAD, DONT_INCLUDE, GIFT_CERTIFICATE_PRODUCT_TYPE, log, mutex, staticDataHM, UP_SELL, VIRTUAL_PRODUCT_TYPE
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminProductMgrEE(KKAdminIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addCatalogRules(java.lang.String catalogId,
AdminCatalogRule[] rules)
Adds the catalog rules to the database
|
protected java.math.BigDecimal |
calculatePrice(java.math.BigDecimal priceIn,
AdminProductMgrEE.CatalogCategory catalogCat)
Determine whether the product price needs to be modified before adding to the catalog
|
AdminCreateCatalogPricesResult |
createCatalogPricesFromRules(java.lang.String catalogId,
AdminCreateCatalogPriceOptions options)
This method populates a catalog with product prices based on rules that have been previously
added using the
addCatalogRules() method. |
void |
deleteProduct(int productId)
The export manager is called after a product is deleted in order to create an XML message and
write it to a queue.
|
void |
deleteProducts(AdminCommonOptions options)
Delete the products referenced by the options parameter.
|
protected boolean |
doesVariantPriceExist(int productId,
java.lang.String encodedOptionValues,
java.lang.String variantCode,
java.sql.Connection con)
Return true if the variant price already exists.
|
void |
editProductWithOptions(AdminProduct product,
AdminProductMgrOptions mgrOptions)
The export manager is called after a product is edited in order to create an XML message and
write it to a queue.
|
protected java.lang.String |
encodeOptionValues(java.lang.String variantCode) |
AdminCatalogRule[] |
getCatalogRules(java.lang.String catalogId)
Fetches an array of catalog rules for a given catalog.
|
protected java.lang.String |
getCustomAttrs(int productId)
Get the custom_attrs for the product with the specified Id
|
protected java.lang.String |
getCustomAttrs(int productId,
java.sql.Connection con)
Get the custom_attrs for the product with the specified Id
|
java.lang.String |
getPriceTypeDesc(int priceType)
Just for diagnostics
|
protected AdminProductPrice |
getProductBasePrice(int productId,
java.lang.String catalogId,
java.sql.Connection conn) |
void |
insertCatalogPrices(AdminProductPrice[] prices,
AdminInsertCatalogPriceOptions options)
This API call is intended to provide a fast way to load catalog prices.
|
protected int |
insertProductPriceForCatalog(AdminProductMgrEE.ProductPrice prodPrice,
int type,
com.konakart.db.KKCriteria insertC)
Inserts a price in the product prices table
|
protected int |
insertProductPrices(java.util.ArrayList<AdminProductMgrEE.ProductPrice> prodPriceList,
com.konakart.db.KKCriteria insertC)
Insert the product prices into the database after removing duplicates
|
int |
insertProductWithOptions(AdminProduct product,
AdminProductMgrOptions mgrOptions)
The export manager is called after a product is inserted in order to create an XML message
and write it to a queue.
|
protected int |
manageIncludeCategoryMap(AdminProductMgrEE.CatalogCategory cc,
java.util.HashMap<java.lang.Integer,AdminProductMgrEE.CatalogCategory> includeCategoryMap,
boolean include)
Recurse through the category and all of its children to include them all or exclude them all.
|
protected java.lang.String |
priceListToString(java.util.ArrayList<AdminProductMgrEE.ProductPrice> prodPriceList)
Converts a price list to a string for debug purposes
|
protected void |
processPrice(AdminProductPrice price,
java.sql.Connection con)
This method is used to process the variant price in order to encode the variantCode
received from ESP or to decode the productOptionsValue from KonaKart into variantCode
useful when we should transmit an order to MAGO.
|
void |
removeProductFromCatalog(int productId,
java.lang.String catalogId)
Removes product prices and quantities from the catalog referenced by the catalogId
|
addDigitalDownloadOrderBy, addDigitalDownloadSearchCriteria, addProductImageFields, addProductOptionOrderBy, addProductOptionSearchCriteria, addRelatedProducts, addRelatedProductsWithOptions, convertProdAttrArrayToOrderedList, copyProductPrices, copyProductToStore, createEncodedProductIdFromProductQuantityEncodedKey, createProductQuantityEncodedKeyFromOptions, decodeVariantCodeFromOptionAndValue, decodeVariantCodeFromOptionsAndValues, deleteCatalog, deleteCatalogPrices, deleteCatalogWithOptions, deleteDirectProductsPerCategory, deleteExtPrice, deleteExtQuantity, deleteProductAttribute, deleteProductAttributesPerProduct, deleteProductOptions, deleteProductOptionValues, deleteProductsPerCategory, deleteProductsPerManufacturer, deleteSpecial, doesExtPriceExist, doesExtPriceExist, doesExtQuantityExist, doesExtQuantityExist, doesProductExist, doesProductExist, doesSpecialExist, doesSpecialExist, editCustAttrTemplates, editExtPrice, editExtProdAttrPrice, editExtQuantity, editExtTierPrice, editExtVariantPrice, editMiscPrices, editProduct, editProductAttribute, editProductAttributes, editProductDescriptions, editProductOption, editProductOptionValue, editProductQuantities, editProductToCategory, editProductWithOptions, editSpecial, editSpecial, editTierPrices, editVariantPrices, encodeOptionsAndValuesFromVariantCode, formatProductPrices, getAllProductOptions, getAllProductOptionValues, getAllSpecials, getBundleProductDetails, getBundleProductDetails, getCatalogById, getCatalogCount, getCatalogs, getCombinedExceptionStack, getCount, getCount, getDigitalDownload, getExpiryDate, getFuturePriceCatalogId, getMappedProductId, getMaxDownloadDays, getMaxNumDownloads, getMiscItems, getMiscItems, getMiscItems, getMiscItems, getMiscItemsHash, getMiscPrices, getMiscPrices, getNewQuantity, getNextProductOptionId, getNextProductOptionValuesId, getP2PHash, getPriceCatalogToUse, getPriceFromEncodedOptions, getProduct, getProduct, getProduct, getProduct, getProduct, getProduct, getProductAttribute, getProductAttributesPerProduct, getProductAttributesPerProduct, getProductAttributesPerProduct, getProductAttributesPerProduct, getProductAvailability, getProductAvailabilityWithOptions, getProductCategoryIds, getProductCategoryIds, getProductCategoryIds, getProductCategoryIds, getProductCriteria, getProductDescriptionLanguageIds, getProductDescriptionLanguageIds, getProductIdFromUUIDAndStore, getProductIdsPerManufacturer, getProductIdsPerManufacturer, getProductImageFields, getProductImages, getProductImagesForProduct, getProductOptionCount, getProductOptionIdPerCode, getProductOptionIdPerCode, getProductOptions, getProductOptionsCodePerId, getProductOptionsPerId, getProductOptionsPerId, getProductOptionsPerName, getProductOptionValueCodePerProductOptionId, getProductOptionValueIdPerCodeAndProductOptionId, getProductOptionValuesPerId, getProductOptionValuesPerId, getProductOptionValuesPerName, getProductOptionValuesPerOption, getProductOptionValuesPerOption, getProductOptionValueToProductOptions, getProductQuantitiesPerProduct, getProductQuantitiesPerProduct, getProductQuantitiesPerSKU, getProductQuantity, getProductQuantityWithOptions, getProductsAllCasesWithOptions, getProductsPerCategory, getProductsPerCategoryWithOptions, getProductsPerManufacturer, getProductsPerManufacturerWithOptions, getProductsToStores, getProductsToSynchronize, getProductWithOptions, getProductWithOptions, getRelatedProducts, getRelatedProducts, getRelatedProductsWithOptions, getRelatedProductsWithOptions, getRelatedProductsWithOptions, getRelatedProductsWithOptions, getSku, getSku, getSkus, getSpecial, getSpecial, getSpecialForProductId, getSpecialForProductId, getSpecialForSpecialOrProductId, getSpecialForSpecialOrProductId, getSpecialsPerCategory, getSpecialsPerCategory, getTierPricesPerProduct, getTierPricesPerProduct, getVariantPricesPerProduct, importDigitalDownload, insertCatalog, insertCustAttrTemplates, insertDigitalDownload, insertExtPrice, insertExtProdAttrPrice, insertExtQuantity, insertExtTierPrice, insertExtVariantPrice, insertGiftCertificateDigitalDownload, insertProduct, insertProductAttribute, insertProductCategory, insertProductIntoExternalSystems, insertProductOption, insertProductOptions, insertProductOptionValue, insertProductOptionValues, insertProductsOptionsValuesToProductsOptions, insertProductsToStores, insertProductWithOptions, insertSpecial, insertSpecial, insertVariantPrice, isCustomAttrAnOracleCLOB, isEnhancedVariantHandlingModeEnabled, manageDataDescriptor, manageDataDescriptor, manageProductToStoreDataDescriptor, processQuantity, productCategoryExists, refreshConfigs, removeProductFromExternalSystems, removeProductsToCatgeories, removeProductsToStores, removeRelatedProduct, removeRelatedProducts, removeRelatedProductShared, roundDate, searchDigitalDownloads, searchForProducts, searchForProductsPrivateWithOptions, searchForProductsPrivateWithOptions, searchForProductsWithOptions, setBundleQuantity, setBundleQuantity, setCriteriaWithStandardAttributes, setCriteriaWithStandardAttributes, setDigitalDownloadCriteria, setExtPriceProductCriteria, setExtQuantityProductCriteria, setProductAttributeCriteria, setProductAvailability, setProductAvailabilityWithOptions, setProductOptionCriteriaWithStandardAttributes, setProductOptionValueCriteriaWithStandardAttributes, setProductQuantity, setProductQuantityWithOptions, setProductQuantityWithOptions, setProductsSharedCriteria, setProductsSharedCriteria, updateCatalog, updateProductImageFields, updateProductInExternalSystems, updateProductReviewInfo, useExternalPrices, useExternalQuantity, validateDigitalDownload, validateProdOptionValToProdOption, validateProduct, validateProduct, validateProductAttribute, validateProductAttribute, validateProductOption, validateProductOptionValue, validateProductQuantity, validateSpecial, validateSpecial, validateTierPrices, validateVariantPrices
addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkAPICallEnabled, checkIntInRange, checkIntIsSet, checkRequired, executeQuery, executeQuery, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminContentMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustPwdHistMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminEngineCacheMgr, getAdminEventMgr, getAdminExecuteMgr, getAdminFileMgr, getAdminFilterMgr, getAdminHtmlMgr, getAdminImportMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminMiscPriceMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminServletMgr, getAdminShipmentMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminSuggestionMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getDebugStackTraceExclusions, getEmailThreadGracefulShutdownTimeout, getExportMgr, getExportMgr, getExportXMLData, getIntFromString, getKkAdminPropsFilePath, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getNewCriteria, getNewCriteria, getOtherModuleByName, getPostSearchText, getPreSearchText, getProductsToCategoresCriteria, getPropertyValue, getPropertyValue, getPropertyValueAsBool, getPropertyValueAsInt, getPropertyValueAsLong, getRecordCount, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isCommunity, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, isUnix, isWindows, manageException, manageThrowable, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addRelatedProducts, addRelatedProductsWithOptions, copyProductToStore, deleteCatalog, deleteCatalogPrices, deleteCatalogWithOptions, deleteDirectProductsPerCategory, deleteProductAttribute, deleteProductAttributesPerProduct, deleteProductOptions, deleteProductOptionValues, deleteProductsPerCategory, deleteProductsPerManufacturer, deleteSpecial, doesProductExist, editProduct, editProductAttribute, editProductOption, editProductOptionValue, editSpecial, getAllProductOptions, getAllProductOptionValues, getAllSpecials, getBundleProductDetails, getCatalogById, getCatalogs, getNextProductOptionId, getNextProductOptionValuesId, getProduct, getProduct, getProduct, getProductAttributesPerProduct, getProductAttributesPerProduct, getProductAvailability, getProductAvailabilityWithOptions, getProductCategoryIds, getProductCriteria, getProductDescriptionLanguageIds, getProductIdsPerManufacturer, getProductImageFields, getProductImages, getProductImagesForProduct, getProductOptions, getProductOptionsPerId, getProductOptionsPerName, getProductOptionValuesPerId, getProductOptionValuesPerName, getProductOptionValuesPerOption, getProductOptionValueToProductOptions, getProductQuantity, getProductQuantityWithOptions, getProductsPerCategory, getProductsPerCategoryWithOptions, getProductsPerManufacturer, getProductsPerManufacturerWithOptions, getProductsToStores, getProductsToSynchronize, getProductWithOptions, getRelatedProducts, getRelatedProductsWithOptions, getSku, getSku, getSkus, getSpecial, getSpecialsPerCategory, importDigitalDownload, insertCatalog, insertDigitalDownload, insertGiftCertificateDigitalDownload, insertProduct, insertProductAttribute, insertProductCategory, insertProductOption, insertProductOptions, insertProductOptionValue, insertProductOptionValues, insertProductsOptionsValuesToProductsOptions, insertProductsToStores, insertSpecial, refreshConfigs, removeProductsToStores, removeRelatedProduct, removeRelatedProducts, searchDigitalDownloads, searchForProducts, searchForProductsWithOptions, setDigitalDownloadCriteria, setProductAvailability, setProductAvailabilityWithOptions, setProductQuantity, setProductQuantityWithOptions, setProductQuantityWithOptions, setProductsSharedCriteria, setProductsSharedCriteria, updateCatalog, updateProductImageFields, updateProductReviewInfo
public AdminProductMgrEE(KKAdminIf eng) throws java.lang.Exception
eng
- KKAdmin enginejava.lang.Exception
- an unexpected exceptionpublic void insertCatalogPrices(AdminProductPrice[] prices, AdminInsertCatalogPriceOptions options) throws java.lang.Exception
The options object allows you:
singleTransaction
attribute is set to true,
the prices are updated / inserted within a single database transaction and a rollback is
performed if an exception is caught. When false, the API call terminates as soon as an
exception is caught, but no rollback is performed. The default is false.insertKKEvent
attribute is set to true, a product update event is inserted for all products which have had
price changes. The event ensures that the product is removed from the cache in order to pick
up the new prices. The default is false.insertCatalogPrices
in interface AdminProductMgrIf
insertCatalogPrices
in class AdminProductMgr
prices
- An array of AdminProductPrice objectsoptions
- Allows you to manage the transaction and events. May be left empty for default
behaviour.java.lang.Exception
- an unexpected exceptionpublic void removeProductFromCatalog(int productId, java.lang.String catalogId) throws java.lang.Exception
removeProductFromCatalog
in interface AdminProductMgrIf
removeProductFromCatalog
in class AdminProductMgr
productId
- the productIdcatalogId
- the catalogIdjava.lang.Exception
- an unexpected exceptionpublic AdminCreateCatalogPricesResult createCatalogPricesFromRules(java.lang.String catalogId, AdminCreateCatalogPriceOptions options) throws java.lang.Exception
addCatalogRules()
method. The rules are used to make price
adjustments to products within selected categories and to include or exclude products from
selected categories.createCatalogPricesFromRules
in interface AdminProductMgrIf
createCatalogPricesFromRules
in class AdminProductMgr
catalogId
- Id of the catalogoptions
- All products are read from the database in a loop to add to the catalog. This
options object allows you to define the maximum number of records read at a time.java.lang.Exception
- an unexpected exceptionprotected java.math.BigDecimal calculatePrice(java.math.BigDecimal priceIn, AdminProductMgrEE.CatalogCategory catalogCat) throws KKAdminException
priceIn
- the priceIncatalogCat
- the catalogCatKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected int manageIncludeCategoryMap(AdminProductMgrEE.CatalogCategory cc, java.util.HashMap<java.lang.Integer,AdminProductMgrEE.CatalogCategory> includeCategoryMap, boolean include)
cc
- the ccincludeCategoryMap
- the includeCategoryMapinclude
- the includepublic void addCatalogRules(java.lang.String catalogId, AdminCatalogRule[] rules) throws java.lang.Exception
addCatalogRules
in interface AdminProductMgrIf
addCatalogRules
in class AdminProductMgr
catalogId
- the catalogIdrules
- the rulesjava.lang.Exception
- an unexpected exceptionpublic AdminCatalogRule[] getCatalogRules(java.lang.String catalogId) throws java.lang.Exception
getCatalogRules
in interface AdminProductMgrIf
getCatalogRules
in class AdminProductMgr
catalogId
- The alphanumeric catalog identifierjava.lang.Exception
- an unexpected exceptionprotected java.lang.String priceListToString(java.util.ArrayList<AdminProductMgrEE.ProductPrice> prodPriceList)
prodPriceList
- the prodPriceListprotected int insertProductPrices(java.util.ArrayList<AdminProductMgrEE.ProductPrice> prodPriceList, com.konakart.db.KKCriteria insertC) throws java.lang.Exception
prodPriceList
- the prodPriceListinsertC
- the insertCjava.lang.Exception
- an unexpected exceptionprotected int insertProductPriceForCatalog(AdminProductMgrEE.ProductPrice prodPrice, int type, com.konakart.db.KKCriteria insertC) throws org.apache.torque.TorqueException, KKAdminException
prodPrice
- the prodPricetype
- the typeinsertC
- the insertCorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic java.lang.String getPriceTypeDesc(int priceType)
priceType
- the priceTypepublic void deleteProducts(AdminCommonOptions options) throws java.lang.Exception
deleteProducts
in interface AdminProductMgrIf
deleteProducts
in class AdminProductMgr
options
- An AdminCommonOptions object. Set the ids of the products to delete in the ids
attribute.java.lang.Exception
- an unexpected exceptionpublic int insertProductWithOptions(AdminProduct product, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
insertProductWithOptions
in interface AdminProductMgrIf
insertProductWithOptions
in class AdminProductMgr
product
- the productmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionpublic void editProductWithOptions(AdminProduct product, AdminProductMgrOptions mgrOptions) throws java.lang.Exception
editProductWithOptions
in interface AdminProductMgrIf
editProductWithOptions
in class AdminProductMgr
product
- the productmgrOptions
- the mgrOptionsjava.lang.Exception
- an unexpected exceptionpublic void deleteProduct(int productId) throws java.lang.Exception
deleteProduct
in interface AdminProductMgrIf
deleteProduct
in class AdminProductMgr
productId
- the productIdjava.lang.Exception
- an unexpected exceptionprotected java.lang.String getCustomAttrs(int productId) throws java.lang.Exception
getCustomAttrs
in class AdminProductMgr
productId
- the productIdjava.lang.Exception
- an unexpected exceptionprotected java.lang.String getCustomAttrs(int productId, java.sql.Connection con) throws java.lang.Exception
getCustomAttrs
in class AdminProductMgr
productId
- the productIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected java.lang.String encodeOptionValues(java.lang.String variantCode)
protected void processPrice(AdminProductPrice price, java.sql.Connection con) throws java.lang.Exception
price
- the pricecon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected boolean doesVariantPriceExist(int productId, java.lang.String encodedOptionValues, java.lang.String variantCode, java.sql.Connection con) throws org.apache.torque.TorqueException, KKAdminException
productId
- the productIdencodedOptionValues
- the encodedOptionValuesvariantCode
- the variantCodecon
- the conorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected AdminProductPrice getProductBasePrice(int productId, java.lang.String catalogId, java.sql.Connection conn) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
Copyright © 2018 DS Data Systems UK Ltd.