Class DefaultServiceCommandValidator
java.lang.Object
com.atlassian.confluence.core.service.DefaultServiceCommandValidator
- All Implemented Interfaces:
ServiceCommandValidator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldValidationError
(FieldValidationError fieldError) Add a new field validation error.final void
addFieldValidationError
(String fieldName, String messageKey) Add a new validation error.final void
addFieldValidationError
(String fieldName, String messageKey, Object... messageArguments) Add a new validation error.final void
addValidationError
(String messageKey, Object... messageArguments) Add a new validation error.Get all validation errors.
-
Constructor Details
-
DefaultServiceCommandValidator
public DefaultServiceCommandValidator()
-
-
Method Details
-
addFieldValidationError
Add a new validation error. This method must only be called during validation.- Specified by:
addFieldValidationError
in interfaceServiceCommandValidator
- Parameters:
fieldName
- the field that is not validmessageKey
- the i18n key for the validation error message
-
addValidationError
Add a new validation error. This method must only be called during validation.- Specified by:
addValidationError
in interfaceServiceCommandValidator
- Parameters:
messageKey
- the i18n key for the validation error messagemessageArguments
- the arguments to be merged into the error message
-
addFieldValidationError
public final void addFieldValidationError(String fieldName, String messageKey, Object... messageArguments) Add a new validation error. This method must only be called during validation.- Specified by:
addFieldValidationError
in interfaceServiceCommandValidator
- 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
Description copied from interface:ServiceCommandValidator
Add a new field validation error.- Specified by:
addFieldValidationError
in interfaceServiceCommandValidator
- Parameters:
fieldError
- the error to add
-
getValidationErrors
Description copied from interface:ServiceCommandValidator
Get all validation errors.- Specified by:
getValidationErrors
in interfaceServiceCommandValidator
- Returns:
- validation errors.
-