Package org.eclipse.aether.resolution
Class ArtifactDescriptorRequest
java.lang.Object
org.eclipse.aether.resolution.ArtifactDescriptorRequest
A request to read an artifact descriptor.
-
Constructor Summary
ConstructorDescriptionCreates an uninitialized request.ArtifactDescriptorRequest
(Artifact artifact, List<RemoteRepository> repositories, String context) Creates a request with the specified properties. -
Method Summary
Modifier and TypeMethodDescriptionaddRepository
(RemoteRepository repository) Adds the specified repository for the resolution of the artifact descriptor.Gets the artifact whose descriptor shall be read.Gets the repositories to resolve the descriptor from.Gets the context in which this request is made.getTrace()
Gets the trace information that describes the higher level request/operation in which this request is issued.setArtifact
(Artifact artifact) Sets the artifact whose descriptor shall be read.setRepositories
(List<RemoteRepository> repositories) Sets the repositories to resolve the descriptor from.setRequestContext
(String context) Sets the context in which this request is made.setTrace
(RequestTrace trace) Sets the trace information that describes the higher level request/operation in which this request is issued.toString()
-
Constructor Details
-
ArtifactDescriptorRequest
public ArtifactDescriptorRequest()Creates an uninitialized request. -
ArtifactDescriptorRequest
public ArtifactDescriptorRequest(Artifact artifact, List<RemoteRepository> repositories, String context) Creates a request with the specified properties.- Parameters:
artifact
- The artifact whose descriptor should be read, may benull
.repositories
- The repositories to resolve the descriptor from, may benull
.context
- The context in which this request is made, may benull
.
-
-
Method Details
-
getArtifact
Gets the artifact whose descriptor shall be read.- Returns:
- The artifact or
null
if not set.
-
setArtifact
Sets the artifact whose descriptor shall be read. Eventually, a valid request must have an artifact set.- Parameters:
artifact
- The artifact, may benull
.- Returns:
- This request for chaining, never
null
.
-
getRepositories
Gets the repositories to resolve the descriptor from.- Returns:
- The repositories, never
null
.
-
setRepositories
Sets the repositories to resolve the descriptor from.- Parameters:
repositories
- The repositories, may benull
.- Returns:
- This request for chaining, never
null
.
-
addRepository
Adds the specified repository for the resolution of the artifact descriptor.- Parameters:
repository
- The repository to add, may benull
.- Returns:
- This request for chaining, never
null
.
-
getRequestContext
Gets the context in which this request is made.- Returns:
- The context, never
null
.
-
setRequestContext
Sets the context in which this request is made.- Parameters:
context
- The context, may benull
.- Returns:
- This request for chaining, never
null
.
-
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
null
if none.
-
setTrace
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
-