Package org.eclipse.aether.resolution
Class ArtifactRequest
- java.lang.Object
-
- org.eclipse.aether.resolution.ArtifactRequest
-
public final class ArtifactRequest extends java.lang.ObjectA request to resolve an artifact.
-
-
Field Summary
Fields Modifier and Type Field Description private Artifactartifactprivate java.lang.Stringcontextprivate DependencyNodenodeprivate java.util.List<RemoteRepository>repositoriesprivate RequestTracetrace
-
Constructor Summary
Constructors Constructor Description ArtifactRequest()Creates an uninitialized request.ArtifactRequest(Artifact artifact, java.util.List<RemoteRepository> repositories, java.lang.String context)Creates a request with the specified properties.ArtifactRequest(DependencyNode node)Creates a request from the specified dependency node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactRequestaddRepository(RemoteRepository repository)Adds the specified repository for the resolution.ArtifactgetArtifact()Gets the artifact to resolve.DependencyNodegetDependencyNode()Gets the dependency node (if any) for which to resolve the artifact.java.util.List<RemoteRepository>getRepositories()Gets the repositories to resolve the artifact from.java.lang.StringgetRequestContext()Gets the context in which this request is made.RequestTracegetTrace()Gets the trace information that describes the higher level request/operation in which this request is issued.ArtifactRequestsetArtifact(Artifact artifact)Sets the artifact to resolve.ArtifactRequestsetDependencyNode(DependencyNode node)Sets the dependency node to resolve.ArtifactRequestsetRepositories(java.util.List<RemoteRepository> repositories)Sets the repositories to resolve the artifact from.ArtifactRequestsetRequestContext(java.lang.String context)Sets the context in which this request is made.ArtifactRequestsetTrace(RequestTrace trace)Sets the trace information that describes the higher level request/operation in which this request is issued.java.lang.StringtoString()
-
-
-
Field Detail
-
artifact
private Artifact artifact
-
node
private DependencyNode node
-
repositories
private java.util.List<RemoteRepository> repositories
-
context
private java.lang.String context
-
trace
private RequestTrace trace
-
-
Constructor Detail
-
ArtifactRequest
public ArtifactRequest()
Creates an uninitialized request.
-
ArtifactRequest
public ArtifactRequest(Artifact artifact, java.util.List<RemoteRepository> repositories, java.lang.String context)
Creates a request with the specified properties.- Parameters:
artifact- The artifact to resolve, may benull.repositories- The repositories to resolve the artifact from, may benull.context- The context in which this request is made, may benull.
-
ArtifactRequest
public ArtifactRequest(DependencyNode node)
Creates a request from the specified dependency node.- Parameters:
node- The dependency node to resolve, may benull.
-
-
Method Detail
-
getArtifact
public Artifact getArtifact()
Gets the artifact to resolve.- Returns:
- The artifact to resolve or
null.
-
setArtifact
public ArtifactRequest setArtifact(Artifact artifact)
Sets the artifact to resolve.- Parameters:
artifact- The artifact to resolve, may benull.- Returns:
- This request for chaining, never
null.
-
getDependencyNode
public DependencyNode getDependencyNode()
Gets the dependency node (if any) for which to resolve the artifact.- Returns:
- The dependency node to resolve or
nullif unknown.
-
setDependencyNode
public ArtifactRequest setDependencyNode(DependencyNode node)
Sets the dependency node to resolve.- Parameters:
node- The dependency node to resolve, may benull.- Returns:
- This request for chaining, never
null.
-
getRepositories
public java.util.List<RemoteRepository> getRepositories()
Gets the repositories to resolve the artifact from.- Returns:
- The repositories, never
null.
-
setRepositories
public ArtifactRequest setRepositories(java.util.List<RemoteRepository> repositories)
Sets the repositories to resolve the artifact from.- Parameters:
repositories- The repositories, may benull.- Returns:
- This request for chaining, never
null.
-
addRepository
public ArtifactRequest addRepository(RemoteRepository repository)
Adds the specified repository for the resolution.- Parameters:
repository- The repository to add, may benull.- Returns:
- This request for chaining, never
null.
-
getRequestContext
public java.lang.String getRequestContext()
Gets the context in which this request is made.- Returns:
- The context, never
null.
-
setRequestContext
public ArtifactRequest setRequestContext(java.lang.String context)
Sets the context in which this request is made.- Parameters:
context- The context, may benull.- Returns:
- This request for chaining, never
null.
-
getTrace
public RequestTrace getTrace()
Gets the trace information that describes the higher level request/operation in which this request is issued.- Returns:
- The trace information about the higher level operation or
nullif none.
-
setTrace
public ArtifactRequest setTrace(RequestTrace trace)
Sets the trace information that describes the higher level request/operation in which this request is issued.- Parameters:
trace- The trace information about the higher level operation, may benull.- Returns:
- This request for chaining, never
null.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-