Class OrderRestriction

All Implemented Interfaces:
Serializable, Comparable

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

    • OrderRestriction

      public OrderRestriction()
  • Method Details

    • getMessageAttributeValues

      protected 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:
    • 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: