public interface AdminPromotionMgrIf
Modifier and Type | Method and Description |
---|---|
void |
addCategoriesToPromotion(AdminCategory[] categories,
int promotionId,
int rule)
Add the array of categories to the promotion
|
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.
|
void |
addPromotionsToCoupon(AdminPromotion[] promotions,
int couponId)
Add the array of promotions to the coupon.
|
void |
deleteCoupon(int couponId)
The coupon is deleted along with any entries in the promotion to coupon table.
|
void |
deletePromotion(int promotionId)
Delete the promotion referenced to by promotionId.
|
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
|
AdminCouponSearchResult |
getCoupons(AdminCouponSearch search,
int offset,
int size)
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.
|
AdminProducts |
getProductsPerPromotion(AdminProductSearch search,
int offset,
int size)
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.
|
AdminPromotionSearchResult |
getPromotions(AdminPromotionSearch search,
int offset,
int size)
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.
|
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
|
int |
insertPromotion(AdminPromotion prom)
Insert the promotion passed in as a parameter.
|
void |
refreshConfigs()
Refresh the configuration of the Admin Currency 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
|
void |
removePromotionsFromCoupon(AdminPromotion[] promotions,
int couponId)
Remove an array of promotions from the coupon
|
int getCustomersCountWhoHaventPlacedAnOrderSince(java.util.Calendar lastOrderDate) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
lastOrderDate
- the lastOrderDateKKAdminException
- an 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)int getCustomersCountWhoHavePlacedAnOrderSince(java.util.Calendar lastOrderDate) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
lastOrderDate
- the lastOrderDateKKAdminException
- an 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)void addCustomersToPromotion(java.util.Calendar lastOrderDate, boolean havePlacedOrder, int promotionId, int rule, int maxUse) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
lastOrderDate
- the lastOrderDatehavePlacedOrder
- If true we add customers who have placed an orderpromotionId
- the promotionIdrule
- the rulemaxUse
- the maxUseKKAdminException
- an 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)int insertPromotion(AdminPromotion prom) throws java.lang.Exception
prom
- the promjava.lang.Exception
- an unexpected exceptionint insertCoupon(AdminCoupon coupon) throws java.lang.Exception
coupon
- the couponjava.lang.Exception
- an unexpected exceptionint insertCoupon(AdminCoupon coupon, int promotionId) throws java.lang.Exception
coupon
- the couponpromotionId
- the promotionIdjava.lang.Exception
- an unexpected exceptionvoid deletePromotion(int promotionId) throws java.lang.Exception
promotionId
- the promotionIdjava.lang.Exception
- an unexpected exceptionvoid deletePromotionWithOptions(int promotionId, AdminDeletePromotionOptions options) throws java.lang.Exception
promotionId
- the promotionIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionvoid deleteCoupon(int couponId) throws org.apache.torque.TorqueException
couponId
- the couponIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void editPromotion(AdminPromotion promotion) throws java.lang.Exception
promotion
- the promotionjava.lang.Exception
- an unexpected exceptionvoid editCoupon(AdminCoupon coupon) throws java.lang.Exception
coupon
- the couponjava.lang.Exception
- an unexpected exceptionAdminPromotion getPromotion(int id, boolean includeCoupons, boolean includeStats) throws java.lang.Exception
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 exceptionAdminCoupon[] getCouponsPerPromotion(int promotionId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
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)AdminProducts getProductsPerPromotion(AdminProductSearch search, int offset, int size) throws java.lang.Exception
search
- the searchoffset
- the offsetsize
- the sizejava.lang.Exception
- an unexpected exceptionAdminProducts getGiftCertificatesPerPromotion(AdminProductSearch search, int offset, int size) throws java.lang.Exception
search
- the searchoffset
- the offsetsize
- the sizejava.lang.Exception
- an unexpected exceptionAdminPromotion[] getPromotionsPerCoupon(int couponId) throws java.lang.Exception
couponId
- the couponIdjava.lang.Exception
- an unexpected exceptionAdminPromotionSearchResult getPromotions(AdminPromotionSearch search, int offset, int size) throws java.lang.Exception
search
- the searchoffset
- the offsetsize
- the sizejava.lang.Exception
- an unexpected exceptionAdminCouponSearchResult getCoupons(AdminCouponSearch search, int offset, int size) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
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)void addCustomersToPromotion(AdminCustomer[] customers, int promotionId, int rule, int maxUse) throws org.apache.torque.TorqueException
customers
- the customerspromotionId
- the promotionIdrule
- the rulemaxUse
- -1 for unlimited useorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void addCustomerGroupsToPromotion(int[] groupIds, int promotionId, int rule) throws java.lang.Exception
groupIds
- the groupIdspromotionId
- the promotionIdrule
- the rulejava.lang.Exception
- an unexpected exceptionvoid addManufacturersToPromotion(AdminManufacturer[] manufacturers, int promotionId, int rule) throws org.apache.torque.TorqueException, KKAdminException
manufacturers
- the manufacturerspromotionId
- the promotionIdrule
- the ruleorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid addExpressionsToPromotion(AdminExpression[] expressions, int promotionId) throws org.apache.torque.TorqueException, KKAdminException
expressions
- the expressionspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid addCategoriesToPromotion(AdminCategory[] categories, int promotionId, int rule) throws org.apache.torque.TorqueException
categories
- the categoriespromotionId
- the promotionIdrule
- the ruleorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void addProductsToPromotion(AdminProduct[] products, int promotionId, int rule) throws org.apache.torque.TorqueException, KKAdminException
products
- the productspromotionId
- the promotionIdrule
- the ruleorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid removeCustomersFromPromotion(AdminCustomer[] customers, int promotionId) throws org.apache.torque.TorqueException
customers
- the customerspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void removeManufacturersFromPromotion(AdminManufacturer[] manufacturers, int promotionId) throws org.apache.torque.TorqueException
manufacturers
- the manufacturerspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void removeExpressionsFromPromotion(AdminExpression[] expressions, int promotionId) throws org.apache.torque.TorqueException, KKAdminException
expressions
- the expressionspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KKAdmin enginevoid removeCategoriesFromPromotion(AdminCategory[] categories, int promotionId) throws org.apache.torque.TorqueException
categories
- the categoriespromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void removeCustomerGroupsFromPromotion(int[] groupIds, int promotionId) throws org.apache.torque.TorqueException
groupIds
- the groupIdspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void removeProductsFromPromotion(AdminProduct[] products, int promotionId) throws org.apache.torque.TorqueException
products
- the productspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void removeCouponsFromPromotion(AdminCoupon[] coupons, int promotionId) throws org.apache.torque.TorqueException
coupons
- the couponspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void removePromotionsFromCoupon(AdminPromotion[] promotions, int couponId) throws org.apache.torque.TorqueException
promotions
- the promotionscouponId
- the couponIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void addCouponsToPromotion(AdminCoupon[] coupons, int promotionId) throws org.apache.torque.TorqueException
coupons
- the couponspromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void addPromotionsToCoupon(AdminPromotion[] promotions, int couponId) throws org.apache.torque.TorqueException
promotions
- the promotionscouponId
- the couponIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)int getPromotionsCount(AdminPromotionSearch search) throws java.lang.Exception
search
- Search criteriajava.lang.Exception
- an unexpected exceptionint getCouponsCount(AdminCouponSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
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)void refreshConfigs() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionint getPromotionIdForGiftCertificate(AdminOrderProduct op) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
op
- the opKKAdminException
- an 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)void removeGiftCertificatesFromPromotion(AdminProduct[] giftCertificates, int promotionId) throws org.apache.torque.TorqueException
giftCertificates
- the giftCertificatespromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void addGiftCertificatesToPromotion(AdminProduct[] giftCertificates, int promotionId) throws org.apache.torque.TorqueException, KKAdminException
giftCertificates
- the giftCertificatespromotionId
- the promotionIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginejava.util.Calendar getStoreTime() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.