Interface ServiceCommandValidator
-
- All Known Implementing Classes:
DefaultServiceCommandValidator
public interface ServiceCommandValidator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addFieldValidationError(FieldValidationError fieldError)
Add a new field validation error.void
addFieldValidationError(String fieldName, String messageKey)
Add a new validation error.void
addFieldValidationError(String fieldName, String messageKey, Object... messageArguments)
Add a new validation error.void
addValidationError(String messageKey, Object... messageArguments)
Add a new validation error.Collection<ValidationError>
getValidationErrors()
Get all validation errors.
-
-
-
Method Detail
-
addFieldValidationError
void addFieldValidationError(String fieldName, String messageKey)
Add a new validation error.- Parameters:
fieldName
- the field that is not validmessageKey
- the i18n key for the validation error message
-
addValidationError
void addValidationError(String messageKey, Object... messageArguments)
Add a new validation error.- Parameters:
messageKey
- the i18n key for the validation error messagemessageArguments
- the arguments to be merged into the error message
-
addFieldValidationError
void addFieldValidationError(String fieldName, String messageKey, Object... messageArguments)
Add a new validation error.- Parameters:
fieldName
- the field that is not validmessageKey
- the i18n key for the validation error messagemessageArguments
- the arguments to be merged into the error message.
-
addFieldValidationError
void addFieldValidationError(FieldValidationError fieldError)
Add a new field validation error.- Parameters:
fieldError
- the error to add
-
getValidationErrors
Collection<ValidationError> getValidationErrors()
Get all validation errors.- Returns:
- validation errors.
-
-