Class TmaCartEntryPlaceValidator

  • All Implemented Interfaces:
    org.springframework.validation.Validator

    public class TmaCartEntryPlaceValidator
    extends java.lang.Object
    implements org.springframework.validation.Validator
    Validator for PlaceWsDTO.
    Since:
    1911
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean supports​(java.lang.Class<?> aClass)  
      void validate​(java.lang.Object object, org.springframework.validation.Errors errors)  
      protected void validatePlaces​(OrderEntryWsDTO cartItem, org.springframework.validation.Errors errors)
      Checks that all the places on product are valid.
      protected void validateRole​(PlaceWsDTO place, org.springframework.validation.Errors errors)
      Checks that the place has a role and that role is of type TmaPlaceRoleType.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TmaCartEntryPlaceValidator

        public TmaCartEntryPlaceValidator()
    • Method Detail

      • supports

        public boolean supports​(java.lang.Class<?> aClass)
        Specified by:
        supports in interface org.springframework.validation.Validator
      • validate

        public void validate​(java.lang.Object object,
                             org.springframework.validation.Errors errors)
        Specified by:
        validate in interface org.springframework.validation.Validator
      • validatePlaces

        protected void validatePlaces​(OrderEntryWsDTO cartItem,
                                      org.springframework.validation.Errors errors)
        Checks that all the places on product are valid.
        Parameters:
        cartItem - the cart item
        errors - the errors found
      • validateRole

        protected void validateRole​(PlaceWsDTO place,
                                    org.springframework.validation.Errors errors)
        Checks that the place has a role and that role is of type TmaPlaceRoleType.
        Parameters:
        place - the place
        errors - the errors found