Class IvyNode
java.lang.Object
org.apache.ivy.core.resolve.IvyNode
- All Implemented Interfaces:
Comparable<IvyNode>
-
Constructor Summary
ConstructorsConstructorDescriptionIvyNode(ResolveData data, ModuleDescriptor md) IvyNode(ResolveData data, IvyNode parent, DependencyDescriptor dd) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCaller(String rootModuleConf, IvyNode callerNode, String callerConf, String requestedConf, String[] dependencyConfs, DependencyDescriptor dd) voidblacklist(IvyNodeBlacklist bdata) Blacklists the current node, so that a new resolve process won't ever consider this node as available in the repository.voidclean()Clean data related to one root module configuration onlyintbooleandirectlyExcludes(ModuleDescriptor md, String[] moduleConfs, DependencyDescriptor dd, Artifact artifact) voiddiscardConf(String rootModuleConf, String conf) Deprecated.booleandoesCallersExclude(String rootModuleConf, Artifact artifact, Deque<IvyNode> callersStack) booleandoesCallersExclude(String rootModuleConf, Artifact artifact, Stack<ModuleRevisionId> callersStack) Deprecated.booleanfindNode(ModuleRevisionId mrid) Artifact[]Returns all the artifacts of this dependency required in all the root module configurationsArtifact[]getArtifacts(String rootModuleConf) Returns the artifacts of this dependency required in the configurations themselves required in the given root module configurationgetBlacklistData(String rootModuleConf) Returns the blacklist data of this node in the given root module conf, ornullif this node is not blacklisted in this root module conf.getCallers(String rootModuleConf) getConfiguration(String conf) String[]getConfigurations(String rootModuleConf) Returns the configurations of the dependency required in a given root module configuration.String[]getData()getDependencies(String rootModuleConf, String[] confs, String requestedConf) getDependencies(String rootModuleConf, String conf, String requestedConf) Load the dependencies of the current nodegetDependencyDescriptor(IvyNode parent) String[]getEvictedData(String rootModuleConf) getEvictedNodes(ModuleId mid, String rootModuleConf) getEvictedRevisions(ModuleId mid, String rootModuleConf) getEvictionDataInRoot(String rootModuleConf, IvyNode ancestor) getId()longReturns the last modified timestamp of the module represented by this Node, or 0 if the last modified timestamp is currently unknown (module not loaded)getPendingConflicts(String rootModuleConf, ModuleId mid) Returns a collection of Nodes in conflict for which conflict has been detected but conflict resolution hasn't been done yetlongString[]getRealConfs(String conf) String[]returns all the current required configurations of the nodeString[]getRequiredConfigurations(IvyNode in, String inConf) returns the required configurations from the given nodegetResolvedNodes(ModuleId moduleId, String rootModuleConf) A copy of the set of resolved nodes (real nodes)getResolvedRevisions(ModuleId moduleId, String rootModuleConf) getRoot()String[]Returns the root module configurations in which this dependency is requiredReturns the root module configurations in which this dependency is requiredArtifact[]getSelectedArtifacts(Filter<Artifact> artifactFilter) Returns all the artifacts of this dependency required in the root module configurations in which the node is not evicted nor blacklistedbooleanhasAnyMergedUsageWithTransitiveDependency(String rootModuleConf) Indicates if there is any of the merged usages of this node which has a depender with transitive dependency descriptor.booleaninthashCode()booleanbooleanisBlacklisted(String rootModuleConf) Indicates if this node has been blacklisted in the given root module conf.booleanIndicates if this node has been blacklisted in all root module configurations.booleanprotected booleanisConfRequiredByMergedUsageOnly(String rootModuleConf, String conf) booleanbooleanbooleanbooleanisLoaded()booleanbooleanloadData(String rootModuleConf, IvyNode parent, String parentConf, String conf, boolean shouldBePublic, IvyNodeUsage usage) After the call node may be discarded.voidmarkEvicted(String rootModuleConf, IvyNode node, ConflictManager conflictManager, Collection<IvyNode> resolved) voidmarkEvicted(IvyNodeEviction.EvictionData evictionData) voidsetEvictedNodes(ModuleId moduleId, String rootModuleConf, Collection<IvyNode> evicted) voidsetPendingConflicts(ModuleId moduleId, String rootModuleConf, Collection<IvyNode> conflicts) voidsetResolvedNodes(ModuleId moduleId, String rootModuleConf, Collection<IvyNode> resolved) toString()voidupdateConfsToFetch(Collection<String> confs)
-
Constructor Details
-
IvyNode
-
IvyNode
-
-
Method Details
-
loadData
public boolean loadData(String rootModuleConf, IvyNode parent, String parentConf, String conf, boolean shouldBePublic, IvyNodeUsage usage) After the call node may be discarded. To avoid using discarded node, make sure to get the real node after the callIvyNode node = ... node.loadData(); node = node.getRealNode(); ...- Parameters:
rootModuleConf- Stringparent- IvyNodeparentConf- Stringconf- StringshouldBePublic- booleanusage- IvyNodeUsage- Returns:
- boolean
-
getDependencies
public Collection<IvyNode> getDependencies(String rootModuleConf, String[] confs, String requestedConf) -
getDependencies
public Collection<IvyNode> getDependencies(String rootModuleConf, String conf, String requestedConf) Load the dependencies of the current nodeThe resulting collection of nodes may have some configuration to load
- Parameters:
rootModuleConf- the requested configuration of the root moduleconf- the configuration to load of this noderequestedConf- the actual node conf requested, possibly extending theconfone.- Returns:
CollectionofIvyNode
-
getDependencyDescriptor
-
directlyExcludes
public boolean directlyExcludes(ModuleDescriptor md, String[] moduleConfs, DependencyDescriptor dd, Artifact artifact) -
hasConfigurationsToLoad
public boolean hasConfigurationsToLoad() -
updateConfsToFetch
-
getRequiredConfigurations
-
getRequiredConfigurations
returns all the current required configurations of the node- Returns:
- array of configuration names
-
getConfiguration
-
getConfigurations
-
isConfRequiredByMergedUsageOnly
-
discardConf
Deprecated. -
getRootModuleConfigurations
Returns the root module configurations in which this dependency is required- Returns:
- array of configuration names
-
getRootModuleConfigurationsSet
-
getConfsToFetch
-
getRealConfs
-
getAllArtifacts
-
getSelectedArtifacts
-
getArtifacts
-
hasProblem
public boolean hasProblem() -
getProblem
-
getProblemMessage
-
isDownloaded
public boolean isDownloaded() -
isSearched
public boolean isSearched() -
isLoaded
public boolean isLoaded() -
isFetched
-
findNode
-
getRoot
-
getConflictManager
-
getRealNode
-
getId
-
getModuleId
-
getDescriptor
-
getData
-
getModuleRevision
-
getPublication
public long getPublication() -
getLastModified
public long getLastModified()Returns the last modified timestamp of the module represented by this Node, or 0 if the last modified timestamp is currently unknown (module not loaded)- Returns:
- the last modified timestamp of the module represented by this Node
-
getResolvedId
-
clean
public void clean()Clean data related to one root module configuration only -
getCallers
-
getAllCallersModuleIds
-
getAllCallers
-
getAllRealCallers
-
addCaller
-
doesCallersExclude
-
doesCallersExclude
@Deprecated public boolean doesCallersExclude(String rootModuleConf, Artifact artifact, Stack<ModuleRevisionId> callersStack) Deprecated. -
getResolvedNodes
-
getResolvedRevisions
-
markEvicted
-
getAllEvictingConflictManagers
-
getAllEvictingNodes
-
getAllEvictingNodesDetails
-
getEvictedConfs
-
getEvictedData
-
getEvictedNodes
-
getEvictedRevisions
-
getEvictionDataInRoot
-
isCompletelyEvicted
public boolean isCompletelyEvicted() -
isEvicted
-
markEvicted
public void markEvicted(String rootModuleConf, IvyNode node, ConflictManager conflictManager, Collection<IvyNode> resolved) -
setEvictedNodes
-
setResolvedNodes
public void setResolvedNodes(ModuleId moduleId, String rootModuleConf, Collection<IvyNode> resolved) -
toString
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<IvyNode>
-
hashCode
-
getPendingConflicts
Returns a collection of Nodes in conflict for which conflict has been detected but conflict resolution hasn't been done yet- Parameters:
rootModuleConf- dittomid- the module id for which pending conflicts should be found- Returns:
- a Collection of IvyNode in pending conflict
-
setPendingConflicts
public void setPendingConflicts(ModuleId moduleId, String rootModuleConf, Collection<IvyNode> conflicts) -
blacklist
Blacklists the current node, so that a new resolve process won't ever consider this node as available in the repository.This is useful in combination with
RestartResolveProcessfor conflict manager implementation which use a best effort strategy to find compatible dependency set, likeLatestCompatibleConflictManager- Parameters:
bdata- the root module configuration in which the node should be blacklisted
-
isBlacklisted
Indicates if this node has been blacklisted in the given root module conf.A blacklisted node should be considered as if it doesn't even exist on the repository.
- Parameters:
rootModuleConf- the root module conf for which we'd like to know if the node is blacklisted- Returns:
- true if this node is blacklisted int he given root module conf, false otherwise
- See Also:
-
isCompletelyBlacklisted
public boolean isCompletelyBlacklisted()Indicates if this node has been blacklisted in all root module configurations.- Returns:
- true if this node is blacklisted in all root module configurations, false otherwise
- See Also:
-
getBlacklistData
Returns the blacklist data of this node in the given root module conf, ornullif this node is not blacklisted in this root module conf.- Parameters:
rootModuleConf- the root module configuration to consider- Returns:
- the blacklist data if any
-
getMainUsage
-
hasAnyMergedUsageWithTransitiveDependency
Indicates if there is any of the merged usages of this node which has a depender with transitive dependency descriptor.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.
- Parameters:
rootModuleConf- the root module configuration to consider- Returns:
- true if there is any merged usage with transitive dd, false otherwise.
-