org.apache.ivy.core.resolve

Class IvyNodeUsage

public class IvyNodeUsage extends Object

Class collecting usage data for an IvyNode.

Usage data contains the configurations required by callers for each root module configuration, the configurations required by caller node and caller configuration, dependency artifacts descriptors declared by callers, include rules declared by callers, and blacklisted data by root module conf.

Constructor Summary
IvyNodeUsage(IvyNode node)
Method Summary
protected SetaddAndGetConfigurations(String rootModuleConf)
voidaddUsage(String rootModuleConf, DependencyDescriptor dd, String parentConf)
protected voidblacklist(IvyNodeBlacklist bdata)
protected IvyNodeBlacklistgetBlacklistData(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.
protected SetgetConfigurations(String rootModuleConf)
Returns the configurations of the dependency required in a given root module configuration.
protected SetgetDependencyArtifactsSet(String rootModuleConf)
protected SetgetDependencyIncludesSet(String rootModuleConf)
protected IvyNodegetNode()
protected CollectiongetRequiredConfigurations(IvyNode in, String inConf)
protected SetgetRootModuleConfigurations()
booleanhasTransitiveDepender(String rootModuleConf)
Indicates if at least one depender has a transitive dependency descriptor for the given root module conf.
protected booleanisBlacklisted(String rootModuleConf)
Indicates if this node has been blacklisted in the given root module conf.
protected voidremoveRootModuleConf(String rootModuleConf)
protected voidsetRequiredConfs(IvyNode parent, String parentConf, Collection confs)
voidupdateDataFrom(Collection usages, String rootModuleConf)

Constructor Detail

IvyNodeUsage

public IvyNodeUsage(IvyNode node)

Method Detail

addAndGetConfigurations

protected Set addAndGetConfigurations(String rootModuleConf)

addUsage

public void addUsage(String rootModuleConf, DependencyDescriptor dd, String parentConf)

blacklist

protected void blacklist(IvyNodeBlacklist bdata)

getBlacklistData

protected IvyNodeBlacklist getBlacklistData(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.

Parameters: rootModuleConf the root module configuration to consider

Returns: the blacklist data if any

getConfigurations

protected Set getConfigurations(String rootModuleConf)
Returns the configurations of the dependency required in a given root module configuration.

Parameters: rootModuleConf

Returns:

getDependencyArtifactsSet

protected Set getDependencyArtifactsSet(String rootModuleConf)

getDependencyIncludesSet

protected Set getDependencyIncludesSet(String rootModuleConf)

getNode

protected IvyNode getNode()

getRequiredConfigurations

protected Collection getRequiredConfigurations(IvyNode in, String inConf)

getRootModuleConfigurations

protected Set getRootModuleConfigurations()

hasTransitiveDepender

public boolean hasTransitiveDepender(String rootModuleConf)
Indicates if at least one depender has a transitive dependency descriptor for the given root module conf.

Parameters: rootModuleConf the root module conf to consider

Returns: true if at least one depender has a transitive dependency descriptor for the given root module conf, false otherwise.

isBlacklisted

protected boolean isBlacklisted(String rootModuleConf)
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: IvyNodeUsage

removeRootModuleConf

protected void removeRootModuleConf(String rootModuleConf)

setRequiredConfs

protected void setRequiredConfs(IvyNode parent, String parentConf, Collection confs)

updateDataFrom

public void updateDataFrom(Collection usages, String rootModuleConf)