net.sf.doolin.gui.validation.support
Class NotEmptyObjectValidator

java.lang.Object
  extended by net.sf.doolin.gui.validation.support.NotEmptyObjectValidator
All Implemented Interfaces:
ObjectValidator

public class NotEmptyObjectValidator
extends Object
implements ObjectValidator

This validator checks that the object is not empty.

Author:
Damien Coraboeuf
See Also:
StringUtils.isNotBlank(String), Collection.isEmpty()

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

Constructor Detail

NotEmptyObjectValidator

public NotEmptyObjectValidator()
Method Detail

getMsgKey

public String getMsgKey()
Description copied from interface: ObjectValidator
Gets the string key of the validation error message

Specified by:
getMsgKey in interface ObjectValidator
Returns:
String key

getParams

public Object[] getParams(String name)
Description copied from interface: ObjectValidator
Gets the parameters for the validation error message

Specified by:
getParams in interface ObjectValidator
Parameters:
name - Name of the object that has been tested
Returns:
List of parameters for the validation error message

validate

public boolean validate(Object value)
Description copied from interface: ObjectValidator
Validates the value.

Specified by:
validate in interface ObjectValidator
Parameters:
value - Value to check
Returns:
Result of the validation (true if there is no validationerror)


Copyright © 2011. All Rights Reserved.