com.atlassian.confluence.core.service
Class DefaultServiceCommandValidator

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

public class DefaultServiceCommandValidator
extends Object
implements ServiceCommandValidator


Constructor Summary
DefaultServiceCommandValidator()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServiceCommandValidator

public DefaultServiceCommandValidator()
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 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.

getValidationErrors

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

Specified by:
getValidationErrors in interface ServiceCommandValidator
Returns:
validation errors.


Copyright © 2003-2013 Atlassian. All Rights Reserved.