Class DefaultServiceCommandValidator
- java.lang.Object
-
- com.atlassian.confluence.core.service.DefaultServiceCommandValidator
-
- All Implemented Interfaces:
ServiceCommandValidator
public class DefaultServiceCommandValidator extends Object implements ServiceCommandValidator
-
-
Constructor Summary
Constructors Constructor Description DefaultServiceCommandValidator()
-
Method Summary
All Methods Instance Methods Concrete 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
public final void addFieldValidationError(String fieldName, String messageKey)
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
public final void addValidationError(String messageKey, Object... messageArguments)
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
public void addFieldValidationError(FieldValidationError fieldError)
Description copied from interface:ServiceCommandValidator
Add a new field validation error.- Specified by:
addFieldValidationError
in interfaceServiceCommandValidator
- Parameters:
fieldError
- the error to add
-
getValidationErrors
public Collection<ValidationError> getValidationErrors()
Description copied from interface:ServiceCommandValidator
Get all validation errors.- Specified by:
getValidationErrors
in interfaceServiceCommandValidator
- Returns:
- validation errors.
-
-