Interface ValidationErrorsProvider
-
- All Known Implementing Classes:
DefaultValidationErrorsProvider
public interface ValidationErrorsProvider
Provider Interface forValidationErrors
. This interface provides a single instance ofValidationErrors
per transaction, e.g. Hybris Session. Use this provider to get theValidationErrors
at any time during execution time.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.void
finalizeValidationErrors()
Finalizes the latestValidationErrors
instance for this transaction.ValidationErrors
getCurrentValidationErrors()
Provides the currentValidationErrors
instance for this transaction.ValidationErrors
initializeValidationErrors()
Initializes a newValidationErrors
instance for this transaction.
-
-
-
Method Detail
-
initializeValidationErrors
ValidationErrors initializeValidationErrors()
Initializes a newValidationErrors
instance for this transaction.- Returns:
- the current
ValidationErrors
-
getCurrentValidationErrors
ValidationErrors getCurrentValidationErrors()
Provides the currentValidationErrors
instance for this transaction.- Returns:
- the current
ValidationErrors
-
finalizeValidationErrors
void finalizeValidationErrors()
Finalizes the latestValidationErrors
instance 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
-
-