Class ContributionImpl<K,T>
java.lang.Object
org.nuxeo.runtime.contribution.impl.ContributionImpl<K,T>
- All Implemented Interfaces:
Iterable<T>
,Contribution<K,
T>
- Author:
- Bogdan Stefanescu
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Set<Contribution<K,
T>> protected final Set<Contribution<K,
T>> protected boolean
protected final K
protected final AbstractContributionRegistry<K,
T> protected T
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFragment
(T fragment, K... superKeys) protected boolean
boolean
Set<Contribution<K,
T>> Set<Contribution<K,
T>> getFragment
(int index) getId()
Set<Contribution<K,
T>> getValue()
int
hashCode()
boolean
isEmpty()
boolean
boolean
boolean
iterator()
boolean
removeFragment
(Object fragment) void
resolve()
int
size()
toString()
void
void
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 contributionMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
registry
-
-
mainFragments
-
fragments
-
dependencies
-
dependents
-
value
-
isResolved
protected boolean isResolved
-
-
Constructor Details
-
ContributionImpl
-
-
Method Details
-
getRegistry
- Specified by:
getRegistry
in interfaceContribution<K,
T>
-
getId
- Specified by:
getId
in interfaceContribution<K,
T> - Returns:
- the primaryKey.
-
iterator
-
getDependencies
- Specified by:
getDependencies
in interfaceContribution<K,
T>
-
getDependents
- Specified by:
getDependents
in interfaceContribution<K,
T>
-
getUnresolvedDependencies
- Specified by:
getUnresolvedDependencies
in interfaceContribution<K,
T>
-
checkIsResolved
protected boolean checkIsResolved() -
size
public int size()- Specified by:
size
in interfaceContribution<K,
T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceContribution<K,
T>
-
getFragment
- Specified by:
getFragment
in interfaceContribution<K,
T>
-
removeFragment
- Specified by:
removeFragment
in interfaceContribution<K,
T>
-
addFragment
- Specified by:
addFragment
in interfaceContribution<K,
T>
-
getValue
- Specified by:
getValue
in interfaceContribution<K,
T>
-
isPhantom
public boolean isPhantom()- Specified by:
isPhantom
in interfaceContribution<K,
T>
-
isResolved
public boolean isResolved()- Specified by:
isResolved
in interfaceContribution<K,
T>
-
isRegistered
public boolean isRegistered()- Specified by:
isRegistered
in interfaceContribution<K,
T>
-
update
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 -
unregister
public void unregister()- Specified by:
unregister
in interfaceContribution<K,
T>
-
unresolve
public void unresolve()- Specified by:
unresolve
in interfaceContribution<K,
T>
-
resolve
public void resolve()- Specified by:
resolve
in interfaceContribution<K,
T>
-
hashCode
public int hashCode() -
equals
-
toString
-