Class DefaultValidationErrorsProvider

    • Constructor Detail

      • DefaultValidationErrorsProvider

        public DefaultValidationErrorsProvider()
    • Method Detail

      • collectValidationErrors

        public void collectValidationErrors​(ValidationException e,
                                            java.util.Optional<java.lang.String> language,
                                            java.util.Optional<java.lang.Integer> position)
        Description copied from interface: ValidationErrorsProvider
        Collects the errors in the validation exception and adds to the global validation context.
        Specified by:
        collectValidationErrors in interface ValidationErrorsProvider
        Parameters:
        e - the exception
        language - optional; the validated language
        position - optional; the position in which the object value in the collection
      • getWrappedStack

        protected java.util.Deque<ValidationErrors> getWrappedStack​(java.lang.Object rawValue)
        Values stored in the session service must be wrapped in AtomicReference objects to protect them from being altered during serialization. When values are read from the session service, they must be unwrapped. Thus, this method is used to retrieve the original value (stack) stored in the AtomicReference wrapper.
        Parameters:
        rawValue - Object retrieved from the session service. The object must be an AtomicReference. Otherwise, an IllegalStateException is thrown.
        Returns:
        stack stored within the AtomicReference.
      • setSessionService

        public void setSessionService​(SessionService sessionService)
      • getValidationErrorsObjectFactory

        protected org.springframework.beans.factory.ObjectFactory<ValidationErrors> getValidationErrorsObjectFactory()
      • setValidationErrorsObjectFactory

        public void setValidationErrorsObjectFactory​(org.springframework.beans.factory.ObjectFactory<ValidationErrors> validationErrorsObjectFactory)