|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.databinding.observable.AbstractObservable
org.eclipse.core.databinding.observable.value.AbstractObservableValue
org.eclipse.core.databinding.observable.value.ComputedValue
org.eclipse.core.databinding.AggregateValidationStatus
public final class AggregateValidationStatus
This class can be used to aggregate status values from a data binding context
into a single status value. Instances of this class can be used as an
observable value with a value type of IStatus, or the static methods
can be called directly if an aggregated status result is only needed once.
| Field Summary | |
|---|---|
static int |
MAX_SEVERITY
Constant denoting an aggregation strategy that always returns the most severe status from the given validation status providers. |
static int |
MERGED
Constant denoting an aggregation strategy that merges multiple non-OK status objects in a MultiStatus. |
| Constructor Summary | |
|---|---|
AggregateValidationStatus(DataBindingContext dbc,
int strategy)
Creates a new aggregate validation status observable for the given data binding context. |
|
AggregateValidationStatus(IObservableCollection validationStatusProviders,
int strategy)
|
|
AggregateValidationStatus(Realm realm,
IObservableCollection validationStatusProviders,
int strategy)
|
|
| Method Summary | |
|---|---|
protected void |
addListener(Object listenerType,
IObservablesListener listener)
|
protected Object |
calculate()
Subclasses must override this method to provide the object's value. |
protected Object |
clone()
|
protected void |
fireEvent(ObservableEvent event)
|
protected void |
firstListenerAdded()
|
Realm |
getRealm()
|
static IStatus |
getStatusMaxSeverity(Collection validationStatusProviders)
Returns a status that always returns the most severe status from the given validation status providers. |
static IStatus |
getStatusMerged(Collection validationStatusProviders)
Returns a status object that merges multiple non-OK status objects in a MultiStatus. |
protected void |
lastListenerRemoved()
|
protected void |
removeListener(Object listenerType,
IObservablesListener listener)
|
| Methods inherited from class org.eclipse.core.databinding.observable.value.ComputedValue |
|---|
addChangeListener, addValueChangeListener, dispose, doGetValue, getValueType, hasListeners, isStale, makeDirty |
| Methods inherited from class org.eclipse.core.databinding.observable.value.AbstractObservableValue |
|---|
doSetValue, fireChange, fireValueChange, getValue, removeValueChangeListener, setValue |
| Methods inherited from class org.eclipse.core.databinding.observable.AbstractObservable |
|---|
addDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.databinding.observable.IObservable |
|---|
addDisposeListener, addStaleListener, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener |
| Field Detail |
|---|
public static final int MERGED
MultiStatus. Returns an OK status result if
all statuses from the given validation status providers are the an OK
status. Returns a single status if there is only one non-OK status.
getStatusMerged(Collection),
Constant Field Valuespublic static final int MAX_SEVERITY
getStatusMaxSeverity(Collection),
Constant Field Values| Constructor Detail |
|---|
public AggregateValidationStatus(DataBindingContext dbc,
int strategy)
dbc - a data binding contextstrategy - a strategy constant, one of MERGED or
MAX_SEVERITY.
public AggregateValidationStatus(IObservableCollection validationStatusProviders,
int strategy)
validationStatusProviders - an observable collection containing elements of type
ValidationStatusProviderstrategy - a strategy constant, one of MERGED or
MAX_SEVERITY.DataBindingContext.getValidationStatusProviders()
public AggregateValidationStatus(Realm realm,
IObservableCollection validationStatusProviders,
int strategy)
realm - RealmvalidationStatusProviders - an observable collection containing elements of type
ValidationStatusProviderstrategy - a strategy constant, one of MERGED or
MAX_SEVERITY.DataBindingContext.getValidationStatusProviders()| Method Detail |
|---|
protected Object calculate()
ComputedValueIObservable, and
implementers must use one of the interface methods tagged TrackedGetter
for ComputedValue to recognize it as a dependency.
calculate in class ComputedValuepublic static IStatus getStatusMerged(Collection validationStatusProviders)
MultiStatus. Returns an OK status result if all statuses from the
given validation status providers are the an OK status. Returns a single
status if there is only one non-OK status.
validationStatusProviders - a collection of validation status providers
public static IStatus getStatusMaxSeverity(Collection validationStatusProviders)
validationStatusProviders - a collection of validation status providers
protected void addListener(Object listenerType,
IObservablesListener listener)
listenerType - listener -
protected void removeListener(Object listenerType,
IObservablesListener listener)
listenerType - listener - protected void fireEvent(ObservableEvent event)
protected void firstListenerAdded()
protected void lastListenerRemoved()
public Realm getRealm()
protected Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.