Interface CommercePromotionFacade
- All Known Implementing Classes:
DefaultCommercePromotionFacade
public interface CommercePromotionFacade
Promotion facade interface. Its main purpose is to retrieve promotion related DTOs using existing services.
-
Method Summary
Modifier and TypeMethodDescriptionGet the list of order promotionsgetOrderPromotions(String promotionGroup) Get list of order promotion instances that belong to given promotion groupgetOrderPromotions(Collection<String> promotionGroups) Get list of order promotion instances that belong to one of given promotion groupsGet the list of product promotionsgetProductPromotions(String promotionGroup) Get list of product promotions that belong to given promotion groupgetProductPromotions(Collection<String> promotionGroups) Get list of product promotions that belong to one of given promotion groupsgetPromotion(String code) Get promotion base on its codegetPromotion(String code, Collection<PromotionOption> options) Get promotion base on its code
-
Method Details
-
getProductPromotions
List<PromotionData> getProductPromotions()Get the list of product promotions- Returns:
- The list of product promotions
-
getOrderPromotions
List<PromotionData> getOrderPromotions()Get the list of order promotions- Returns:
- The list of
OrderPromotionModel
-
getProductPromotions
Get list of product promotions that belong to one of given promotion groups- Parameters:
promotionGroups- The promotion groups to evaluate- Returns:
- The list of product promotions
- Throws:
IllegalArgumentException- - if parameter promotionGroups isnullOR promotionGroups is empty OR any of promotion group from collection doesn't exists
-
getProductPromotions
Get list of product promotions that belong to given promotion group- Parameters:
promotionGroup- The promotion group to evaluate- Returns:
- The list of product promotions
- Throws:
IllegalArgumentException- - if parameter promotionGroup isnullOR promotionGroup doesn't exists
-
getOrderPromotions
Get list of order promotion instances that belong to one of given promotion groups- Parameters:
promotionGroups- The promotion groups to evaluate- Returns:
- The list of order promotion
- Throws:
IllegalArgumentException- - if parameter promotionGroups isnullOR promotionGroups is empty OR any of promotion group from collection doesn't exists
-
getOrderPromotions
Get list of order promotion instances that belong to given promotion group- Parameters:
promotionGroup- The promotion group to evaluate- Returns:
- The list of order promotion
- Throws:
IllegalArgumentException- - if parameter promotionGroup isnullOR promotionGroup doesn't exists
-
getPromotion
Get promotion base on its code- Parameters:
code- - promotion identifier- Returns:
- the
PromotionData - Throws:
UnknownIdentifierException- if no Promotion with the specified code is foundAmbiguousIdentifierException- if more than one Promotion with the specified code is foundIllegalArgumentException- if parameter code isnull
-
getPromotion
Get promotion base on its code- Parameters:
code- - promotion identifieroptions- - options set that determines amount of information that will be attached to the returned promotion. BASIC informations are attached by default- Returns:
- the
PromotionData - Throws:
UnknownIdentifierException- if no Promotion with the specified code is foundAmbiguousIdentifierException- if more than one Promotion with the specified code is foundIllegalArgumentException- if parameter code isnull
-