public interface DependencyNode
Modifier and Type | Field and Description |
---|---|
static int |
MANAGED_EXCLUSIONS
A bit flag indicating the exclusions were subject to dependency management
|
static int |
MANAGED_OPTIONAL
A bit flag indicating the optional flag was subject to dependency management
|
static int |
MANAGED_PROPERTIES
A bit flag indicating the artifact properties were subject to dependency management
|
static int |
MANAGED_SCOPE
A bit flag indicating the dependency scope was subject to dependency management
|
static int |
MANAGED_VERSION
A bit flag indicating the dependency version was subject to dependency management
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(DependencyVisitor visitor)
Traverses this node and potentially its children using the specified visitor.
|
Collection<? extends Artifact> |
getAliases()
Gets the known aliases for this dependency's artifact.
|
Artifact |
getArtifact()
Gets the artifact associated with this node.
|
List<DependencyNode> |
getChildren()
Gets the child nodes of this node.
|
Map<?,?> |
getData()
Gets the custom data associated with this dependency node.
|
Dependency |
getDependency()
Gets the dependency associated with this node.
|
int |
getManagedBits()
Gets a bit field indicating which attributes of this node were subject to dependency management.
|
List<? extends Artifact> |
getRelocations()
Gets the sequence of relocations that was followed to resolve the artifact referenced by the dependency.
|
List<RemoteRepository> |
getRepositories()
Gets the remote repositories from which this node's artifact shall be resolved.
|
String |
getRequestContext()
Gets the request context in which this dependency node was created.
|
Version |
getVersion()
Gets the version that was selected for the dependency's target artifact.
|
VersionConstraint |
getVersionConstraint()
Gets the version constraint that was parsed from the dependency's version declaration.
|
void |
setArtifact(Artifact artifact)
Updates the artifact of the dependency after resolution.
|
void |
setChildren(List<DependencyNode> children)
Sets the child nodes of this node.
|
void |
setData(Map<Object,Object> data)
Sets the custom data associated with this dependency node.
|
void |
setData(Object key,
Object value)
Associates the specified dependency node data with the given key.
|
void |
setOptional(Boolean optional)
Sets the optional flag of the dependency.
|
void |
setRequestContext(String context)
Sets the request context in which this dependency node was created.
|
void |
setScope(String scope)
Sets the scope of the dependency.
|
static final int MANAGED_VERSION
getManagedBits()
,
Constant Field Valuesstatic final int MANAGED_SCOPE
getManagedBits()
,
Constant Field Valuesstatic final int MANAGED_OPTIONAL
getManagedBits()
,
Constant Field Valuesstatic final int MANAGED_PROPERTIES
getManagedBits()
,
Constant Field Valuesstatic final int MANAGED_EXCLUSIONS
getManagedBits()
,
Constant Field ValuesList<DependencyNode> getChildren()
null
.void setChildren(List<DependencyNode> children)
children
- The child nodes, may be null
Dependency getDependency()
null
when invoked on the graph's root node. The root
node of such graphs may however still have a label as returned by getArtifact()
.null
if none.Artifact getArtifact()
getDependency().getArtifact()
. Otherwise the artifact merely provides a label for this node in which case
the artifact must not be subjected to dependency collection/resolution.null
if none.void setArtifact(Artifact artifact)
getDependency()
is not null.artifact
- The artifact satisfying the dependency, must not be null
.List<? extends Artifact> getRelocations()
null
.Collection<? extends Artifact> getAliases()
null
.VersionConstraint getVersionConstraint()
null
.Version getVersion()
null
.void setScope(String scope)
getDependency()
is not null.scope
- The scope, may be null
.void setOptional(Boolean optional)
getDependency()
is not null.optional
- The optional flag, may be null
.int getManagedBits()
MANAGED_VERSION
, MANAGED_SCOPE
,
MANAGED_OPTIONAL
, MANAGED_PROPERTIES
and MANAGED_EXCLUSIONS
if the
corresponding attribute was set via dependency management.List<RemoteRepository> getRepositories()
null
.String getRequestContext()
null
.void setRequestContext(String context)
context
- The context, may be null
.Map<?,?> getData()
setData(Object, Object)
needs to be used to update the custom data.null
.void setData(Map<Object,Object> data)
data
- The new custom data, may be null
.void setData(Object key, Object value)
getData()
is being iterated.key
- The key under which to store the data, must not be null
.value
- The data to associate with the key, may be null
to remove the mapping.boolean accept(DependencyVisitor visitor)
visitor
- The visitor to call back, must not be null
.true
to visit siblings nodes of this node as well, false
to skip siblings.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.