Interface CommercePromotionService
- All Known Implementing Classes:
DefaultCommercePromotionService
public interface CommercePromotionService
Service for getting information about promotions
- Spring Bean ID:
- commercePromotionService
-
Method Summary
Modifier and TypeMethodDescriptionGet the list ofOrderPromotionModelinstances.getOrderPromotions(Collection<PromotionGroupModel> promotionGroups) Get list ofOrderPromotionModelinstances instances that belong to one of givenPromotionGroupModelGet the list ofProductPromotionModelinstancesgetProductPromotions(Collection<PromotionGroupModel> promotionGroups) Get list ofProductPromotionModelinstances that belong to one of givenPromotionGroupModelgetPromotion(String code) GetAbstractPromotionModelinstance base on its code
-
Method Details
-
getProductPromotions
List<ProductPromotionModel> getProductPromotions()Get the list ofProductPromotionModelinstances- Returns:
- The list of
ProductPromotionModel
-
getOrderPromotions
List<OrderPromotionModel> getOrderPromotions()Get the list ofOrderPromotionModelinstances.- Returns:
- The list of
OrderPromotionModel
-
getProductPromotions
Get list ofProductPromotionModelinstances that belong to one of givenPromotionGroupModel- Parameters:
promotionGroups- The promotion groups to evaluate- Returns:
- The list of
ProductPromotionModel - Throws:
IllegalArgumentException- if parameter promotionGroups isnull
-
getOrderPromotions
Get list ofOrderPromotionModelinstances instances that belong to one of givenPromotionGroupModel- Parameters:
promotionGroups- The promotion groups to evaluate- Returns:
- The list of
OrderPromotionModel - Throws:
IllegalArgumentException- if parameter promotionGroups isnull
-
getPromotion
GetAbstractPromotionModelinstance base on its code- Parameters:
code- - promotion identifier- Returns:
AbstractPromotionModelinstance- 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
-