Class 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. For ContextMode.MOCK_REAL_CALLS collects all violations into the context to emit message that requires user to provide inputs that fix the violations. For ContextMode.REAL_CALLS causes Runtime error if API object fails the validation.
    • 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. In ContextMode.MOCK_REAL_CALLS reports all violations into BaseContext.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.