Debian Codegraph @

src/com/jidesoft/validation/Validator.java

raw
1 /*
2 * @(#)Validator.java
3 *
4 * Copyright 2002 - 2005 JIDE Software Inc. All rights reserved.
5 */
6 package com.jidesoft.validation;
7
8 import java.util.EventListener;
9
10 /**
11 * <code>Validator</code> is an interface for validating a object.
12 */
13 public interface Validator extends EventListener {
14
15 /**
16 * Validates the value in the ValidationObject.
17 * <p/>
18 * The event has both old value and new value as well as the source who sends this object.
19 * The implementation of this method should validate if the
20 * value is valid. If the value is valid, simply return ValidationResult.OK.
21 * Otherwise, constructs a ValidationResult and provide the id and message.
22 *
23 * @param vo the ValidationObject
24 * @return ValidationResult
25 */
26 ValidationResult validating(ValidationObject vo);
27 }