Class OrderRestriction

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable

    public class OrderRestriction
    extends GeneratedOrderRestriction
    This restriction restricts vouchers to minimum order amount
    See Also:
    Serialized Form
    • Constructor Detail

      • OrderRestriction

        public OrderRestriction()
    • Method Detail

      • getMessageAttributeValues

        protected java.lang.String[] getMessageAttributeValues()
        Description copied from class: Restriction
        Returns the values for making violation messages more useful.
        Overrides:
        getMessageAttributeValues in class Restriction
      • isFulfilledInternal

        protected boolean isFulfilledInternal​(AbstractOrder anOrder)
        Returns true if the specified abstract order fulfills this restriction. More formally, returns true if the total of the specified abstract order (including tax and/or delivery costs in a way defined by this restriction) is greater than the total defined by this restriction in case of this restriction is positive or less than the total defined by this restriction, else.
        Specified by:
        isFulfilledInternal in class Restriction
        Parameters:
        anOrder - the abstract order to check whether it fullfills this restriction.
        Returns:
        true if the specified abstract order fulfills this restriction, false else.
        See Also:
        Restriction.isFulfilledInternal(AbstractOrder)
      • isFulfilledInternal

        protected boolean isFulfilledInternal​(Product aProduct)
        Returns true if the specified product fulfills this restriction.
        Specified by:
        isFulfilledInternal in class Restriction
        Parameters:
        aProduct - the product to check whether it fullfills this restriction.
        Returns:
        true if the specified product fulfills this restriction, false else.
        See Also:
        Restriction.isFulfilledInternal(Product)