KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > internal > databinding > provisional > validation > IDomainValidator


1 /*******************************************************************************
2  * Copyright (c) 2006 Coconut Palm Software, Inc. and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * Coconut Palm Software, Inc. - initial API and implementation
10  ******************************************************************************/

11
12 package org.eclipse.jface.internal.databinding.provisional.validation;
13
14 /**
15  * A validator for domain model values. If this validator is associated with
16  * a binding (via an BindSpec), then it will be applied immediately before
17  * a value is stored in the model object. This validator operates in the
18  * model's data type (after the conversion function object has been applied,
19  * if applicable) and is responsible for applying range checks, special
20  * formatting requirements, and so on.
21  * <p>
22  *
23  * FIXME: This is wrong. See bug #128142. Eventually this class will go away
24  * and be replaced entirely by IValidator.
25  *
26  * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
27  * part of a work in progress. There is no guarantee that this API will remain
28  * unchanged during the 3.2 release cycle. Please do not use this API without
29  * consulting with the Platform/UI team.
30  * </p>
31  *
32  * @since 1.0
33  *
34  */

35 public interface IDomainValidator {
36
37     /**
38      * Determines if the given value is valid.
39      *
40      * @param value
41      * the value to validate
42      * @return the error message, or </code>null</code> if the value is valid.
43      */

44     public ValidationError isValid(Object JavaDoc value);
45
46 }
47
Popular Tags