public class DefaultServiceCommandValidator extends Object implements ServiceCommandValidator
Constructor and Description |
---|
DefaultServiceCommandValidator() |
Modifier and Type | Method and 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.
|
public final void addFieldValidationError(String fieldName, String messageKey)
addFieldValidationError
in interface ServiceCommandValidator
fieldName
- the field that is not validmessageKey
- the i18n key for the validation error messagepublic final void addValidationError(String messageKey, Object... messageArguments)
addValidationError
in interface ServiceCommandValidator
messageKey
- the i18n key for the validation error messagemessageArguments
- the arguments to be merged into the error messagepublic final void addFieldValidationError(String fieldName, String messageKey, Object... messageArguments)
addFieldValidationError
in interface ServiceCommandValidator
fieldName
- the field that is not validmessageKey
- the i18n key for the validation error messagemessageArguments
- the arguments to be merged into the error message.public void addFieldValidationError(FieldValidationError fieldError)
ServiceCommandValidator
addFieldValidationError
in interface ServiceCommandValidator
fieldError
- the error to addpublic Collection<ValidationError> getValidationErrors()
ServiceCommandValidator
getValidationErrors
in interface ServiceCommandValidator
Copyright © 2003–2017 Atlassian. All rights reserved.