Interface ValidationErrorsProvider

All Known Implementing Classes:
DefaultValidationErrorsProvider

public interface ValidationErrorsProvider
Provider Interface for ValidationErrors. This interface provides a single instance of ValidationErrors per transaction, e.g. Hybris Session. Use this provider to get the ValidationErrors at any time during execution time.
  • Method Details

    • initializeValidationErrors

      ValidationErrors initializeValidationErrors()
      Initializes a new ValidationErrors instance for this transaction.
      Returns:
      the current ValidationErrors
    • getCurrentValidationErrors

      ValidationErrors getCurrentValidationErrors()
      Provides the current ValidationErrors instance for this transaction.
      Returns:
      the current ValidationErrors
    • finalizeValidationErrors

      void finalizeValidationErrors()
      Finalizes the latest ValidationErrors instance for this transaction.
    • collectValidationErrors

      void collectValidationErrors(ValidationException e, Optional<String> language, Optional<Integer> position)
      Collects the errors in the validation exception and adds to the global validation context.
      Parameters:
      e - the exception
      language - optional; the validated language
      position - optional; the position in which the object value in the collection