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

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

public class DirExistsObjectValidator
extends Object
implements ObjectValidator

Validator that checks if a File is a directory and exists.

Author:
Damien Coraboeuf

Constructor Summary
DirExistsObjectValidator()
           
 
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)
          The value must be a File, must be a directory and must exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirExistsObjectValidator

public DirExistsObjectValidator()
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)
The value must be a File, must be a directory and must exist.

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.