com.konakartadmin.blif
Interface AdminPromotionMgrIf

All Known Implementing Classes:
AdminPromotionMgr

public interface AdminPromotionMgrIf

AdminPromotionMgrIf


Method Summary
 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 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
 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
 

Method Detail

getCustomersCountWhoHaventPlacedAnOrderSince

int getCustomersCountWhoHaventPlacedAnOrderSince(java.util.Calendar lastOrderDate)
                                                 throws KKAdminException,
                                                        org.apache.torque.TorqueException,
                                                        com.workingdogs.village.DataSetException
Return the count of the number of customers who haven't placed an order since the lastOrderDate passed in as a parameter.

Parameters:
lastOrderDate -
Returns:
The customer count
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getCustomersCountWhoHavePlacedAnOrderSince

int getCustomersCountWhoHavePlacedAnOrderSince(java.util.Calendar lastOrderDate)
                                               throws KKAdminException,
                                                      org.apache.torque.TorqueException,
                                                      com.workingdogs.village.DataSetException
Return the count of the number of customers who have placed an order since the lastOrderDate passed in as a parameter.

Parameters:
lastOrderDate -
Returns:
The customer count
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

addCustomersToPromotion

void addCustomersToPromotion(java.util.Calendar lastOrderDate,
                             boolean havePlacedOrder,
                             int promotionId,
                             int rule,
                             int maxUse)
                             throws KKAdminException,
                                    org.apache.torque.TorqueException,
                                    com.workingdogs.village.DataSetException
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.

Parameters:
lastOrderDate -
havePlacedOrder - If true we add customers who have placed an order
promotionId -
rule -
maxUse -
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

insertPromotion

int insertPromotion(AdminPromotion prom)
                    throws java.lang.Exception
Insert the promotion passed in as a parameter.

Parameters:
prom -
Returns:
Returns the id of the inserted promotion
Throws:
java.lang.Exception

insertCoupon

int insertCoupon(AdminCoupon coupon)
                 throws java.lang.Exception
Inserts a coupon

Parameters:
coupon -
Returns:
Returns the id of the inserted coupon
Throws:
java.lang.Exception

insertCoupon

int insertCoupon(AdminCoupon coupon,
                 int promotionId)
                 throws java.lang.Exception
Inserts a coupon and also a record in the promotion_to_coupon table to associate the coupon to a promotion

Parameters:
coupon -
promotionId -
Returns:
Returns the id of the inserted coupon
Throws:
java.lang.Exception

deletePromotion

void deletePromotion(int promotionId)
                     throws java.lang.Exception
Delete the promotion referenced to by promotionId.

Parameters:
promotionId -
Throws:
java.lang.Exception

deleteCoupon

void deleteCoupon(int couponId)
                  throws org.apache.torque.TorqueException
The coupon is deleted along with any entries in the promotion to coupon table.

Parameters:
couponId -
Throws:
org.apache.torque.TorqueException

editPromotion

void editPromotion(AdminPromotion promotion)
                   throws java.lang.Exception
Edits the promotion

Parameters:
promotion -
Throws:
java.lang.Exception

editCoupon

void editCoupon(AdminCoupon coupon)
                throws java.lang.Exception
Edits the coupon

Parameters:
coupon -
Throws:
java.lang.Exception

getPromotion

AdminPromotion getPromotion(int id,
                            boolean includeCoupons,
                            boolean includeStats)
                            throws org.apache.torque.TorqueException,
                                   com.workingdogs.village.DataSetException
Get a promotion object and an array of associated coupon objects

Parameters:
id -
includeCoupons - If true we add a coupon array to the promotion if any coupons exist
includeStats - If true we calculate how many manufacturers, products, categories, customers, expressions and coupons are included or excluded from the promotion
Returns:
Returns an AdminPromotion object with an array of coupons if applicable
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getCouponsPerPromotion

AdminCoupon[] getCouponsPerPromotion(int promotionId)
                                     throws org.apache.torque.TorqueException,
                                            com.workingdogs.village.DataSetException
Get an array of Admin coupon objects for a promotion

Parameters:
promotionId -
Returns:
Returns an array of AdminCoupon objects
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getProductsPerPromotion

AdminProducts getProductsPerPromotion(AdminProductSearch search,
                                      int offset,
                                      int size)
                                      throws java.lang.Exception
Get an array of Admin product objects for a promotion. The AdminProductSearch object must have the promotionId set to a valid promotion.

Parameters:
search -
offset -
size -
Returns:
Returns an AdminProducts objects
Throws:
java.lang.Exception

getGiftCertificatesPerPromotion

AdminProducts getGiftCertificatesPerPromotion(AdminProductSearch search,
                                              int offset,
                                              int size)
                                              throws java.lang.Exception
Get an array of Admin product gift certificate objects for a promotion. The AdminProductSearch object must have the promotionId set to a valid promotion.

Parameters:
search -
offset -
size -
Returns:
Returns an AdminProducts objects
Throws:
java.lang.Exception

getPromotionsPerCoupon

AdminPromotion[] getPromotionsPerCoupon(int couponId)
                                        throws org.apache.torque.TorqueException,
                                               com.workingdogs.village.DataSetException
Get an array of Admin promotion objects for a coupon

Parameters:
couponId -
Returns:
Returns an array of AdminPromotion objects
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getPromotions

AdminPromotionSearchResult getPromotions(AdminPromotionSearch search,
                                         int offset,
                                         int size)
                                         throws org.apache.torque.TorqueException,
                                                com.workingdogs.village.DataSetException
Returns an AdminPromotionSearchResult object.

Parameters:
search -
offset -
size -
Returns:
Returns an AdminPromotionSearchResult object
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getCoupons

AdminCouponSearchResult getCoupons(AdminCouponSearch search,
                                   int offset,
                                   int size)
                                   throws org.apache.torque.TorqueException,
                                          com.workingdogs.village.DataSetException
Returns an AdminCouponSearchResult object.

Parameters:
search -
offset -
size -
Returns:
Returns an AdminCouponSearchResult object
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

addCustomersToPromotion

void addCustomersToPromotion(AdminCustomer[] customers,
                             int promotionId,
                             int rule,
                             int maxUse)
                             throws org.apache.torque.TorqueException
Add the array of customers to the promotion

Parameters:
customers -
promotionId -
rule -
maxUse - -1 for unlimited use
Throws:
org.apache.torque.TorqueException

addCustomerGroupsToPromotion

void addCustomerGroupsToPromotion(int[] groupIds,
                                  int promotionId,
                                  int rule)
                                  throws java.lang.Exception
Add customers to the promotion belonging to the groups in the array of group ids.

Parameters:
groupIds -
promotionId -
rule -
Throws:
java.lang.Exception

addManufacturersToPromotion

void addManufacturersToPromotion(AdminManufacturer[] manufacturers,
                                 int promotionId,
                                 int rule)
                                 throws org.apache.torque.TorqueException
Add the array of manufacturers to the promotion

Parameters:
manufacturers -
promotionId -
rule -
Throws:
org.apache.torque.TorqueException

addExpressionsToPromotion

void addExpressionsToPromotion(AdminExpression[] expressions,
                               int promotionId)
                               throws org.apache.torque.TorqueException
Add the array of expressions to the promotion

Parameters:
expressions -
promotionId -
Throws:
org.apache.torque.TorqueException

addCategoriesToPromotion

void addCategoriesToPromotion(AdminCategory[] categories,
                              int promotionId,
                              int rule)
                              throws org.apache.torque.TorqueException
Add the array of categories to the promotion

Parameters:
categories -
promotionId -
rule -
Throws:
org.apache.torque.TorqueException

addProductsToPromotion

void addProductsToPromotion(AdminProduct[] products,
                            int promotionId,
                            int rule)
                            throws org.apache.torque.TorqueException
Add the array of products to the promotion. Each product may have an array of options. When this array exists, we only add those particular options to the promotion. Otherwise we set the option and option value ids to -1.

Parameters:
products -
promotionId -
rule -
Throws:
org.apache.torque.TorqueException

removeCustomersFromPromotion

void removeCustomersFromPromotion(AdminCustomer[] customers,
                                  int promotionId)
                                  throws org.apache.torque.TorqueException
Remove an array of customers from the promotion

Parameters:
customers -
promotionId -
Throws:
org.apache.torque.TorqueException

removeManufacturersFromPromotion

void removeManufacturersFromPromotion(AdminManufacturer[] manufacturers,
                                      int promotionId)
                                      throws org.apache.torque.TorqueException
Remove an array of manufacturers from the promotion

Parameters:
manufacturers -
promotionId -
Throws:
org.apache.torque.TorqueException

removeExpressionsFromPromotion

void removeExpressionsFromPromotion(AdminExpression[] expressions,
                                    int promotionId)
                                    throws org.apache.torque.TorqueException
Remove an array of expressions from the promotion

Parameters:
expressions -
promotionId -
Throws:
org.apache.torque.TorqueException

removeCategoriesFromPromotion

void removeCategoriesFromPromotion(AdminCategory[] categories,
                                   int promotionId)
                                   throws org.apache.torque.TorqueException
Remove an array of categories from the promotion

Parameters:
categories -
promotionId -
Throws:
org.apache.torque.TorqueException

removeCustomerGroupsFromPromotion

void removeCustomerGroupsFromPromotion(int[] groupIds,
                                       int promotionId)
                                       throws org.apache.torque.TorqueException
Remove an array of groupIds from the promotion

Parameters:
groupIds -
promotionId -
Throws:
org.apache.torque.TorqueException

removeProductsFromPromotion

void removeProductsFromPromotion(AdminProduct[] products,
                                 int promotionId)
                                 throws org.apache.torque.TorqueException
Remove an array of products from the promotion

Parameters:
products -
promotionId -
Throws:
org.apache.torque.TorqueException

removeCouponsFromPromotion

void removeCouponsFromPromotion(AdminCoupon[] coupons,
                                int promotionId)
                                throws org.apache.torque.TorqueException
Remove an array of coupons from the promotion

Parameters:
coupons -
promotionId -
Throws:
org.apache.torque.TorqueException

removePromotionsFromCoupon

void removePromotionsFromCoupon(AdminPromotion[] promotions,
                                int couponId)
                                throws org.apache.torque.TorqueException
Remove an array of promotions from the coupon

Parameters:
promotions -
couponId -
Throws:
org.apache.torque.TorqueException

addCouponsToPromotion

void addCouponsToPromotion(AdminCoupon[] coupons,
                           int promotionId)
                           throws org.apache.torque.TorqueException
Add the array of coupons to the promotion. We assume that the coupon has already been inserted.

Parameters:
coupons -
promotionId -
Throws:
org.apache.torque.TorqueException

addPromotionsToCoupon

void addPromotionsToCoupon(AdminPromotion[] promotions,
                           int couponId)
                           throws org.apache.torque.TorqueException
Add the array of promotions to the coupon.

Parameters:
promotions -
couponId -
Throws:
org.apache.torque.TorqueException

getPromotionsCount

int getPromotionsCount(AdminPromotionSearch search)
                       throws org.apache.torque.TorqueException,
                              com.workingdogs.village.DataSetException
Returns a count of the number of Promotions

Parameters:
search - Search criteria
Returns:
A count of the number of Promotions
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getCouponsCount

int getCouponsCount(AdminCouponSearch search)
                    throws org.apache.torque.TorqueException,
                           com.workingdogs.village.DataSetException
Returns a count of the number of Coupons

Parameters:
search - Search criteria
Returns:
A count of the number of Coupons
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

refreshConfigs

void refreshConfigs()
                    throws java.lang.Exception
Refresh the configuration of the Admin Currency Manager

Throws:
java.lang.Exception

getPromotionIdForGiftCertificate

int getPromotionIdForGiftCertificate(AdminOrderProduct op)
                                     throws KKAdminException,
                                            org.apache.torque.TorqueException,
                                            com.workingdogs.village.DataSetException
Get the promotion id for an order product object containing a gift certificate. A negative id is returned if a promotion doesn't exist.

Parameters:
op -
Returns:
Returns the id of the promotion or -1 if a promotion doesn't exist.
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

removeGiftCertificatesFromPromotion

void removeGiftCertificatesFromPromotion(AdminProduct[] giftCertificates,
                                         int promotionId)
                                         throws org.apache.torque.TorqueException
Remove an array of gift certificates from the promotion. All gift certificates are removed if the array is set to null.

Parameters:
giftCertificates -
promotionId -
Throws:
org.apache.torque.TorqueException

addGiftCertificatesToPromotion

void addGiftCertificatesToPromotion(AdminProduct[] giftCertificates,
                                    int promotionId)
                                    throws org.apache.torque.TorqueException
Associates the gift certificate products with the promotion. The products may have an array of options. When this array exists, we only add those particular options to the promotion. Otherwise we set the option and option value ids to -1.

Parameters:
giftCertificates -
promotionId -
Throws:
org.apache.torque.TorqueException


Copyright © 2011 DS Data Systems UK Ltd.