public final class AggregateValidationStatus extends ComputedValue<IStatus>
IStatus, or the static methods
can be called directly if an aggregated status result is only needed once.| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
AggregateValidationStatus(DataBindingContext dbc,
int strategy)
Creates a new aggregate validation status observable for the given data
binding context.
|
AggregateValidationStatus(IObservableCollection<? extends ValidationStatusProvider> validationStatusProviders,
int strategy) |
AggregateValidationStatus(Realm realm,
IObservableCollection<? extends ValidationStatusProvider> validationStatusProviders,
int strategy) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addListener(java.lang.Object listenerType,
IObservablesListener listener) |
protected IStatus |
calculate()
Subclasses must override this method to provide the object's value.
|
protected java.lang.Object |
clone() |
protected void |
fireEvent(ObservableEvent event) |
protected void |
firstListenerAdded() |
Realm |
getRealm() |
static IStatus |
getStatusMaxSeverity(java.util.Collection<? extends ValidationStatusProvider> validationStatusProviders)
Returns a status that always returns the most severe status from the
given validation status providers.
|
static IStatus |
getStatusMerged(java.util.Collection<? extends ValidationStatusProvider> validationStatusProviders)
Returns a status object that merges multiple non-OK status objects in a
MultiStatus. |
protected void |
lastListenerRemoved() |
protected void |
removeListener(java.lang.Object listenerType,
IObservablesListener listener) |
addChangeListener, addValueChangeListener, create, dispose, doGetValue, getValueType, hasListeners, isStale, makeDirtydoSetValue, fireChange, fireValueChange, getValue, removeValueChangeListener, setValueaddDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListenerequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddDisposeListener, addStaleListener, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListenerpublic 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
public AggregateValidationStatus(DataBindingContext dbc, int strategy)
dbc - a data binding contextstrategy - a strategy constant, one of MERGED or
MAX_SEVERITY.public AggregateValidationStatus(IObservableCollection<? extends ValidationStatusProvider> 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<? extends ValidationStatusProvider> validationStatusProviders, int strategy)
realm - RealmvalidationStatusProviders - an observable collection containing elements of type
ValidationStatusProviderstrategy - a strategy constant, one of MERGED or
MAX_SEVERITY.DataBindingContext.getValidationStatusProviders()protected IStatus calculate()
ComputedValueIObservable, and
implementers must use one of the interface methods tagged TrackedGetter
for ComputedValue to recognize it as a dependency.calculate in class ComputedValue<IStatus>public static IStatus getStatusMerged(java.util.Collection<? extends ValidationStatusProvider> 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 providerspublic static IStatus getStatusMaxSeverity(java.util.Collection<? extends ValidationStatusProvider> validationStatusProviders)
validationStatusProviders - a collection of validation status providersprotected void addListener(java.lang.Object listenerType,
IObservablesListener listener)
listenerType - listener - protected void removeListener(java.lang.Object listenerType,
IObservablesListener listener)
listenerType - listener - protected void fireEvent(ObservableEvent event)
protected void firstListenerAdded()
protected void lastListenerRemoved()
public Realm getRealm()
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.