public class IvyNode
extends java.lang.Object
implements java.lang.Comparable
Constructor and Description |
---|
IvyNode(ResolveData data,
IvyNode parent,
DependencyDescriptor dd) |
IvyNode(ResolveData data,
ModuleDescriptor md) |
Modifier and Type | Method and Description |
---|---|
void |
addCaller(java.lang.String rootModuleConf,
IvyNode callerNode,
java.lang.String callerConf,
java.lang.String requestedConf,
java.lang.String[] dependencyConfs,
DependencyDescriptor dd) |
void |
blacklist(IvyNodeBlacklist bdata)
Blacklists the current node, so that a new resolve process won't ever consider this node as
available in the repository.
|
void |
clean()
Clean data related to one root module configuration only
|
int |
compareTo(java.lang.Object obj) |
void |
discardConf(java.lang.String rootModuleConf,
java.lang.String conf) |
boolean |
doesCallersExclude(java.lang.String rootModuleConf,
Artifact artifact,
java.util.Stack callersStack) |
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
|
IvyNodeCallers.Caller[] |
getAllCallers() |
java.util.Collection |
getAllCallersModuleIds() |
java.util.Collection |
getAllEvictingConflictManagers() |
java.util.Collection |
getAllEvictingNodes() |
java.util.Collection |
getAllEvictingNodesDetails() |
IvyNodeCallers.Caller[] |
getAllRealCallers() |
Artifact[] |
getArtifacts(java.lang.String rootModuleConf)
Returns the artifacts of this dependency required in the configurations themselves required
in the given root module configuration
|
IvyNodeBlacklist |
getBlacklistData(java.lang.String rootModuleConf)
Returns the blacklist data of this node in the given root module conf, or
null
if this node is not blacklisted in this root module conf. |
IvyNodeCallers.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() |
ResolveData |
getData() |
java.util.Collection |
getDependencies(java.lang.String rootModuleConf,
java.lang.String[] confs,
java.lang.String requestedConf) |
java.util.Collection |
getDependencies(java.lang.String rootModuleConf,
java.lang.String conf,
java.lang.String requestedConf)
Load the dependencies of the current node
|
DependencyDescriptor |
getDependencyDescriptor(IvyNode parent) |
ModuleDescriptor |
getDescriptor() |
java.lang.String[] |
getEvictedConfs() |
IvyNodeEviction.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) |
IvyNodeEviction.EvictionData |
getEvictionDataInRoot(java.lang.String rootModuleConf,
IvyNode ancestor) |
ModuleRevisionId |
getId() |
long |
getLastModified()
Returns the last modified timestamp of the module represented by this Node, or 0 if the last
modified timestamp is currently unkwown (module not loaded)
|
IvyNodeUsage |
getMainUsage() |
ModuleId |
getModuleId() |
ResolvedModuleRevision |
getModuleRevision() |
java.util.Collection |
getPendingConflicts(java.lang.String rootModuleConf,
ModuleId mid)
Returns a collection of Nodes in conflict for which conflict has been detected but conflict
resolution hasn't been done yet
|
java.lang.Exception |
getProblem() |
java.lang.String |
getProblemMessage() |
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.Set |
getResolvedNodes(ModuleId moduleId,
java.lang.String rootModuleConf)
A copy of the set of resolved nodes (real nodes)
|
java.util.Collection |
getResolvedRevisions(ModuleId moduleId,
java.lang.String rootModuleConf) |
IvyNode |
getRoot() |
java.lang.String[] |
getRootModuleConfigurations()
Returns the root module configurations in which this dependency is required
|
java.util.Set |
getRootModuleConfigurationsSet()
Returns the root module configurations in which this dependency is required
|
Artifact[] |
getSelectedArtifacts(Filter artifactFilter)
Returns all the artifacts of this dependency required in the root module configurations in
which the node is not evicted nor blacklisted
|
boolean |
hasAnyMergedUsageWithTransitiveDependency(java.lang.String rootModuleConf)
Indicates if there is any of the merged usages of this node which has a depender with
transitive dependency descriptor.
|
boolean |
hasConfigurationsToLoad() |
int |
hashCode() |
boolean |
hasProblem() |
boolean |
isBlacklisted(java.lang.String rootModuleConf)
Indicates if this node has been blacklisted in the given root module conf.
|
boolean |
isCompletelyBlacklisted()
Indicates if this node has been blacklisted in all root module configurations.
|
boolean |
isCompletelyEvicted() |
protected boolean |
isConfRequiredByMergedUsageOnly(java.lang.String rootModuleConf,
java.lang.String conf) |
boolean |
isDownloaded() |
boolean |
isEvicted(java.lang.String rootModuleConf) |
boolean |
isFetched(java.lang.String conf) |
boolean |
isLoaded() |
boolean |
isSearched() |
boolean |
loadData(java.lang.String rootModuleConf,
IvyNode parent,
java.lang.String parentConf,
java.lang.String conf,
boolean shouldBePublic,
IvyNodeUsage usage)
After the call node may be discarded.
|
void |
markEvicted(IvyNodeEviction.EvictionData evictionData) |
void |
markEvicted(java.lang.String rootModuleConf,
IvyNode node,
ConflictManager conflictManager,
java.util.Collection resolved) |
void |
setEvictedNodes(ModuleId moduleId,
java.lang.String rootModuleConf,
java.util.Collection evicted) |
void |
setPendingConflicts(ModuleId moduleId,
java.lang.String rootModuleConf,
java.util.Collection conflicts) |
void |
setResolvedNodes(ModuleId moduleId,
java.lang.String rootModuleConf,
java.util.Collection resolved) |
java.lang.String |
toString() |
void |
updateConfsToFetch(java.util.Collection confs) |
public IvyNode(ResolveData data, IvyNode parent, DependencyDescriptor dd)
public IvyNode(ResolveData data, ModuleDescriptor md)
public boolean loadData(java.lang.String rootModuleConf, IvyNode parent, java.lang.String parentConf, java.lang.String conf, boolean shouldBePublic, IvyNodeUsage usage)
public java.util.Collection getDependencies(java.lang.String rootModuleConf, java.lang.String[] confs, java.lang.String requestedConf)
public java.util.Collection getDependencies(java.lang.String rootModuleConf, java.lang.String conf, java.lang.String requestedConf)
The resulting collection of nodes may have some configuration to load
rootModuleConf
- the requested configuration of the root moduleconf
- the configuration to load of this noderequestedConf
- the actual node conf requested, possibly extending the conf
one.public DependencyDescriptor getDependencyDescriptor(IvyNode parent)
public boolean hasConfigurationsToLoad()
public void updateConfsToFetch(java.util.Collection confs)
public java.lang.String[] getRequiredConfigurations(IvyNode in, java.lang.String inConf)
in
- public java.lang.String[] getRequiredConfigurations()
public Configuration getConfiguration(java.lang.String conf)
public java.lang.String[] getConfigurations(java.lang.String rootModuleConf)
rootModuleConf
- protected boolean isConfRequiredByMergedUsageOnly(java.lang.String rootModuleConf, java.lang.String conf)
public void discardConf(java.lang.String rootModuleConf, java.lang.String conf)
public java.lang.String[] getRootModuleConfigurations()
public java.util.Set getRootModuleConfigurationsSet()
public java.lang.String[] getConfsToFetch()
public java.lang.String[] getRealConfs(java.lang.String conf)
public Artifact[] getAllArtifacts()
public Artifact[] getSelectedArtifacts(Filter artifactFilter)
artifactFilter
- public Artifact[] getArtifacts(java.lang.String rootModuleConf)
rootModuleConf
- public boolean hasProblem()
public java.lang.Exception getProblem()
public java.lang.String getProblemMessage()
public boolean isDownloaded()
public boolean isSearched()
public boolean isLoaded()
public boolean isFetched(java.lang.String conf)
public IvyNode findNode(ModuleRevisionId mrid)
public IvyNode getRoot()
public ConflictManager getConflictManager(ModuleId mid)
public IvyNode getRealNode()
public ModuleRevisionId getId()
public ModuleId getModuleId()
public ModuleDescriptor getDescriptor()
public ResolveData getData()
public ResolvedModuleRevision getModuleRevision()
public long getPublication()
public long getLastModified()
public ModuleRevisionId getResolvedId()
public void clean()
public IvyNodeCallers.Caller[] getCallers(java.lang.String rootModuleConf)
public java.util.Collection getAllCallersModuleIds()
public IvyNodeCallers.Caller[] getAllCallers()
public IvyNodeCallers.Caller[] getAllRealCallers()
public void addCaller(java.lang.String rootModuleConf, IvyNode callerNode, java.lang.String callerConf, java.lang.String requestedConf, java.lang.String[] dependencyConfs, DependencyDescriptor dd)
public boolean doesCallersExclude(java.lang.String rootModuleConf, Artifact artifact, java.util.Stack callersStack)
public java.util.Set getResolvedNodes(ModuleId moduleId, java.lang.String rootModuleConf)
public java.util.Collection getResolvedRevisions(ModuleId moduleId, java.lang.String rootModuleConf)
public void markEvicted(IvyNodeEviction.EvictionData evictionData)
public java.util.Collection getAllEvictingConflictManagers()
public java.util.Collection getAllEvictingNodes()
public java.util.Collection getAllEvictingNodesDetails()
public java.lang.String[] getEvictedConfs()
public IvyNodeEviction.EvictionData getEvictedData(java.lang.String rootModuleConf)
public java.util.Collection getEvictedNodes(ModuleId mid, java.lang.String rootModuleConf)
public java.util.Collection getEvictedRevisions(ModuleId mid, java.lang.String rootModuleConf)
public IvyNodeEviction.EvictionData getEvictionDataInRoot(java.lang.String rootModuleConf, IvyNode ancestor)
public boolean isCompletelyEvicted()
public boolean isEvicted(java.lang.String rootModuleConf)
public void markEvicted(java.lang.String rootModuleConf, IvyNode node, ConflictManager conflictManager, java.util.Collection resolved)
public void setEvictedNodes(ModuleId moduleId, java.lang.String rootModuleConf, java.util.Collection evicted)
public void setResolvedNodes(ModuleId moduleId, java.lang.String rootModuleConf, java.util.Collection resolved)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
public int hashCode()
hashCode
in class java.lang.Object
public java.util.Collection getPendingConflicts(java.lang.String rootModuleConf, ModuleId mid)
rootModuleConf
- mid
- the module id for which pending conflicts should be foundpublic void setPendingConflicts(ModuleId moduleId, java.lang.String rootModuleConf, java.util.Collection conflicts)
public void blacklist(IvyNodeBlacklist bdata)
This is useful in combination with RestartResolveProcess
for conflict manager
implementation which use a best effort strategy to find compatible dependency set, like
LatestCompatibleConflictManager
rootModuleConf
- the root module configuration in which the node should be blacklistedpublic boolean isBlacklisted(java.lang.String rootModuleConf)
A blacklisted node should be considered as if it doesn't even exist on the repository.
rootModuleConf
- the root module conf for which we'd like to know if the node is blacklisted#blacklist(String)
public boolean isCompletelyBlacklisted()
#blacklist(String)
public IvyNodeBlacklist getBlacklistData(java.lang.String rootModuleConf)
null
if this node is not blacklisted in this root module conf.rootModuleConf
- the root module configuration to considerpublic IvyNodeUsage getMainUsage()
public boolean hasAnyMergedUsageWithTransitiveDependency(java.lang.String rootModuleConf)
If at there is at least one usage from the merged usages for which there is a depender in the given root module conf which has a dependency descriptor with transitive == true, then it returns true. Otherwise it returns false.
rootModuleConf
- the root module configuration to consider