comparison org.eclipse.core.databinding/src/org/eclipse/core/databinding/ValidationStatusProvider.d @ 78:0a55d2d5a946

Added file for databinding
author Frank Benoit <benoit@tionex.de>
date Tue, 14 Apr 2009 11:35:29 +0200
parents
children
comparison
equal deleted inserted replaced
76:f05e6e8b2f2d 78:0a55d2d5a946
1 /*******************************************************************************
2 * Copyright (c) 2008 IBM Corporation 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 * Boris Bokowski - initial API and implementation (bug 218269)
10 * Matthew Hall - bug 218269
11 ******************************************************************************/
12
13 module org.eclipse.core.databinding.ValidationStatusProvider;
14
15 import java.lang.all;
16
17 import org.eclipse.core.databinding.observable.IObservable;
18 import org.eclipse.core.databinding.observable.list.IObservableList;
19 import org.eclipse.core.databinding.observable.value.IObservableValue;
20
21 /**
22 * A validation status provider tracks the state of zero or more target
23 * observables and zero or more model observables and produces a validation
24 * result.
25 *
26 * @since 1.1
27 *
28 */
29 public abstract class ValidationStatusProvider {
30
31 protected bool disposed = false;
32
33 /**
34 * @return an observable value containing the current validation status
35 */
36 public abstract IObservableValue getValidationStatus();
37
38 /**
39 * Returns the list of target observables (if any) that are being tracked by
40 * this validation status provider.
41 *
42 * @return an observable list of target {@link IObservable}s (may be empty)
43 */
44 public abstract IObservableList getTargets();
45
46 /**
47 * Returns the model observables (if any) that are being tracked by this
48 * validation status provider.
49 *
50 * @return an observable list of model {@link IObservable}s (may be empty)
51 */
52 public abstract IObservableList getModels();
53
54 /**
55 * Disposes of this ValidationStatusProvider. Subclasses may extend, but
56 * must call super.dispose().
57 */
58 public void dispose() {
59 disposed = true;
60 }
61
62 /**
63 * @return true if the binding has been disposed. false otherwise.
64 */
65 public bool isDisposed() {
66 return disposed;
67 }
68 }