Package org.eclipse.aether.resolution
Class VersionRequest
- java.lang.Object
-
- org.eclipse.aether.resolution.VersionRequest
-
public final class VersionRequest extends Object
A request to resolve a metaversion.
-
-
Constructor Summary
Constructors Constructor Description VersionRequest()Creates an uninitialized request.VersionRequest(Artifact artifact, List<RemoteRepository> repositories, String context)Creates a request with the specified properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VersionRequestaddRepository(RemoteRepository repository)Adds the specified repository for the resolution.ArtifactgetArtifact()Gets the artifact whose (meta-)version shall be resolved.List<RemoteRepository>getRepositories()Gets the repositories to resolve the version from.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.VersionRequestsetArtifact(Artifact artifact)Sets the artifact whose (meta-)version shall be resolved.VersionRequestsetRepositories(List<RemoteRepository> repositories)Sets the repositories to resolve the version from.VersionRequestsetRequestContext(String context)Sets the context in which this request is made.VersionRequestsetTrace(RequestTrace trace)Sets the trace information that describes the higher level request/operation in which this request is issued.StringtoString()
-
-
-
Constructor Detail
-
VersionRequest
public VersionRequest()
Creates an uninitialized request.
-
VersionRequest
public VersionRequest(Artifact artifact, List<RemoteRepository> repositories, String context)
Creates a request with the specified properties.- Parameters:
artifact- The artifact whose (meta-)version should be resolved, may benull.repositories- The repositories to resolve the version from, may benull.context- The context in which this request is made, may benull.
-
-
Method Detail
-
getArtifact
public Artifact getArtifact()
Gets the artifact whose (meta-)version shall be resolved.- Returns:
- The artifact or
nullif not set.
-
setArtifact
public VersionRequest setArtifact(Artifact artifact)
Sets the artifact whose (meta-)version shall be resolved.- Parameters:
artifact- The artifact, may benull.- Returns:
- This request for chaining, never
null.
-
getRepositories
public List<RemoteRepository> getRepositories()
Gets the repositories to resolve the version from.- Returns:
- The repositories, never
null.
-
setRepositories
public VersionRequest setRepositories(List<RemoteRepository> repositories)
Sets the repositories to resolve the version from.- Parameters:
repositories- The repositories, may benull.- Returns:
- This request for chaining, never
null.
-
addRepository
public VersionRequest 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 String getRequestContext()
Gets the context in which this request is made.- Returns:
- The context, never
null.
-
setRequestContext
public VersionRequest setRequestContext(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 VersionRequest 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.
-
-