Class MerchantIdNotNullForPosValidator

java.lang.Object
it.pagopa.swclient.mil.validation.constraints.MerchantIdNotNullForPosValidator
All Implemented Interfaces:
jakarta.validation.ConstraintValidator<MerchantIdNotNullForPos,CommonHeader>

public class MerchantIdNotNullForPosValidator extends Object implements jakarta.validation.ConstraintValidator<MerchantIdNotNullForPos,CommonHeader>

If Channel equals to POS, the MerchantId must not be null.

Author:
Antonio Tarricone
  • Constructor Details

    • MerchantIdNotNullForPosValidator

      public MerchantIdNotNullForPosValidator()

      Default constructor.

  • Method Details

    • isValid

      public boolean isValid(CommonHeader commonHeader, jakarta.validation.ConstraintValidatorContext context)

      If Channel equals to POS, the MerchantId must not be null.

      Specified by:
      isValid in interface jakarta.validation.ConstraintValidator<MerchantIdNotNullForPos,CommonHeader>
      See Also:
      • ConstraintValidator.isValid(Object, ConstraintValidatorContext)