Interface ValidationErrorsProvider
-
- All Known Implementing Classes:
DefaultValidationErrorsProvider
public interface ValidationErrorsProviderProvider Interface forValidationErrors. This interface provides a single instance ofValidationErrorsper transaction, e.g. Hybris Session. Use this provider to get theValidationErrorsat any time during execution time.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcollectValidationErrors(ValidationException e, java.util.Optional<java.lang.String> language, java.util.Optional<java.lang.Integer> position)Collects the errors in the validation exception and adds to the global validation context.voidfinalizeValidationErrors()Finalizes the latestValidationErrorsinstance for this transaction.ValidationErrorsgetCurrentValidationErrors()Provides the currentValidationErrorsinstance for this transaction.ValidationErrorsinitializeValidationErrors()Initializes a newValidationErrorsinstance for this transaction.
-
-
-
Method Detail
-
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, java.util.Optional<java.lang.String> language, java.util.Optional<java.lang.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
-
-