public class ContributionImpl<K,T> extends Object implements Contribution<K,T>
| Modifier and Type | Field and Description |
|---|---|
protected Set<Contribution<K,T>> |
dependencies |
protected Set<Contribution<K,T>> |
dependents |
protected List<T> |
fragments |
protected boolean |
isResolved |
protected List<T> |
mainFragments |
protected K |
primaryKey |
protected AbstractContributionRegistry<K,T> |
registry |
protected T |
value |
| Constructor and Description |
|---|
ContributionImpl(AbstractContributionRegistry<K,T> reg,
K primaryKey) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFragment(T fragment,
K... superKeys) |
protected boolean |
checkIsResolved() |
boolean |
equals(Object obj) |
Set<Contribution<K,T>> |
getDependencies() |
Set<Contribution<K,T>> |
getDependents() |
T |
getFragment(int index) |
K |
getId() |
ContributionRegistry<K,T> |
getRegistry() |
Set<Contribution<K,T>> |
getUnresolvedDependencies() |
T |
getValue() |
boolean |
isEmpty() |
boolean |
isPhantom() |
boolean |
isRegistered() |
boolean |
isResolved() |
Iterator<T> |
iterator() |
boolean |
removeFragment(Object fragment) |
void |
resolve() |
int |
size() |
String |
toString() |
void |
unregister() |
void |
unresolve() |
protected void |
update()
Called each time a fragment is added or removed to update resolved state and to fire update notifications to the
registry owning that contribution
|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorprotected final AbstractContributionRegistry<K,T> registry
protected final K primaryKey
protected final List<T> mainFragments
protected final Set<Contribution<K,T>> dependencies
protected final Set<Contribution<K,T>> dependents
protected boolean isResolved
public ContributionImpl(AbstractContributionRegistry<K,T> reg, K primaryKey)
public ContributionRegistry<K,T> getRegistry()
getRegistry in interface Contribution<K,T>public Set<Contribution<K,T>> getDependencies()
getDependencies in interface Contribution<K,T>public Set<Contribution<K,T>> getDependents()
getDependents in interface Contribution<K,T>public Set<Contribution<K,T>> getUnresolvedDependencies()
getUnresolvedDependencies in interface Contribution<K,T>protected boolean checkIsResolved()
public int size()
size in interface Contribution<K,T>public boolean isEmpty()
isEmpty in interface Contribution<K,T>public T getFragment(int index)
getFragment in interface Contribution<K,T>public boolean removeFragment(Object fragment)
removeFragment in interface Contribution<K,T>public void addFragment(T fragment, K... superKeys)
addFragment in interface Contribution<K,T>public boolean isPhantom()
isPhantom in interface Contribution<K,T>public boolean isResolved()
isResolved in interface Contribution<K,T>public boolean isRegistered()
isRegistered in interface Contribution<K,T>protected void update()
public void unregister()
unregister in interface Contribution<K,T>public void unresolve()
unresolve in interface Contribution<K,T>public void resolve()
resolve in interface Contribution<K,T>Copyright © 2016 Nuxeo SA. All rights reserved.