com.elasticpath.domain.rules.impl
Class PromotionRuleDelegateImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractPersistenceImpl
          extended by com.elasticpath.domain.impl.AbstractValueObjectImpl
              extended by com.elasticpath.domain.rules.impl.PromotionRuleDelegateImpl
All Implemented Interfaces:
EpDomain, Persistence, PromotionRuleDelegate, ValueObject, java.io.Serializable

public class PromotionRuleDelegateImpl
extends AbstractValueObjectImpl
implements PromotionRuleDelegate

This interface provides helper methods that can be invoked from Drools code to make queries on the system. The intent of this interface/implementation is to move as much logic as possible out of the rule code so that the drools code is as simple as possible.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
PromotionRuleDelegateImpl()
          The default constructor.
 
Method Summary
 void applyCartSkuDiscountAmount(ShoppingCart shoppingCart, long ruleId, java.lang.String skuCode, java.lang.String amount, int maxItems, java.lang.String exceptionStr)
          Apply a discount amount to a product in the cart.
 void applyCartSkuDiscountPercent(ShoppingCart shoppingCart, long ruleId, java.lang.String skuCode, java.lang.String percent, int maxItems, java.lang.String exceptionStr)
          Apply a discount amount to a product in the cart.
 void applyCatalogProductDiscountAmount(ShoppingCart shoppingCart, long ruleId, Product product, java.util.Currency currency, java.lang.String amount, java.lang.String exceptionStr)
          Reduces the price of a product by the specified amount.
 void applyCatalogSkuDiscountAmount(ShoppingCart shoppingCart, long ruleId, Product product, java.lang.String skuCode, java.util.Currency currency, java.lang.String amount)
          Reduces the price of a sku by the specified amount.
 void applyCatalogSkuDiscountPercent(ShoppingCart shoppingCart, long ruleId, Product product, java.lang.String skuCode, java.util.Currency currency, java.lang.String percent)
          Reduces the price of a sku by the specified amount.
 void applyNFreeSkus(ShoppingCart shoppingCart, long ruleId, java.lang.String skuCode, int numSkus)
          Add N items of a product to the cart at a zero price.
 void applyNthProductDiscountPercent(ShoppingCart shoppingCart, long ruleId, long productId, java.lang.String percent, int nthItem, java.lang.String exceptionStr)
          Apply a percentage discount to the Nth item of a given product in the cart.
 void applyOrderCategoryDiscountAmount(ShoppingCart shoppingCart, long ruleId, long categoryId, java.lang.String amount, int maxItems, java.lang.String exceptionStr)
          Apply a discount amount to all items in a particular category in the cart.
 void applyOrderCategoryDiscountPercent(ShoppingCart shoppingCart, long ruleId, long categoryId, java.lang.String percent, int maxItems, java.lang.String exceptionStr)
          Apply a percentage discount to all items in a particular category in the cart.
 void applyOrderDiscountAmount(ShoppingCart shoppingCart, long ruleId, java.lang.String amount)
          Reduces the subtotal of the shopping cart by the specified amount.
 void applyOrderDiscountPercent(ShoppingCart shoppingCart, long ruleId, java.lang.String percent)
          Reduces the subtotal of the shopping cart by the specified percent.
 void applyProductDiscountAmount(ShoppingCart shoppingCart, long ruleId, long productId, java.lang.String amount, int maxItems, java.lang.String exceptionStr)
          Apply a discount amount to a product in the cart.
 void applyProductDiscountPercent(ShoppingCart shoppingCart, long ruleId, long productId, java.lang.String percent, int maxItems, java.lang.String exceptionStr)
          Apply a percentage discount to a product in the cart.
 void applyProductDiscountPercent(ShoppingCart shoppingCart, long ruleId, Product product, java.util.Currency currency, java.lang.String percent, java.lang.String exceptionStr)
          Reduces the price of a product by the specified percent.
 void applyShippingDiscountAmount(ShoppingCart shoppingCart, long ruleId, java.lang.String amount, long shippingMethodId)
          Reduces the shipping cost of the shopping cart by the specified amount.
 void applyShippingDiscountPercent(ShoppingCart shoppingCart, long ruleId, java.lang.String percent, long shippingMethodId)
          Reduces the shipping cost of the shopping cart by the specified percent.
 boolean cartContainsItemsOfCategory(ShoppingCart shoppingCart, long categoryId, int numItems, java.lang.String exceptionStr)
          Checks if the shopping cart contains the specified quantity of items of the given product.
 boolean cartContainsProduct(ShoppingCart shoppingCart, long productId, int quantity, java.lang.String exceptionStr)
          Checks if the shopping cart contains the specified quantity of items of the given product.
 boolean cartContainsSku(ShoppingCart shoppingCart, java.lang.String skuCode, int quantity)
          Checks if the shopping cart contains the specified quantity of items with the specified sku code.
 boolean cartCurrencyMatches(ShoppingCart shoppingCart, java.lang.String currencyCode)
          Checks if the currency of a shopping cart matches the specified currency code.
 boolean cartHasPromoCode(ShoppingCart shoppingCart, java.lang.String promoCode)
          Checks if the shopping cart has the specified promo code entered by the user.
 boolean cartSubtotalExceeds(ShoppingCart shoppingCart, java.lang.String amount, java.lang.String exceptionStr)
          Checks if the shopping cart subtotal exceeds the specified amount.
 boolean catalogBrandIs(Product product, boolean isBrand, java.lang.String brandCode, java.lang.String exceptionStr)
          Returns true if the given product is/is not of the specified brand.
 boolean catalogProductInCategory(Product product, boolean isIn, long categoryUid, java.lang.String exceptionStr)
          Checks if the given product is in the category with the specified categoryID.
 boolean catalogProductIs(Product product, boolean isProduct, long productUid, java.lang.String exceptionStr)
          Returns true if the given product is/is not the product with the specified Id.
 boolean checkDateRange(java.lang.String startDateString, java.lang.String endDateString)
          Checks that the current date is between the specified dates.
 boolean customerInGroup(ShoppingCart shoppingCart, long customerGroup)
          Checks if the customer is in the specified customer group.
 boolean isExistingCustomer(ShoppingCart shoppingCart)
          Checks if the customer already has an account in the system.
 boolean isFirstTimeBuyer(ShoppingCart shoppingCart)
          Checks if the customer is a first time buyer.
 void setOrderService(OrderService orderService)
          Set the OrderService.
 void setProductSkuService(ProductSkuService productSkuService)
          Set the ProductSkuService.
 
Methods inherited from class com.elasticpath.domain.impl.AbstractPersistenceImpl
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

PromotionRuleDelegateImpl

public PromotionRuleDelegateImpl()
The default constructor.

Method Detail

applyCartSkuDiscountAmount

public void applyCartSkuDiscountAmount(ShoppingCart shoppingCart,
                                       long ruleId,
                                       java.lang.String skuCode,
                                       java.lang.String amount,
                                       int maxItems,
                                       java.lang.String exceptionStr)
Apply a discount amount to a product in the cart.

Specified by:
applyCartSkuDiscountAmount in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to have a discounted
ruleId - the id of the rule executing this action
skuCode - the sku code of the sku to be discounted
amount - the amount of the discount
maxItems - the maximum number of items to apply the promotion to. Set to zero for unlimited.
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.

applyCartSkuDiscountPercent

public void applyCartSkuDiscountPercent(ShoppingCart shoppingCart,
                                        long ruleId,
                                        java.lang.String skuCode,
                                        java.lang.String percent,
                                        int maxItems,
                                        java.lang.String exceptionStr)
Apply a discount amount to a product in the cart.

Specified by:
applyCartSkuDiscountPercent in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to have a discounted
ruleId - the id of the rule executing this action
skuCode - the sku code of the sku to be discounted
percent - the percentage of the promotion X 100 (e.g. 50 means 50% off).
maxItems - the maximum number of items to apply the promotion to. Set to zero for unlimited.
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.

applyCatalogProductDiscountAmount

public void applyCatalogProductDiscountAmount(ShoppingCart shoppingCart,
                                              long ruleId,
                                              Product product,
                                              java.util.Currency currency,
                                              java.lang.String amount,
                                              java.lang.String exceptionStr)
Reduces the price of a product by the specified amount.

Specified by:
applyCatalogProductDiscountAmount in interface PromotionRuleDelegate
Parameters:
shoppingCart - the customer's shopping cart
ruleId - the id of the rule executing this action
product - the product to be discounted
currency - the Currency of the price to be reduced
amount - the percentage of the promotion X 100 (e.g. 50 means 50% off).
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.

applyCatalogSkuDiscountAmount

public void applyCatalogSkuDiscountAmount(ShoppingCart shoppingCart,
                                          long ruleId,
                                          Product product,
                                          java.lang.String skuCode,
                                          java.util.Currency currency,
                                          java.lang.String amount)
Reduces the price of a sku by the specified amount.

Specified by:
applyCatalogSkuDiscountAmount in interface PromotionRuleDelegate
Parameters:
shoppingCart - the customer's shopping cart
ruleId - the id of the rule executing this action
product - the product containing the SKU to be discounted
skuCode - the SKU code for the sku to be discounted
currency - the Currency of the price to be reduced
amount - the percentage of the promotion X 100 (e.g. 50 means 50% off).

applyCatalogSkuDiscountPercent

public void applyCatalogSkuDiscountPercent(ShoppingCart shoppingCart,
                                           long ruleId,
                                           Product product,
                                           java.lang.String skuCode,
                                           java.util.Currency currency,
                                           java.lang.String percent)
Reduces the price of a sku by the specified amount.

Specified by:
applyCatalogSkuDiscountPercent in interface PromotionRuleDelegate
Parameters:
shoppingCart - the customer's shopping cart
ruleId - the id of the rule executing this action
product - the product containing the SKU to be discounted
skuCode - the SKU code for the sku to be discounted
currency - the Currency of the price to be reduced
percent - the percentage of the promotion X 100 (e.g. 50 means 50% off).

applyNFreeSkus

public void applyNFreeSkus(ShoppingCart shoppingCart,
                           long ruleId,
                           java.lang.String skuCode,
                           int numSkus)
Add N items of a product to the cart at a zero price.

Specified by:
applyNFreeSkus in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to have products discounted
ruleId - the id of the rule executing this action
skuCode - the sku code of the sku to be added to the cart
numSkus - the number of items to give for free

applyNthProductDiscountPercent

public void applyNthProductDiscountPercent(ShoppingCart shoppingCart,
                                           long ruleId,
                                           long productId,
                                           java.lang.String percent,
                                           int nthItem,
                                           java.lang.String exceptionStr)
Apply a percentage discount to the Nth item of a given product in the cart.

Specified by:
applyNthProductDiscountPercent in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to have products discounted
ruleId - the id of the rule executing this action
productId - the id of the product to be discounted
percent - the percentage of the promotion X 100 (e.g. 50 means 50% off, 100 means free).
nthItem - the number of items that must be present before one is discounted
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.

applyOrderCategoryDiscountAmount

public void applyOrderCategoryDiscountAmount(ShoppingCart shoppingCart,
                                             long ruleId,
                                             long categoryId,
                                             java.lang.String amount,
                                             int maxItems,
                                             java.lang.String exceptionStr)
Apply a discount amount to all items in a particular category in the cart.

Specified by:
applyOrderCategoryDiscountAmount in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to have items in a category discounted
ruleId - the id of the rule executing this action
categoryId - the id of the category that the promotion applies to
amount - the amount by which the price is to be reduced
maxItems - the maximum number of items to apply the promotion to. Set to zero for unlimited.
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.

applyOrderCategoryDiscountPercent

public void applyOrderCategoryDiscountPercent(ShoppingCart shoppingCart,
                                              long ruleId,
                                              long categoryId,
                                              java.lang.String percent,
                                              int maxItems,
                                              java.lang.String exceptionStr)
Apply a percentage discount to all items in a particular category in the cart.

Specified by:
applyOrderCategoryDiscountPercent in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to have items in a category discounted
ruleId - the id of the rule executing this action
categoryId - the id of the category that the promotion applies to
percent - the percentage of the promotion X 100 (e.g. 50 means 50% off).
maxItems - the maximum number of items to apply the promotion to. Set to zero for unlimited.
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.

applyOrderDiscountAmount

public void applyOrderDiscountAmount(ShoppingCart shoppingCart,
                                     long ruleId,
                                     java.lang.String amount)
Reduces the subtotal of the shopping cart by the specified amount.

Specified by:
applyOrderDiscountAmount in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart that the discount is to be applied to
ruleId - the id of the rule executing this action
amount - the amount by which to reduce the subtotal

applyOrderDiscountPercent

public void applyOrderDiscountPercent(ShoppingCart shoppingCart,
                                      long ruleId,
                                      java.lang.String percent)
Reduces the subtotal of the shopping cart by the specified percent.

Specified by:
applyOrderDiscountPercent in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart that the discount is to be applied to
ruleId - the id of the rule executing this action
percent - the percent by which to reduce the subtotal

applyProductDiscountAmount

public void applyProductDiscountAmount(ShoppingCart shoppingCart,
                                       long ruleId,
                                       long productId,
                                       java.lang.String amount,
                                       int maxItems,
                                       java.lang.String exceptionStr)
Apply a discount amount to a product in the cart.

Specified by:
applyProductDiscountAmount in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to have a discounted
ruleId - the id of the rule executing this action
productId - the id of the product to be discounted
amount - the amount of the discount
maxItems - the maximum number of items to apply the promotion to. Set to zero for unlimited.
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.

applyProductDiscountPercent

public void applyProductDiscountPercent(ShoppingCart shoppingCart,
                                        long ruleId,
                                        long productId,
                                        java.lang.String percent,
                                        int maxItems,
                                        java.lang.String exceptionStr)
Apply a percentage discount to a product in the cart.

Specified by:
applyProductDiscountPercent in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to have a discounted
ruleId - the id of the rule executing this action
productId - the id of the product to be discounted
percent - the percentage of the promotion X 100 (e.g. 50 means 50% off, 100 means free).
maxItems - the maximum number of items to apply the promotion to. Set to zero for unlimited.
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.

applyProductDiscountPercent

public void applyProductDiscountPercent(ShoppingCart shoppingCart,
                                        long ruleId,
                                        Product product,
                                        java.util.Currency currency,
                                        java.lang.String percent,
                                        java.lang.String exceptionStr)
Reduces the price of a product by the specified percent.

Specified by:
applyProductDiscountPercent in interface PromotionRuleDelegate
Parameters:
shoppingCart - the customer's shopping cart
ruleId - the id of the rule executing this action
product - the product to be discounted
currency - the Currency of the price to be reduced
percent - the amount that the price should be reduced
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.

applyShippingDiscountAmount

public void applyShippingDiscountAmount(ShoppingCart shoppingCart,
                                        long ruleId,
                                        java.lang.String amount,
                                        long shippingMethodId)
Reduces the shipping cost of the shopping cart by the specified amount. (If the specified shipping method is in use)

Specified by:
applyShippingDiscountAmount in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart that the shipping discount is to be applied to
ruleId - the id of the rule executing this action
amount - the amount by which to reduce the shipping cost
shippingMethodId - the shipping method that this discount applies to

applyShippingDiscountPercent

public void applyShippingDiscountPercent(ShoppingCart shoppingCart,
                                         long ruleId,
                                         java.lang.String percent,
                                         long shippingMethodId)
Reduces the shipping cost of the shopping cart by the specified percent. (If the specified shipping method is in use)

Specified by:
applyShippingDiscountPercent in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart that the shipping discount is to be applied to
ruleId - the id of the rule executing this action
percent - the percent by which to reduce the shipping cost (String value from 1 to 100)
shippingMethodId - the shipping method that this discount applies to

cartContainsItemsOfCategory

public boolean cartContainsItemsOfCategory(ShoppingCart shoppingCart,
                                           long categoryId,
                                           int numItems,
                                           java.lang.String exceptionStr)
Checks if the shopping cart contains the specified quantity of items of the given product. categoryId of value 0 mean any category.

Specified by:
cartContainsItemsOfCategory in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to check
categoryId - the category id that must be in the cart
numItems - the minimum quantity of items of the category that must be present
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.
Returns:
true if there are quantity items with productId in the cart

cartContainsProduct

public boolean cartContainsProduct(ShoppingCart shoppingCart,
                                   long productId,
                                   int quantity,
                                   java.lang.String exceptionStr)
Checks if the shopping cart contains the specified quantity of items of the given product. productId of value 0 means any product.

Specified by:
cartContainsProduct in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to check
productId - the sku code that must be in the cart
quantity - the minimum quantity of the product that must be present
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.
Returns:
true if there are quantity items with productId in the cart

cartContainsSku

public boolean cartContainsSku(ShoppingCart shoppingCart,
                               java.lang.String skuCode,
                               int quantity)
Checks if the shopping cart contains the specified quantity of items with the specified sku code. An empty skuCode means any sku.

Specified by:
cartContainsSku in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to check
skuCode - the sku code that must be in the cart
quantity - the quantity of the sku that must be present
Returns:
true if there are quantity items with skuCode in the cart

cartCurrencyMatches

public boolean cartCurrencyMatches(ShoppingCart shoppingCart,
                                   java.lang.String currencyCode)
Checks if the currency of a shopping cart matches the specified currency code.

Specified by:
cartCurrencyMatches in interface PromotionRuleDelegate
Parameters:
shoppingCart - The shopping cart to check
currencyCode - The currency code, e.g. CAD
Returns:
true if the cart currency code matches the supplied code

cartHasPromoCode

public boolean cartHasPromoCode(ShoppingCart shoppingCart,
                                java.lang.String promoCode)
Checks if the shopping cart has the specified promo code entered by the user. This will also notify the cart if the cart if the specified promo code matches the parameter.

Specified by:
cartHasPromoCode in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to check for the promo code
promoCode - the promo code to check for.
Returns:
returns true if the shopping cart has the specified promo code

cartSubtotalExceeds

public boolean cartSubtotalExceeds(ShoppingCart shoppingCart,
                                   java.lang.String amount,
                                   java.lang.String exceptionStr)
Checks if the shopping cart subtotal exceeds the specified amount.

Specified by:
cartSubtotalExceeds in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart to check
amount - the amount the shopping cart must exceed
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.
Returns:
true if the shopping cart subtotal is greater than the specified amount

catalogBrandIs

public boolean catalogBrandIs(Product product,
                              boolean isBrand,
                              java.lang.String brandCode,
                              java.lang.String exceptionStr)
Returns true if the given product is/is not of the specified brand.

Specified by:
catalogBrandIs in interface PromotionRuleDelegate
Parameters:
product - the product whose condition is to be checked
isBrand - set to true to check that the brand is the one with the specified Id, or false to check that it is not the brand with the specified id.
brandCode - the code of the brand to check for
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.
Returns:
true if the product is of the specified brand

catalogProductInCategory

public boolean catalogProductInCategory(Product product,
                                        boolean isIn,
                                        long categoryUid,
                                        java.lang.String exceptionStr)
Checks if the given product is in the category with the specified categoryID.

Specified by:
catalogProductInCategory in interface PromotionRuleDelegate
Parameters:
product - the product
isIn - set to true to specify that the product is in the category, false to require that it isn't in the category
categoryUid - the id of the category to check if the product is in it
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.
Returns:
true if the product is in the category or one of its children.

catalogProductIs

public boolean catalogProductIs(Product product,
                                boolean isProduct,
                                long productUid,
                                java.lang.String exceptionStr)
Returns true if the given product is/is not the product with the specified Id.

Specified by:
catalogProductIs in interface PromotionRuleDelegate
Parameters:
product - the product whose condition is to be checked
isProduct - set to true to check that the product is the one with the specified Id, or false to check that it is not the product with the specified id.
productUid - the id of the product to check for
exceptionStr - exceptions to this rule element; to be used to populate the PromotionRuleExceptions.
Returns:
true if the product is in the category or one of its children.

checkDateRange

public boolean checkDateRange(java.lang.String startDateString,
                              java.lang.String endDateString)
Checks that the current date is between the specified dates.

Specified by:
checkDateRange in interface PromotionRuleDelegate
Parameters:
startDateString - the start date represented as a long (milliseconds) in a string. 0 means no start date restriction on the date range.
endDateString - the end date represented as a long (milliseconds) in a string. 0 means no end date. Longs are not supported by Drools so the dates are passed as strings.
Returns:
true if the current date is between the specified dates

customerInGroup

public boolean customerInGroup(ShoppingCart shoppingCart,
                               long customerGroup)
Checks if the customer is in the specified customer group.

Specified by:
customerInGroup in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart containing a reference to the customer
customerGroup - the customer group that the customer must belong to
Returns:
true if the customer belongs to the specified group

isExistingCustomer

public boolean isExistingCustomer(ShoppingCart shoppingCart)
Checks if the customer already has an account in the system.

Specified by:
isExistingCustomer in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart containing a reference to the customer
Returns:
true if the customer already has an account in the system.

isFirstTimeBuyer

public boolean isFirstTimeBuyer(ShoppingCart shoppingCart)
Checks if the customer is a first time buyer. A first time buyer is a customer whose email address has not been used in any existing orders.

Specified by:
isFirstTimeBuyer in interface PromotionRuleDelegate
Parameters:
shoppingCart - the shopping cart containing a reference to the customer
Returns:
true if the customer is a first time buyer

setOrderService

public void setOrderService(OrderService orderService)
Set the OrderService. This method should only be used by unit test code.

Parameters:
orderService - the OrderService

setProductSkuService

public void setProductSkuService(ProductSkuService productSkuService)
Set the ProductSkuService. This method should only be used by unit test code.

Parameters:
productSkuService - the ProductSkuService