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 Detail

      • getProductPromotions

        java.util.List<PromotionData> getProductPromotions()
        Get the list of product promotions
        Returns:
        The list of product promotions
      • getProductPromotions

        java.util.List<PromotionData> getProductPromotions​(java.util.Collection<java.lang.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:
        java.lang.IllegalArgumentException - - if parameter promotionGroups is null OR promotionGroups is empty OR any of promotion group from collection doesn't exists
      • getProductPromotions

        java.util.List<PromotionData> getProductPromotions​(java.lang.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:
        java.lang.IllegalArgumentException - - if parameter promotionGroup is null OR promotionGroup doesn't exists
      • getOrderPromotions

        java.util.List<PromotionData> getOrderPromotions​(java.util.Collection<java.lang.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:
        java.lang.IllegalArgumentException - - if parameter promotionGroups is null OR promotionGroups is empty OR any of promotion group from collection doesn't exists
      • getOrderPromotions

        java.util.List<PromotionData> getOrderPromotions​(java.lang.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:
        java.lang.IllegalArgumentException - - if parameter promotionGroup is null OR promotionGroup doesn't exists
      • getPromotion

        PromotionData getPromotion​(java.lang.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
        java.lang.IllegalArgumentException - if parameter code is null
      • getPromotion

        PromotionData getPromotion​(java.lang.String code,
                                   java.util.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
        java.lang.IllegalArgumentException - if parameter code is null