Class Xs2aValidator
- java.lang.Object
-
- de.adorsys.opba.protocol.xs2a.service.xs2a.validation.Xs2aValidator
-
@Service public class Xs2aValidator extends Object
Key validation service that uses Hibernate-validator to check that required parameters are available before doing ASPSP API call. ForContextMode.MOCK_REAL_CALLScollects all violations into the context to emit message that requires user to provide inputs that fix the violations. ForContextMode.REAL_CALLScauses Runtime error if API object fails the validation.
-
-
Constructor Summary
Constructors Constructor Description Xs2aValidator(javax.validation.Validator validator, List<? extends ExternalValidationModeDeclaration> externalValidationMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> voidvalidate(org.flowable.engine.delegate.DelegateExecution exec, Xs2aContext context, Class<T> invokerClass, Object... dtosToValidate)Validates that all parameters necessary to perform ASPSP API call is present.
-
-
-
Constructor Detail
-
Xs2aValidator
public Xs2aValidator(javax.validation.Validator validator, List<? extends ExternalValidationModeDeclaration> externalValidationMode)
-
-
Method Detail
-
validate
public <T> void validate(org.flowable.engine.delegate.DelegateExecution exec, Xs2aContext context, Class<T> invokerClass, Object... dtosToValidate)Validates that all parameters necessary to perform ASPSP API call is present. InContextMode.MOCK_REAL_CALLSreports all violations intoBaseContext.getViolations()(merging with already existing ones)- Parameters:
exec- Current execution that will be updated with violations if present.dtosToValidate- ASPSP API call parameter objects to validate.
-
-