public abstract class AbstractContributionRegistry<K,T> extends Object implements ContributionRegistry<K,T>
Modifier and Type | Field and Description |
---|---|
protected List<AbstractContributionRegistry<K,T>> |
listeners |
protected AbstractContributionRegistry<K,T> |
parent |
protected Map<Object,Contribution<K,T>> |
registry |
Modifier | Constructor and Description |
---|---|
protected |
AbstractContributionRegistry() |
protected |
AbstractContributionRegistry(AbstractContributionRegistry<K,T> parent) |
Modifier and Type | Method and Description |
---|---|
Contribution<K,T> |
addFragment(K key,
T fragment,
K... superKeys) |
protected void |
applyFragment(T object,
T fragment)
Applies fragment over the given object.
|
protected void |
applySuperFragment(T object,
T superFragment) |
protected abstract T |
clone(T object) |
void |
dispose() |
void |
fireResolved(Contribution<K,T> contrib) |
void |
fireUnresolved(Contribution<K,T> contrib,
T value) |
void |
fireUpdated(T oldValue,
Contribution<K,T> contrib) |
Contribution<K,T> |
getContribution(K primaryKey) |
T |
getObject(K key) |
Contribution<K,T> |
getOrCreateDependency(K key) |
ContributionRegistry<K,T> |
getParent() |
protected void |
importContribution(Contribution<K,T> contrib) |
protected void |
importParentContributions() |
protected abstract void |
installContribution(K key,
T object) |
protected boolean |
isMainFragment(T object) |
void |
removeContribution(K key) |
void |
removeFragment(K key,
T fragment) |
protected abstract void |
uninstallContribution(K key,
T object) |
protected void |
updateContribution(K key,
T object,
T oldValue) |
protected final AbstractContributionRegistry<K,T> parent
protected final List<AbstractContributionRegistry<K,T>> listeners
protected AbstractContributionRegistry()
protected AbstractContributionRegistry(AbstractContributionRegistry<K,T> parent)
public ContributionRegistry<K,T> getParent()
getParent
in interface ContributionRegistry<K,T>
protected void importParentContributions()
protected void importContribution(Contribution<K,T> contrib)
public Contribution<K,T> getContribution(K primaryKey)
getContribution
in interface ContributionRegistry<K,T>
public void removeContribution(K key)
removeContribution
in interface ContributionRegistry<K,T>
public void removeFragment(K key, T fragment)
removeFragment
in interface ContributionRegistry<K,T>
public Contribution<K,T> addFragment(K key, T fragment, K... superKeys)
addFragment
in interface ContributionRegistry<K,T>
public Contribution<K,T> getOrCreateDependency(K key)
public void fireUnresolved(Contribution<K,T> contrib, T value)
public void fireResolved(Contribution<K,T> contrib)
public void fireUpdated(T oldValue, Contribution<K,T> contrib)
public void dispose()
dispose
in interface ContributionRegistry<K,T>
protected void applyFragment(T object, T fragment)
object
- fragment
- protected void applySuperFragment(T object, T superFragment)
protected abstract void installContribution(K key, T object)
protected abstract void uninstallContribution(K key, T object)
protected boolean isMainFragment(T object)
protected void updateContribution(K key, T object, T oldValue)
Copyright © 2017 Nuxeo. All rights reserved.