public class AdminPromotionMgr extends AdminBaseMgr implements AdminPromotionMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
AdminPromotionMgr.StaticData
Used to store the static data of this manager
|
Modifier and Type | Field and Description |
---|---|
static int |
ALL
Constant for Promotion Rule
|
static int |
EXCLUDE
Constant for Promotion Rule
|
protected static int |
GIFT_CERTIFICATE_RELATION_TYPE
Constant for Promotion To Product Relation
|
static int |
INCLUDE
Constant for Promotion Rule
|
protected static org.apache.commons.logging.Log |
log
the log
|
protected static java.lang.String |
mutex
mutex
|
protected static int |
PROMOTION_RELATION_TYPE
Constant for Promotion To Product Relation
|
protected static java.util.Map<java.lang.String,AdminPromotionMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminPromotionMgr(KKAdminIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addCategoriesToPromotion(AdminCategory[] categories,
int promotionId,
int rule)
Add the array of categories to the promotion
|
protected void |
addCouponOrderBy(com.konakart.db.KKCriteria c,
AdminCouponSearch search)
Add order by constraints to query
|
protected int |
addCouponSearchCriteria(com.konakart.db.KKCriteria c,
AdminCouponSearch couponSearch)
Add search criteria to query
|
void |
addCouponsToPromotion(AdminCoupon[] coupons,
int promotionId)
Add the array of coupons to the promotion.
|
void |
addCustomerGroupsToPromotion(int[] groupIds,
int promotionId,
int rule)
Add customers to the promotion belonging to the groups in the array of group ids.
|
void |
addCustomersToPromotion(AdminCustomer[] customers,
int promotionId,
int rule,
int maxUse)
Add the array of customers to the promotion
|
void |
addCustomersToPromotion(java.util.Calendar lastOrderDate,
boolean havePlacedOrder,
int promotionId,
int rule,
int maxUse)
Add to the promotion identified by promotionId, the customers who have or haven't placed an
order since the lastOrderDate passed in as a parameter.
|
void |
addExpressionsToPromotion(AdminExpression[] expressions,
int promotionId)
Add the array of expressions to the promotion
|
void |
addGiftCertificatesToPromotion(AdminProduct[] giftCertificates,
int promotionId)
Associates the gift certificate products with the promotion.
|
void |
addManufacturersToPromotion(AdminManufacturer[] manufacturers,
int promotionId,
int rule)
Add the array of manufacturers to the promotion
|
void |
addProductsToPromotion(AdminProduct[] products,
int promotionId,
int rule)
Add the array of products to the promotion.
|
protected void |
addProductsToPromotion(AdminProduct[] products,
int promotionId,
int rule,
boolean giftCertificate)
Add the array of products to the promotion.
|
protected void |
addPromotionOrderBy(com.konakart.db.KKCriteria c,
AdminPromotionSearch search)
Add order by constraints to query
|
protected int |
addPromotionSearchCriteria(com.konakart.db.KKCriteria c,
AdminPromotionSearch promSearch)
Add search criteria to query
|
void |
addPromotionsToCoupon(AdminPromotion[] promotions,
int couponId)
Add the array of promotions to the coupon.
|
protected void |
addTestExpressionToPromotion(int promotionId)
Adds the promotion test expression to the promotion.
|
void |
deleteCoupon(int couponId)
The coupon is deleted along with any entries in the promotion to coupon table.
|
protected void |
deleteCouponsPerPromotion(int promotionId)
If a coupon belongs to only this promotion it is deleted, otherwise just the entry in the
promotion to products table is deleted
|
void |
deletePromotion(int promotionId)
Delete the promotion referenced to by promotionId.
|
protected void |
deletePromotionCommonCode(int promotionId,
com.konakart.db.KKCriteria deleteC,
java.sql.Connection con)
Method to avoid code duplication
|
void |
deletePromotionWithOptions(int promotionId,
AdminDeletePromotionOptions options)
Delete the promotion referenced to by promotionId.
|
void |
editCoupon(AdminCoupon coupon)
Edits the coupon
|
void |
editPromotion(AdminPromotion promotion)
Edits the promotion
|
protected int |
getCount(com.konakart.db.KKCriteria c)
This method is mainly used for paging.
|
AdminCouponSearchResult |
getCoupons(AdminCouponSearch search,
int offset,
int size)
This returns an AdminCouponSearchResult object.
|
int |
getCouponsCount(AdminCouponSearch search)
Returns a count of the number of Coupons
|
AdminCoupon[] |
getCouponsPerPromotion(int promotionId)
Get an array of Admin coupon objects for a promotion
|
int |
getCustomersCountWhoHaventPlacedAnOrderSince(java.util.Calendar lastOrderDate)
Return the count of the number of customers who haven't placed an order since the
lastOrderDate passed in as a parameter.
|
int |
getCustomersCountWhoHavePlacedAnOrderSince(java.util.Calendar lastOrderDate)
Return the count of the number of customers who have placed an order since the lastOrderDate
passed in as a parameter.
|
AdminProducts |
getGiftCertificatesPerPromotion(AdminProductSearch search,
int offset,
int size)
Get an array of Admin product gift certificate objects for a promotion.
|
protected AdminOption[] |
getProductOptionsPerProductAndPromotion(int promotionId,
int productId,
boolean giftCertificate)
We return an array of AminOption objects for every product option and value in the promotion.
|
AdminProducts |
getProductsPerPromotion(AdminProductSearch search,
int offset,
int size)
Get an array of Admin product objects for a promotion.
|
protected AdminProducts |
getProductsPerPromotion(AdminProductSearch search,
int offset,
int size,
boolean giftCertificate)
Get an array of Admin product objects for a promotion.
|
AdminPromotion |
getPromotion(int id,
boolean includeCoupons,
boolean includeStats)
Get a promotion object and an array of associated coupon objects
|
int |
getPromotionIdForGiftCertificate(AdminOrderProduct op)
Get the promotion id for an order product object containing a gift certificate.
|
protected int |
getPromotionIdForGiftCertificate(int productId,
int productOptionId,
int productOptionValueId)
Protected method for common code to get the promotion id of a promotion connected to a gift
certificate.
|
AdminPromotionSearchResult |
getPromotions(AdminPromotionSearch search,
int offset,
int size)
This returns an AdminPromotionSearchResult object.
|
int |
getPromotionsCount(AdminPromotionSearch search)
Returns a count of the number of Promotions
|
AdminPromotion[] |
getPromotionsPerCoupon(int couponId)
Get an array of Admin promotion objects for a coupon
|
java.util.Calendar |
getStoreTime()
Returns the local store time based on the tz database time zone of the store.
|
protected int |
getTestExpressionId() |
int |
insertCoupon(AdminCoupon coupon)
Inserts a coupon
|
int |
insertCoupon(AdminCoupon coupon,
int promotionId)
Inserts a coupon and also a record in the promotion_to_coupon table to associate the coupon
to a promotion
|
protected int |
insertCoupon(AdminCoupon coupon,
int promotionId,
java.sql.Connection connection)
Inserts a coupon and also a record in the promotion_to_coupon table to associate the coupon
to a promotion
|
int |
insertPromotion(AdminPromotion prom)
Insert the promotion passed in as a parameter.
|
void |
refreshConfigs()
Refresh the configuration of the Admin Promotion Manager
|
void |
removeCategoriesFromPromotion(AdminCategory[] categories,
int promotionId)
Remove an array of categories from the promotion
|
void |
removeCouponsFromPromotion(AdminCoupon[] coupons,
int promotionId)
Remove an array of coupons from the promotion
|
void |
removeCustomerGroupsFromPromotion(int[] groupIds,
int promotionId)
Remove an array of groupIds from the promotion
|
void |
removeCustomersFromPromotion(AdminCustomer[] customers,
int promotionId)
Remove an array of customers from the promotion
|
void |
removeExpressionsFromPromotion(AdminExpression[] expressions,
int promotionId)
Remove an array of expressions from the promotion
|
void |
removeGiftCertificatesFromPromotion(AdminProduct[] giftCertificates,
int promotionId)
Remove an array of gift certificates from the promotion.
|
void |
removeManufacturersFromPromotion(AdminManufacturer[] manufacturers,
int promotionId)
Remove an array of manufacturers from the promotion
|
void |
removeProductsFromPromotion(AdminProduct[] products,
int promotionId)
Remove an array of products from the promotion.
|
protected void |
removeProductsFromPromotion(AdminProduct[] products,
int promotionId,
boolean giftCertificate)
Remove an array of products from the promotion
|
void |
removePromotionsFromCoupon(AdminPromotion[] promotions,
int couponId)
Remove an array of promotions from the coupon
|
protected void |
removeTestExpressionFromPromotion(int promotionId)
Removes the promotion test expression from the promotion.
|
protected com.konakart.db.KKCriteria |
setAllCouponAttrs(com.konakart.db.KKCriteria c)
Set all coupon attributes on the criteria object
|
protected com.konakart.db.KKCriteria |
setAllPromotionAttrs(com.konakart.db.KKCriteria c)
Sets all promotion attributes on the criteria object
|
protected void |
validateCoupon(AdminCoupon coupon)
Used to validate a coupon before editing or inserting
|
protected void |
validatePromotion(AdminPromotion prom)
Used to validate a promotion before editing or inserting
|
addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkAPICallEnabled, checkIntInRange, checkIntIsSet, checkRequired, executeQuery, executeQuery, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminContentMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustPwdHistMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminEngineCacheMgr, getAdminEventMgr, getAdminExecuteMgr, getAdminFileMgr, getAdminFilterMgr, getAdminHtmlMgr, getAdminImportMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminMiscPriceMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminServletMgr, getAdminShipmentMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminSuggestionMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getDebugStackTraceExclusions, getEmailThreadGracefulShutdownTimeout, getExportMgr, getExportMgr, getExportXMLData, getIntFromString, getKkAdminPropsFilePath, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getNewCriteria, getNewCriteria, getOtherModuleByName, getPostSearchText, getPreSearchText, getProductsToCategoresCriteria, getPropertyValue, getPropertyValue, getPropertyValueAsBool, getPropertyValueAsInt, getPropertyValueAsLong, getRecordCount, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isCommunity, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, isUnix, isWindows, manageException, manageThrowable, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNow
protected static org.apache.commons.logging.Log log
public static final int ALL
public static final int EXCLUDE
public static final int INCLUDE
protected static final int PROMOTION_RELATION_TYPE
protected static final int GIFT_CERTIFICATE_RELATION_TYPE
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,AdminPromotionMgr.StaticData> staticDataHM
public AdminPromotionMgr(KKAdminIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic int getCustomersCountWhoHaventPlacedAnOrderSince(java.util.Calendar lastOrderDate) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCustomersCountWhoHaventPlacedAnOrderSince
in interface AdminPromotionMgrIf
lastOrderDate
- the lastOrderDateKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.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 int getCustomersCountWhoHavePlacedAnOrderSince(java.util.Calendar lastOrderDate) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCustomersCountWhoHavePlacedAnOrderSince
in interface AdminPromotionMgrIf
lastOrderDate
- the lastOrderDateKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.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 addCustomersToPromotion(java.util.Calendar lastOrderDate, boolean havePlacedOrder, int promotionId, int rule, int maxUse) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
addCustomersToPromotion
in interface AdminPromotionMgrIf
lastOrderDate
- the lastOrderDatehavePlacedOrder
- If true we add customers who have placed an orderpromotionId
- the promotionIdrule
- the rulemaxUse
- the maxUseKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.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 int insertPromotion(AdminPromotion prom) throws java.lang.Exception
AdminPromotionMgrIf
insertPromotion
in interface AdminPromotionMgrIf
prom
- the promjava.lang.Exception
- an unexpected exceptionpublic int insertCoupon(AdminCoupon coupon) throws java.lang.Exception
insertCoupon
in interface AdminPromotionMgrIf
coupon
- the couponjava.lang.Exception
- an unexpected exceptionpublic int insertCoupon(AdminCoupon coupon, int promotionId) throws java.lang.Exception
insertCoupon
in interface AdminPromotionMgrIf
coupon
- the couponpromotionId
- the promotionIdjava.lang.Exception
- an unexpected exceptionprotected int insertCoupon(AdminCoupon coupon, int promotionId, java.sql.Connection connection) throws java.lang.Exception
coupon
- the couponpromotionId
- the promotionIdconnection
- Is set to null if the insert isn't part of a bigger transactionjava.lang.Exception
- an unexpected exceptionpublic void deletePromotion(int promotionId) throws java.lang.Exception
deletePromotion
in interface AdminPromotionMgrIf
promotionId
- the promotionIdjava.lang.Exception
- an unexpected exceptionpublic void deletePromotionWithOptions(int promotionId, AdminDeletePromotionOptions options) throws java.lang.Exception
deletePromotionWithOptions
in interface AdminPromotionMgrIf
promotionId
- the promotionIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionprotected void deletePromotionCommonCode(int promotionId, com.konakart.db.KKCriteria deleteC, java.sql.Connection con) throws java.lang.Exception
promotionId
- the promotionIddeleteC
- the deleteCcon
- the conjava.lang.Exception
- an unexpected exceptionprotected void deleteCouponsPerPromotion(int promotionId) throws java.lang.Exception
promotionId
- the promotionIdjava.lang.Exception
- an unexpected exceptionpublic void deleteCoupon(int couponId) throws org.apache.torque.TorqueException
deleteCoupon
in interface AdminPromotionMgrIf
couponId
- the couponIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void editPromotion(AdminPromotion promotion) throws java.lang.Exception
editPromotion
in interface AdminPromotionMgrIf
promotion
- the promotionjava.lang.Exception
- an unexpected exceptionpublic void editCoupon(AdminCoupon coupon) throws java.lang.Exception
editCoupon
in interface AdminPromotionMgrIf
coupon
- the couponjava.lang.Exception
- an unexpected exceptionpublic AdminPromotion getPromotion(int id, boolean includeCoupons, boolean includeStats) throws java.lang.Exception
getPromotion
in interface AdminPromotionMgrIf
id
- the idincludeCoupons
- If true we add a coupon array to the promotion if any coupons existincludeStats
- If true we calculate how many manufacturers, products, categories, customers,
expressions and coupons are included or excluded from the promotionjava.lang.Exception
- an unexpected exceptionpublic AdminCoupon[] getCouponsPerPromotion(int promotionId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCouponsPerPromotion
in interface AdminPromotionMgrIf
promotionId
- the promotionIdorg.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 AdminProducts getProductsPerPromotion(AdminProductSearch search, int offset, int size) throws java.lang.Exception
getProductsPerPromotion
in interface AdminPromotionMgrIf
search
- the searchoffset
- the offsetsize
- the sizejava.lang.Exception
- an unexpected exceptionpublic AdminProducts getGiftCertificatesPerPromotion(AdminProductSearch search, int offset, int size) throws java.lang.Exception
getGiftCertificatesPerPromotion
in interface AdminPromotionMgrIf
search
- the searchoffset
- the offsetsize
- the sizejava.lang.Exception
- an unexpected exceptionprotected AdminProducts getProductsPerPromotion(AdminProductSearch search, int offset, int size, boolean giftCertificate) throws java.lang.Exception
search
- the searchoffset
- the offsetsize
- the sizegiftCertificate
- the giftCertificatejava.lang.Exception
- an unexpected exceptionprotected AdminOption[] getProductOptionsPerProductAndPromotion(int promotionId, int productId, boolean giftCertificate) throws java.lang.Exception
promotionId
- the promotionIdproductId
- the productIdgiftCertificate
- the giftCertificatejava.lang.Exception
- an unexpected Exception exceptionpublic AdminPromotion[] getPromotionsPerCoupon(int couponId) throws java.lang.Exception
getPromotionsPerCoupon
in interface AdminPromotionMgrIf
couponId
- the couponIdjava.lang.Exception
- an unexpected exceptionpublic AdminPromotionSearchResult getPromotions(AdminPromotionSearch search, int offset, int size) throws java.lang.Exception
getPromotions
in interface AdminPromotionMgrIf
search
- the searchoffset
- the offsetsize
- the sizejava.lang.Exception
- an unexpected exceptionpublic AdminCouponSearchResult getCoupons(AdminCouponSearch search, int offset, int size) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCoupons
in interface AdminPromotionMgrIf
search
- the searchoffset
- the offsetsize
- the sizeorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public void addCustomersToPromotion(AdminCustomer[] customers, int promotionId, int rule, int maxUse) throws org.apache.torque.TorqueException
addCustomersToPromotion
in interface AdminPromotionMgrIf
customers
- the customerspromotionId
- the promotionIdrule
- the rulemaxUse
- -1 for unlimited useorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void addCustomerGroupsToPromotion(int[] groupIds, int promotionId, int rule) throws java.lang.Exception
addCustomerGroupsToPromotion
in interface AdminPromotionMgrIf
groupIds
- the groupIdspromotionId
- the promotionIdrule
- the rulejava.lang.Exception
- an unexpected exceptionpublic void addManufacturersToPromotion(AdminManufacturer[] manufacturers, int promotionId, int rule) throws org.apache.torque.TorqueException, KKAdminException
addManufacturersToPromotion
in interface AdminPromotionMgrIf
manufacturers
- the manufacturerspromotionId
- the promotionIdrule
- the ruleorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void addExpressionsToPromotion(AdminExpression[] expressions, int promotionId) throws org.apache.torque.TorqueException, KKAdminException
addExpressionsToPromotion
in interface AdminPromotionMgrIf
expressions
- the expressionspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void addCategoriesToPromotion(AdminCategory[] categories, int promotionId, int rule) throws org.apache.torque.TorqueException
addCategoriesToPromotion
in interface AdminPromotionMgrIf
categories
- the categoriespromotionId
- the promotionIdrule
- the ruleorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void addProductsToPromotion(AdminProduct[] products, int promotionId, int rule) throws org.apache.torque.TorqueException, KKAdminException
addProductsToPromotion
in interface AdminPromotionMgrIf
products
- the productspromotionId
- the promotionIdrule
- the ruleorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void addGiftCertificatesToPromotion(AdminProduct[] giftCertificates, int promotionId) throws org.apache.torque.TorqueException, KKAdminException
addGiftCertificatesToPromotion
in interface AdminPromotionMgrIf
giftCertificates
- the giftCertificatespromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void addProductsToPromotion(AdminProduct[] products, int promotionId, int rule, boolean giftCertificate) throws org.apache.torque.TorqueException, KKAdminException
products
- the productspromotionId
- the promotionIdrule
- the rulegiftCertificate
- the giftCertificateorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin Enginepublic void removeCustomersFromPromotion(AdminCustomer[] customers, int promotionId) throws org.apache.torque.TorqueException
removeCustomersFromPromotion
in interface AdminPromotionMgrIf
customers
- the customerspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void removeManufacturersFromPromotion(AdminManufacturer[] manufacturers, int promotionId) throws org.apache.torque.TorqueException
removeManufacturersFromPromotion
in interface AdminPromotionMgrIf
manufacturers
- the manufacturerspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void removeExpressionsFromPromotion(AdminExpression[] expressions, int promotionId) throws org.apache.torque.TorqueException, KKAdminException
removeExpressionsFromPromotion
in interface AdminPromotionMgrIf
expressions
- the expressionspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin Enginepublic void removeCategoriesFromPromotion(AdminCategory[] categories, int promotionId) throws org.apache.torque.TorqueException
removeCategoriesFromPromotion
in interface AdminPromotionMgrIf
categories
- the categoriespromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void removeCustomerGroupsFromPromotion(int[] groupIds, int promotionId) throws org.apache.torque.TorqueException
removeCustomerGroupsFromPromotion
in interface AdminPromotionMgrIf
groupIds
- the groupIdspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void removeProductsFromPromotion(AdminProduct[] products, int promotionId) throws org.apache.torque.TorqueException
removeProductsFromPromotion
in interface AdminPromotionMgrIf
products
- the productspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void removeGiftCertificatesFromPromotion(AdminProduct[] giftCertificates, int promotionId) throws org.apache.torque.TorqueException
removeGiftCertificatesFromPromotion
in interface AdminPromotionMgrIf
giftCertificates
- the giftCertificatespromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void removeProductsFromPromotion(AdminProduct[] products, int promotionId, boolean giftCertificate) throws org.apache.torque.TorqueException
products
- the productspromotionId
- the promotionIdgiftCertificate
- the giftCertificateorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void removeCouponsFromPromotion(AdminCoupon[] coupons, int promotionId) throws org.apache.torque.TorqueException
removeCouponsFromPromotion
in interface AdminPromotionMgrIf
coupons
- the couponspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void removePromotionsFromCoupon(AdminPromotion[] promotions, int couponId) throws org.apache.torque.TorqueException
removePromotionsFromCoupon
in interface AdminPromotionMgrIf
promotions
- the promotionscouponId
- the couponIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void addCouponsToPromotion(AdminCoupon[] coupons, int promotionId) throws org.apache.torque.TorqueException
addCouponsToPromotion
in interface AdminPromotionMgrIf
coupons
- the couponspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void addPromotionsToCoupon(AdminPromotion[] promotions, int couponId) throws org.apache.torque.TorqueException
addPromotionsToCoupon
in interface AdminPromotionMgrIf
promotions
- the promotionscouponId
- the couponIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public int getPromotionsCount(AdminPromotionSearch search) throws java.lang.Exception
getPromotionsCount
in interface AdminPromotionMgrIf
search
- Search criteriajava.lang.Exception
- an unexpected exceptionpublic int getCouponsCount(AdminCouponSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCouponsCount
in interface AdminPromotionMgrIf
search
- Search criteriaorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected int getCount(com.konakart.db.KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
c
- the Criteriaorg.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 addPromotionOrderBy(com.konakart.db.KKCriteria c, AdminPromotionSearch search)
c
- the csearch
- the searchprotected void addCouponOrderBy(com.konakart.db.KKCriteria c, AdminCouponSearch search)
c
- the csearch
- the searchprotected int addPromotionSearchCriteria(com.konakart.db.KKCriteria c, AdminPromotionSearch promSearch) throws java.lang.Exception
c
- the cpromSearch
- the promSearchjava.lang.Exception
- an unexpected exceptionprotected int addCouponSearchCriteria(com.konakart.db.KKCriteria c, AdminCouponSearch couponSearch)
c
- the ccouponSearch
- the couponSearchprotected void validatePromotion(AdminPromotion prom) throws KKAdminException
prom
- the promKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void validateCoupon(AdminCoupon coupon) throws KKAdminException
coupon
- the couponKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected com.konakart.db.KKCriteria setAllPromotionAttrs(com.konakart.db.KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
c
- the cjava.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected com.konakart.db.KKCriteria setAllCouponAttrs(com.konakart.db.KKCriteria c)
c
- the cpublic void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface AdminPromotionMgrIf
refreshConfigs
in class AdminBaseMgr
java.lang.Exception
- an unexpected exceptionpublic int getPromotionIdForGiftCertificate(AdminOrderProduct op) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getPromotionIdForGiftCertificate
in interface AdminPromotionMgrIf
op
- the opKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected int getPromotionIdForGiftCertificate(int productId, int productOptionId, int productOptionValueId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
productId
- the productIdproductOptionId
- the productOptionIdproductOptionValueId
- the productOptionValueIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected void addTestExpressionToPromotion(int promotionId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
promotionId
- the promotionIdKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.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 removeTestExpressionFromPromotion(int promotionId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
promotionId
- the promotionIdKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected int getTestExpressionId() throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
KKAdminException
- unexpected exception in the KonaKart Admin Engineorg.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 java.util.Calendar getStoreTime() throws java.lang.Exception
getStoreTime
in interface AdminPromotionMgrIf
java.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.