fr.jayasoft.ivy
Class IvyNode

java.lang.Object
  extended byfr.jayasoft.ivy.IvyNode

public class IvyNode
extends java.lang.Object


Nested Class Summary
 class IvyNode.Caller
           
static class IvyNode.EvictionData
           
 
Constructor Summary
IvyNode(ResolveData data, IvyNode parent, DependencyDescriptor dd)
           
IvyNode(ResolveData data, ModuleDescriptor md)
           
 
Method Summary
 void addCaller(java.lang.String rootModuleConf, IvyNode node, java.lang.String callerConf, java.lang.String[] dependencyConfs, DependencyDescriptor dd)
           
 void discardConf(java.lang.String conf)
           
 void discardConf(java.lang.String rootModuleConf, java.lang.String conf)
           
 boolean equals(java.lang.Object obj)
           
 IvyNode findNode(ModuleRevisionId mrid)
           
 Artifact[] getAllArtifacts()
          Returns all the artifacts of this dependency required in all the root module configurations
 IvyNode.Caller[] getAllCallers()
           
 java.util.Collection getAllEvictingConflictManagers()
           
 java.util.Collection getAllEvictingNodes()
          Returns null if this node has only be evicted transitively, or the the colletion of selected nodes if it has been evicted by other selected nodes
 Artifact[] getArtifacts(java.lang.String rootModuleConf)
          Returns the artifacts of this dependency required in the configurations themselves required in the given root module configuration
 IvyNode.Caller[] getCallers(java.lang.String rootModuleConf)
           
 Configuration getConfiguration(java.lang.String conf)
           
 java.lang.String[] getConfigurations(java.lang.String rootModuleConf)
          Returns the configurations of the dependency required in a given root module configuration.
 ConflictManager getConflictManager(ModuleId mid)
           
 java.lang.String[] getConfsToFetch()
           
 java.util.Collection getDependencies(java.lang.String[] confs)
           
 java.util.Collection getDependencies(java.lang.String conf, boolean traverse)
           
 DependencyDescriptor getDependencyDescriptor(IvyNode parent)
           
 ModuleDescriptor getDescriptor()
           
 java.lang.String[] getEvictedConfs()
           
 IvyNode.EvictionData getEvictedData(java.lang.String rootModuleConf)
           
 java.util.Collection getEvictedNodes(ModuleId mid, java.lang.String rootModuleConf)
           
 java.util.Collection getEvictedRevisions(ModuleId mid, java.lang.String rootModuleConf)
           
 IvyNode.EvictionData getEvictionDataInRoot(java.lang.String rootModuleConf, IvyNode parent)
          Returns the eviction data for this node if it has been previously evicted in the most far parent of the given node, null otherwise (if it hasn't been evicted in root) for the given rootModuleConf.
 ModuleRevisionId getId()
           
 ModuleId getModuleId()
           
 ResolvedModuleRevision getModuleRevision()
           
 IvyNode getParent()
           
 java.lang.String getParentConf()
           
 java.util.Collection getPath()
           
 java.lang.Exception getProblem()
           
 long getPublication()
           
 java.lang.String[] getRealConfs(java.lang.String conf)
           
 IvyNode getRealNode()
           
 java.lang.String[] getRequiredConfigurations()
          returns all the current required configurations of the node
 java.lang.String[] getRequiredConfigurations(IvyNode in, java.lang.String inConf)
          returns the required configurations from the given node
 ModuleRevisionId getResolvedId()
           
 java.util.Collection getResolvedNodes(ModuleId mid, java.lang.String rootModuleConf)
           
 java.util.Collection getResolvedRevisions(ModuleId mid, java.lang.String rootModuleConf)
           
 IvyNode getRoot()
           
static IvyNode getRoot(IvyNode parent)
           
 java.lang.String getRootModuleConf()
           
 java.lang.String[] getRootModuleConfigurations()
          Returns the root module configurations in which this dependency is required
 Artifact[] getSelectedArtifacts(fr.jayasoft.ivy.filter.Filter artifactFilter)
          Returns all the artifacts of this dependency required in the root module configurations in which the node is not evicted
 boolean hasConfigurationsToLoad()
           
 int hashCode()
           
 boolean hasProblem()
           
 boolean isCircular()
          Returns true if this node can already be found among its callers
 boolean isCompletelyEvicted()
           
 boolean isDownloaded()
           
 boolean isEvicted(java.lang.String rootModuleConf)
           
 boolean isFetched(java.lang.String conf)
           
 boolean isLoaded()
           
 boolean isSearched()
           
 boolean loadData(java.lang.String conf, boolean shouldBePublic)
          After the call node may be discarded.
 void markEvicted(IvyNode.EvictionData evictionData)
           
 void markEvicted(java.lang.String rootModuleConf, IvyNode node, ConflictManager conflictManager, java.util.Collection resolved)
           
 void markSelected(java.lang.String rootModuleConf)
           
 void setEvictedNodes(ModuleId moduleId, java.lang.String rootModuleConf, java.util.Collection evicted)
           
 void setParent(IvyNode parent)
           
 void setParentConf(java.lang.String parentConf)
           
 void setResolvedNodes(ModuleId moduleId, java.lang.String rootModuleConf, java.util.Collection resolved)
           
 void setRootModuleConf(java.lang.String rootModuleConf)
           
 java.lang.String toString()
           
 void updateConfsToFetch(java.util.Collection confs)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IvyNode

public IvyNode(ResolveData data,
               IvyNode parent,
               DependencyDescriptor dd)

IvyNode

public IvyNode(ResolveData data,
               ModuleDescriptor md)
Method Detail

getConflictManager

public ConflictManager getConflictManager(ModuleId mid)

getResolvedNodes

public java.util.Collection getResolvedNodes(ModuleId mid,
                                             java.lang.String rootModuleConf)

getResolvedRevisions

public java.util.Collection getResolvedRevisions(ModuleId mid,
                                                 java.lang.String rootModuleConf)

setResolvedNodes

public void setResolvedNodes(ModuleId moduleId,
                             java.lang.String rootModuleConf,
                             java.util.Collection resolved)

getEvictedNodes

public java.util.Collection getEvictedNodes(ModuleId mid,
                                            java.lang.String rootModuleConf)

getEvictedRevisions

public java.util.Collection getEvictedRevisions(ModuleId mid,
                                                java.lang.String rootModuleConf)

setEvictedNodes

public void setEvictedNodes(ModuleId moduleId,
                            java.lang.String rootModuleConf,
                            java.util.Collection evicted)

isEvicted

public boolean isEvicted(java.lang.String rootModuleConf)

markSelected

public void markSelected(java.lang.String rootModuleConf)

markEvicted

public void markEvicted(java.lang.String rootModuleConf,
                        IvyNode node,
                        ConflictManager conflictManager,
                        java.util.Collection resolved)

markEvicted

public void markEvicted(IvyNode.EvictionData evictionData)

getEvictedData

public IvyNode.EvictionData getEvictedData(java.lang.String rootModuleConf)

getEvictedConfs

public java.lang.String[] getEvictedConfs()

isCompletelyEvicted

public boolean isCompletelyEvicted()

getAllEvictingNodes

public java.util.Collection getAllEvictingNodes()
Returns null if this node has only be evicted transitively, or the the colletion of selected nodes if it has been evicted by other selected nodes

Returns:

getAllEvictingConflictManagers

public java.util.Collection getAllEvictingConflictManagers()

getParent

public IvyNode getParent()

setParent

public void setParent(IvyNode parent)

getRoot

public IvyNode getRoot()

getPath

public java.util.Collection getPath()

getParentConf

public java.lang.String getParentConf()

setParentConf

public void setParentConf(java.lang.String parentConf)

hasConfigurationsToLoad

public boolean hasConfigurationsToLoad()

loadData

public boolean loadData(java.lang.String conf,
                        boolean shouldBePublic)
After the call node may be discarded. To avoid using discarded node, make sure to get the real node after the call IvyNode node = ... node.loadData(); node = node.getRealNode(); ...


getRealNode

public IvyNode getRealNode()

getDependencies

public java.util.Collection getDependencies(java.lang.String[] confs)

getDependencies

public java.util.Collection getDependencies(java.lang.String conf,
                                            boolean traverse)

getId

public ModuleRevisionId getId()

updateConfsToFetch

public void updateConfsToFetch(java.util.Collection confs)

getModuleId

public ModuleId getModuleId()

isLoaded

public boolean isLoaded()

getDescriptor

public ModuleDescriptor getDescriptor()

getRequiredConfigurations

public java.lang.String[] getRequiredConfigurations(IvyNode in,
                                                    java.lang.String inConf)
returns the required configurations from the given node

Parameters:
in -
Returns:

getRequiredConfigurations

public java.lang.String[] getRequiredConfigurations()
returns all the current required configurations of the node

Returns:

getConfiguration

public Configuration getConfiguration(java.lang.String conf)

getModuleRevision

public ResolvedModuleRevision getModuleRevision()

addCaller

public void addCaller(java.lang.String rootModuleConf,
                      IvyNode node,
                      java.lang.String callerConf,
                      java.lang.String[] dependencyConfs,
                      DependencyDescriptor dd)
Parameters:
rootModuleConf -
callerConf -
dependencyConfs - '*' must have been resolved
dd - the dependency revision id asked by the caller

getCallers

public IvyNode.Caller[] getCallers(java.lang.String rootModuleConf)

getAllCallers

public IvyNode.Caller[] getAllCallers()

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

getConfigurations

public java.lang.String[] getConfigurations(java.lang.String rootModuleConf)
Returns the configurations of the dependency required in a given root module configuration.

Parameters:
rootModuleConf -
Returns:

discardConf

public void discardConf(java.lang.String conf)

discardConf

public void discardConf(java.lang.String rootModuleConf,
                        java.lang.String conf)

getRootModuleConfigurations

public java.lang.String[] getRootModuleConfigurations()
Returns the root module configurations in which this dependency is required

Returns:

getAllArtifacts

public Artifact[] getAllArtifacts()
Returns all the artifacts of this dependency required in all the root module configurations

Returns:

getSelectedArtifacts

public Artifact[] getSelectedArtifacts(fr.jayasoft.ivy.filter.Filter artifactFilter)
Returns all the artifacts of this dependency required in the root module configurations in which the node is not evicted

Parameters:
artifactFilter -
Returns:

getArtifacts

public Artifact[] getArtifacts(java.lang.String rootModuleConf)
Returns the artifacts of this dependency required in the configurations themselves required in the given root module configuration

Parameters:
rootModuleConf -
Returns:

getPublication

public long getPublication()

getDependencyDescriptor

public DependencyDescriptor getDependencyDescriptor(IvyNode parent)

hasProblem

public boolean hasProblem()

getResolvedId

public ModuleRevisionId getResolvedId()

getProblem

public java.lang.Exception getProblem()

isDownloaded

public boolean isDownloaded()

isSearched

public boolean isSearched()

getRootModuleConf

public java.lang.String getRootModuleConf()

setRootModuleConf

public void setRootModuleConf(java.lang.String rootModuleConf)

getConfsToFetch

public java.lang.String[] getConfsToFetch()

isCircular

public boolean isCircular()
Returns true if this node can already be found among its callers

Returns:

isFetched

public boolean isFetched(java.lang.String conf)

getEvictionDataInRoot

public IvyNode.EvictionData getEvictionDataInRoot(java.lang.String rootModuleConf,
                                                  IvyNode parent)
Returns the eviction data for this node if it has been previously evicted in the most far parent of the given node, null otherwise (if it hasn't been evicted in root) for the given rootModuleConf. Note that this method only works if conflict resolution has already be done in all the ancestors.

Parameters:
rootModuleConf -
parent -
Returns:

getRoot

public static IvyNode getRoot(IvyNode parent)

findNode

public IvyNode findNode(ModuleRevisionId mrid)

getRealConfs

public java.lang.String[] getRealConfs(java.lang.String conf)