Class AbstractContributionRegistry<K,T>
java.lang.Object
org.nuxeo.runtime.contribution.impl.AbstractContributionRegistry<K,T>
- All Implemented Interfaces:
ContributionRegistry<K,
T>
- Direct Known Subclasses:
LinkRegistry
,TypeRegistry
public abstract class AbstractContributionRegistry<K,T>
extends Object
implements ContributionRegistry<K,T>
The parent provider is read only. It is never modified by the registry. It serves only to resolve dependencies. This
allows greater flexibility in managing dependencies. This registry may have a parent registry that can be used only
read only.
- Author:
- Bogdan Stefanescu
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<AbstractContributionRegistry<K,
T>> protected final AbstractContributionRegistry<K,
T> protected final Map<Object,
Contribution<K, T>> -
Constructor Summary
ModifierConstructorDescriptionprotected
protected
-
Method Summary
Modifier and TypeMethodDescriptionaddFragment
(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
void
dispose()
void
fireResolved
(Contribution<K, T> contrib) void
fireUnresolved
(Contribution<K, T> contrib, T value) void
fireUpdated
(T oldValue, Contribution<K, T> contrib) getContribution
(K primaryKey) getOrCreateDependency
(K key) protected void
importContribution
(Contribution<K, T> contrib) protected void
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)
-
Field Details
-
registry
-
parent
-
listeners
-
-
Constructor Details
-
AbstractContributionRegistry
protected AbstractContributionRegistry() -
AbstractContributionRegistry
-
-
Method Details
-
getParent
- Specified by:
getParent
in interfaceContributionRegistry<K,
T>
-
importParentContributions
protected void importParentContributions() -
importContribution
-
getContribution
- Specified by:
getContribution
in interfaceContributionRegistry<K,
T>
-
getObject
-
removeContribution
- Specified by:
removeContribution
in interfaceContributionRegistry<K,
T>
-
removeFragment
- Specified by:
removeFragment
in interfaceContributionRegistry<K,
T>
-
addFragment
- Specified by:
addFragment
in interfaceContributionRegistry<K,
T>
-
getOrCreateDependency
-
fireUnresolved
-
fireResolved
-
fireUpdated
-
dispose
public void dispose()- Specified by:
dispose
in interfaceContributionRegistry<K,
T>
-
clone
-
applyFragment
Applies fragment over the given object. -
applySuperFragment
-
installContribution
-
uninstallContribution
-
isMainFragment
-
updateContribution
-