view org.eclipse.core.databinding/src/org/eclipse/core/databinding/ValidationStatusProvider.d @ 125:c43718956f21 default tip

Updated the snippets status.
author Jacob Carlborg <doob@me.com>
date Thu, 11 Aug 2011 19:55:14 +0200
parents 0a55d2d5a946
children
line wrap: on
line source

/*******************************************************************************
 * Copyright (c) 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Boris Bokowski - initial API and implementation (bug 218269)
 *     Matthew Hall - bug 218269
 ******************************************************************************/

module org.eclipse.core.databinding.ValidationStatusProvider;

import java.lang.all;

import org.eclipse.core.databinding.observable.IObservable;
import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;

/**
 * A validation status provider tracks the state of zero or more target
 * observables and zero or more model observables and produces a validation
 * result.
 * 
 * @since 1.1
 * 
 */
public abstract class ValidationStatusProvider {

    protected bool disposed = false;

    /**
     * @return an observable value containing the current validation status
     */
    public abstract IObservableValue getValidationStatus();

    /**
     * Returns the list of target observables (if any) that are being tracked by
     * this validation status provider.
     * 
     * @return an observable list of target {@link IObservable}s (may be empty)
     */
    public abstract IObservableList getTargets();

    /**
     * Returns the model observables (if any) that are being tracked by this
     * validation status provider.
     * 
     * @return an observable list of model {@link IObservable}s (may be empty)
     */
    public abstract IObservableList getModels();

    /**
     * Disposes of this ValidationStatusProvider. Subclasses may extend, but
     * must call super.dispose().
     */
    public void dispose() {
        disposed = true;
    }

    /**
     * @return true if the binding has been disposed. false otherwise.
     */
    public bool isDisposed() {
        return disposed;
    }
}