Class CreatePaymentValidator
- java.lang.Object
-
- de.adorsys.psd2.xs2a.service.validator.pis.payment.CreatePaymentValidator
-
- All Implemented Interfaces:
BusinessValidator<CreatePaymentRequestObject>
@Component public class CreatePaymentValidator extends Object implements BusinessValidator<CreatePaymentRequestObject>
Validator to be used for validating create payment request according to some business rules
-
-
Constructor Summary
Constructors Constructor Description CreatePaymentValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Set<de.adorsys.psd2.xs2a.core.domain.TppMessageInformation>buildWarningMessages(@NotNull CreatePaymentRequestObject createPaymentRequestObject)Checks some object according to some business rules and creates warning messages if there is inconsistency in the logic@NotNull ValidationResultvalidate(@NotNull CreatePaymentRequestObject createPaymentRequestObject)Validates create payment request by checking whether: Payment product and payment type are correct PSU Data is present in the request if it's mandated by the profile Account references are supported by ASPSP
-
-
-
Method Detail
-
validate
@NotNull public @NotNull ValidationResult validate(@NotNull @NotNull CreatePaymentRequestObject createPaymentRequestObject)
Validates create payment request by checking whether:- Payment product and payment type are correct
- PSU Data is present in the request if it's mandated by the profile
- Account references are supported by ASPSP
- Specified by:
validatein interfaceBusinessValidator<CreatePaymentRequestObject>- Parameters:
createPaymentRequestObject- payment request object with information about the payment- Returns:
- valid result if the parameters are valid, invalid result with appropriate error otherwise
-
buildWarningMessages
@NotNull public @NotNull Set<de.adorsys.psd2.xs2a.core.domain.TppMessageInformation> buildWarningMessages(@NotNull @NotNull CreatePaymentRequestObject createPaymentRequestObject)
Description copied from interface:BusinessValidatorChecks some object according to some business rules and creates warning messages if there is inconsistency in the logic- Specified by:
buildWarningMessagesin interfaceBusinessValidator<CreatePaymentRequestObject>- Parameters:
createPaymentRequestObject- business object to be validated- Returns:
- empty set if the object doesn't have inconsistencies, set of warning messages otherwise
-
-