Package org.eclipse.aether.repository
Class LocalArtifactRequest
- java.lang.Object
-
- org.eclipse.aether.repository.LocalArtifactRequest
-
public final class LocalArtifactRequest extends java.lang.ObjectA query to the local repository for the existence of an artifact.
-
-
Field Summary
Fields Modifier and Type Field Description private Artifactartifactprivate java.lang.Stringcontextprivate java.util.List<RemoteRepository>repositories
-
Constructor Summary
Constructors Constructor Description LocalArtifactRequest()Creates an uninitialized query.LocalArtifactRequest(Artifact artifact, java.util.List<RemoteRepository> repositories, java.lang.String context)Creates a query with the specified properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactgetArtifact()Gets the artifact to query for.java.lang.StringgetContext()Gets the resolution context.java.util.List<RemoteRepository>getRepositories()Gets the remote repositories to consider as sources of the artifact.LocalArtifactRequestsetArtifact(Artifact artifact)Sets the artifact to query for.LocalArtifactRequestsetContext(java.lang.String context)Sets the resolution context.LocalArtifactRequestsetRepositories(java.util.List<RemoteRepository> repositories)Sets the remote repositories to consider as sources of the artifact.java.lang.StringtoString()
-
-
-
Field Detail
-
artifact
private Artifact artifact
-
context
private java.lang.String context
-
repositories
private java.util.List<RemoteRepository> repositories
-
-
Constructor Detail
-
LocalArtifactRequest
public LocalArtifactRequest()
Creates an uninitialized query.
-
LocalArtifactRequest
public LocalArtifactRequest(Artifact artifact, java.util.List<RemoteRepository> repositories, java.lang.String context)
Creates a query with the specified properties.- Parameters:
artifact- The artifact to query for, may benull.repositories- The remote repositories that should be considered as potential sources for the artifact, may benullor empty to only consider locally installed artifacts.context- The resolution context for the artifact, may benull.
-
-
Method Detail
-
getArtifact
public Artifact getArtifact()
Gets the artifact to query for.- Returns:
- The artifact or
nullif not set.
-
setArtifact
public LocalArtifactRequest setArtifact(Artifact artifact)
Sets the artifact to query for.- Parameters:
artifact- The artifact, may benull.- Returns:
- This query for chaining, never
null.
-
getContext
public java.lang.String getContext()
Gets the resolution context.- Returns:
- The resolution context, never
null.
-
setContext
public LocalArtifactRequest setContext(java.lang.String context)
Sets the resolution context.- Parameters:
context- The resolution context, may benull.- Returns:
- This query for chaining, never
null.
-
getRepositories
public java.util.List<RemoteRepository> getRepositories()
Gets the remote repositories to consider as sources of the artifact.- Returns:
- The remote repositories, never
null.
-
setRepositories
public LocalArtifactRequest setRepositories(java.util.List<RemoteRepository> repositories)
Sets the remote repositories to consider as sources of the artifact.- Parameters:
repositories- The remote repositories, may benullor empty to only consider locally installed artifacts.- Returns:
- This query for chaining, never
null.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-