Interface TmaValidationMessagesStrategy

All Known Implementing Classes:
DefaultCartCardinalityValidationMessagesStrategy, DefaultTmaCompatibilityValidationMessagesStrategy

public interface TmaValidationMessagesStrategy
Strategy responsible for handling validation messages
Since:
1911
  • Method Details

    • setValidationMessagesOn

      void setValidationMessagesOn(CartModel cartModel, List<String> messages)
      Sets validation messages on cart.
      Parameters:
      cartModel - the cart to be updated
      messages - list of messages
    • shouldUpdateValidationMessages

      @Deprecated(since="2102") boolean shouldUpdateValidationMessages(EntryGroup entryGroup, List<String> errorMessages)
      Deprecated.
      Returns a boolean that states whether the validation messages should be updated or not.
      Parameters:
      entryGroup - the entry group to be checked
      errorMessages - list of messages
      Returns:
      a boolean specifying if it should be updated or not
    • shouldUpdateValidationMessages

      boolean shouldUpdateValidationMessages(CartEntryModel cartEntry, List<String> errorMessages)
      Returns a boolean that states whether the validation messages should be updated or not.
      Parameters:
      cartEntry - the cart entry to be checked
      errorMessages - list of messages
      Returns:
      a boolean specifying if it should be updated or not
    • setValidationMessagesOn

      @Deprecated(since="2102") void setValidationMessagesOn(EntryGroup entryGroup, List<String> messages)
      Deprecated.
      Sets validation messages on entry group.
      Parameters:
      entryGroup - the entry group to be updated
      messages - list of messages
    • setValidationMessagesOn

      void setValidationMessagesOn(CartEntryModel cartEntry, List<String> messages)
      Sets validation messages on cart entry.
      Parameters:
      cartEntry - the cart entry to be updated
      messages - list of messages
    • cleanupValidationMessagesOn

      void cleanupValidationMessagesOn(CartModel cartModel)
      Removes validation messages from the cart.
      Parameters:
      cartModel - The cart
    • cleanupValidationMessagesOn

      @Deprecated(since="2102") void cleanupValidationMessagesOn(AbstractOrderModel abstractOrder, EntryGroup entryGroup)
      Deprecated.
      since 2102 - use cleanupValidationMessagesOn(CartEntryModel) (AbstractOrderEntryModel)} instead
      Removes the validation messages form the entry group.
      Parameters:
      abstractOrder - The cart or order
      entryGroup - The entry group
    • cleanupValidationMessagesOn

      void cleanupValidationMessagesOn(CartEntryModel cartEntry)
      Removes the validation messages form the cart entry.
      Parameters:
      cartEntry - The cart entry