net.sf.doolin.gui.validation.support
Interface ObjectValidator

All Known Implementing Classes:
DirExistsObjectValidator, FalseObjectValidator, NotBlankObjectValidator, NotEmptyObjectValidator, NotNullObjectValidator, TrueObjectValidator

public interface ObjectValidator

Definition of a validator.

Author:
Damien Coraboeuf

Method Summary
 String getMsgKey()
          Gets the string key of the validation error message
 Object[] getParams(String name)
          Gets the parameters for the validation error message
 boolean validate(Object value)
          Validates the value.
 

Method Detail

validate

boolean validate(Object value)
Validates the value.

Parameters:
value - Value to check
Returns:
Result of the validation (true if there is no validationerror)

getMsgKey

String getMsgKey()
Gets the string key of the validation error message

Returns:
String key

getParams

Object[] getParams(String name)
Gets the parameters for the validation error message

Parameters:
name - Name of the object that has been tested
Returns:
List of parameters for the validation error message


Copyright © 2011. All Rights Reserved.