Class DefaultServiceCommandValidator

java.lang.Object
com.atlassian.confluence.core.service.DefaultServiceCommandValidator
All Implemented Interfaces:
ServiceCommandValidator

public class DefaultServiceCommandValidator extends Object implements ServiceCommandValidator
  • Constructor Details

    • DefaultServiceCommandValidator

      public DefaultServiceCommandValidator()
  • Method Details

    • 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 interface ServiceCommandValidator
      Parameters:
      fieldName - the field that is not valid
      messageKey - 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 interface ServiceCommandValidator
      Parameters:
      messageKey - the i18n key for the validation error message
      messageArguments - 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 interface ServiceCommandValidator
      Parameters:
      fieldName - the field that is not valid
      messageKey - the i18n key for the validation error message
      messageArguments - 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 interface ServiceCommandValidator
      Parameters:
      fieldError - the error to add
    • getValidationErrors

      public Collection<ValidationError> getValidationErrors()
      Description copied from interface: ServiceCommandValidator
      Get all validation errors.
      Specified by:
      getValidationErrors in interface ServiceCommandValidator
      Returns:
      validation errors.