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

      List<PromotionData> getProductPromotions(Collection<String> promotionGroups)
      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 is null OR promotionGroups is empty OR any of promotion group from collection doesn't exists
    • getProductPromotions

      List<PromotionData> getProductPromotions(String promotionGroup)
      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 is null OR promotionGroup doesn't exists
    • getOrderPromotions

      List<PromotionData> getOrderPromotions(Collection<String> promotionGroups)
      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 is null OR promotionGroups is empty OR any of promotion group from collection doesn't exists
    • getOrderPromotions

      List<PromotionData> getOrderPromotions(String promotionGroup)
      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 is null OR promotionGroup doesn't exists
    • getPromotion

      PromotionData getPromotion(String code)
      Get promotion base on its code
      Parameters:
      code - - promotion identifier
      Returns:
      the PromotionData
      Throws:
      UnknownIdentifierException - if no Promotion with the specified code is found
      AmbiguousIdentifierException - if more than one Promotion with the specified code is found
      IllegalArgumentException - if parameter code is null
    • getPromotion

      PromotionData getPromotion(String code, Collection<PromotionOption> options)
      Get promotion base on its code
      Parameters:
      code - - promotion identifier
      options - - 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 found
      AmbiguousIdentifierException - if more than one Promotion with the specified code is found
      IllegalArgumentException - if parameter code is null