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 Summary
Modifier and TypeMethodDescriptionvoidcollectValidationErrors(ValidationException e, Optional<String> language, Optional<Integer> position) Collects the errors in the validation exception and adds to the global validation context.voidFinalizes the latestValidationErrorsinstance for this transaction.Provides the currentValidationErrorsinstance for this transaction.Initializes a newValidationErrorsinstance for this transaction.
-
Method Details
-
initializeValidationErrors
ValidationErrors initializeValidationErrors()Initializes a newValidationErrorsinstance for this transaction.- Returns:
- the current
ValidationErrors
-
getCurrentValidationErrors
ValidationErrors getCurrentValidationErrors()Provides the currentValidationErrorsinstance for this transaction.- Returns:
- the current
ValidationErrors
-
finalizeValidationErrors
void finalizeValidationErrors()Finalizes the latestValidationErrorsinstance 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 exceptionlanguage- optional; the validated languageposition- optional; the position in which the object value in the collection
-