Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.contribution.impl
Class ContributionImpl<K,T>

java.lang.Object
  extended by org.nuxeo.runtime.contribution.impl.ContributionImpl<K,T>
All Implemented Interfaces:
Iterable<T>, Contribution<K,T>

public class ContributionImpl<K,T>
extends Object
implements Contribution<K,T>

Author:
Bogdan Stefanescu

Constructor Summary
ContributionImpl(AbstractContributionRegistry<K,T> reg, K primaryKey)
           
 
Method Summary
 void addFragment(T fragment, K... superKeys)
           
 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()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContributionImpl

public ContributionImpl(AbstractContributionRegistry<K,T> reg,
                        K primaryKey)
Method Detail

getRegistry

public ContributionRegistry<K,T> getRegistry()
Specified by:
getRegistry in interface Contribution<K,T>

getId

public K getId()
Specified by:
getId in interface Contribution<K,T>
Returns:
the primaryKey.

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>

getDependencies

public Set<Contribution<K,T>> getDependencies()
Specified by:
getDependencies in interface Contribution<K,T>

getDependents

public Set<Contribution<K,T>> getDependents()
Specified by:
getDependents in interface Contribution<K,T>

getUnresolvedDependencies

public Set<Contribution<K,T>> getUnresolvedDependencies()
Specified by:
getUnresolvedDependencies in interface Contribution<K,T>

size

public int size()
Specified by:
size in interface Contribution<K,T>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Contribution<K,T>

getFragment

public T getFragment(int index)
Specified by:
getFragment in interface Contribution<K,T>

removeFragment

public boolean removeFragment(Object fragment)
Specified by:
removeFragment in interface Contribution<K,T>

addFragment

public void addFragment(T fragment,
                        K... superKeys)
Specified by:
addFragment in interface Contribution<K,T>

getValue

public T getValue()
Specified by:
getValue in interface Contribution<K,T>

isPhantom

public boolean isPhantom()
Specified by:
isPhantom in interface Contribution<K,T>

isResolved

public boolean isResolved()
Specified by:
isResolved in interface Contribution<K,T>

isRegistered

public boolean isRegistered()
Specified by:
isRegistered in interface Contribution<K,T>

unregister

public void unregister()
Specified by:
unregister in interface Contribution<K,T>

unresolve

public void unresolve()
Specified by:
unresolve in interface Contribution<K,T>

resolve

public void resolve()
Specified by:
resolve in interface Contribution<K,T>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.