Class TppUriHeaderValidator
- java.lang.Object
-
- de.adorsys.psd2.xs2a.service.validator.TppUriHeaderValidator
-
- All Implemented Interfaces:
BusinessValidator<de.adorsys.psd2.xs2a.core.tpp.TppRedirectUri>,ConsentHeaderValidator,HeaderValidator,PaymentHeaderValidator
@Component public class TppUriHeaderValidator extends Object implements BusinessValidator<de.adorsys.psd2.xs2a.core.tpp.TppRedirectUri>, PaymentHeaderValidator, ConsentHeaderValidator
-
-
Constructor Summary
Constructors Constructor Description TppUriHeaderValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Set<de.adorsys.psd2.xs2a.core.domain.TppMessageInformation>buildWarningMessages(@NotNull de.adorsys.psd2.xs2a.core.tpp.TppRedirectUri tppRedirectUri)Checks some object according to some business rules and creates warning messages if there is inconsistency in the logic@NotNull ValidationResultvalidate(@NotNull de.adorsys.psd2.xs2a.core.tpp.TppRedirectUri tppRedirectUri)Validates some object according to some business rulesde.adorsys.psd2.xs2a.core.error.MessageErrorvalidate(Map<String,String> headers, de.adorsys.psd2.xs2a.core.error.MessageError messageError)Validates HTTP headers from the request and populates given error with error text if headers are invalid
-
-
-
Method Detail
-
validate
@NotNull public @NotNull ValidationResult validate(@NotNull @NotNull de.adorsys.psd2.xs2a.core.tpp.TppRedirectUri tppRedirectUri)
Description copied from interface:BusinessValidatorValidates some object according to some business rules- Specified by:
validatein interfaceBusinessValidator<de.adorsys.psd2.xs2a.core.tpp.TppRedirectUri>- Parameters:
tppRedirectUri- business object to be validated- Returns:
- valid result if the object is valid, invalid result with appropriate error otherwise
-
buildWarningMessages
@NotNull public @NotNull Set<de.adorsys.psd2.xs2a.core.domain.TppMessageInformation> buildWarningMessages(@NotNull @NotNull de.adorsys.psd2.xs2a.core.tpp.TppRedirectUri tppRedirectUri)
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<de.adorsys.psd2.xs2a.core.tpp.TppRedirectUri>- Parameters:
tppRedirectUri- business object to be validated- Returns:
- empty set if the object doesn't have inconsistencies, set of warning messages otherwise
-
validate
public de.adorsys.psd2.xs2a.core.error.MessageError validate(Map<String,String> headers, de.adorsys.psd2.xs2a.core.error.MessageError messageError)
Description copied from interface:HeaderValidatorValidates HTTP headers from the request and populates given error with error text if headers are invalid- Specified by:
validatein interfaceHeaderValidator- Parameters:
headers- headers from the request, with their names acting as keysmessageError- error to be populated- Returns:
MessageErrorobject, enriched or not.
-
-