public final class LocalArtifactResult
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
available |
private java.io.File |
file |
private RemoteRepository |
repository |
private LocalArtifactRequest |
request |
Constructor and Description |
---|
LocalArtifactResult(LocalArtifactRequest request)
Creates a new result for the specified request.
|
Modifier and Type | Method and Description |
---|---|
java.io.File |
getFile()
Gets the file to the requested artifact.
|
RemoteRepository |
getRepository()
Gets the (first) remote repository from which the artifact was cached (if any).
|
LocalArtifactRequest |
getRequest()
Gets the request corresponding to this result.
|
boolean |
isAvailable()
Indicates whether the requested artifact is available for use.
|
LocalArtifactResult |
setAvailable(boolean available)
Sets whether the artifact is available.
|
LocalArtifactResult |
setFile(java.io.File file)
Sets the file to requested artifact.
|
LocalArtifactResult |
setRepository(RemoteRepository repository)
Sets the (first) remote repository from which the artifact was cached.
|
java.lang.String |
toString() |
private final LocalArtifactRequest request
private java.io.File file
private boolean available
private RemoteRepository repository
public LocalArtifactResult(LocalArtifactRequest request)
request
- The local artifact request, must not be null
.public LocalArtifactRequest getRequest()
null
.public java.io.File getFile()
isAvailable()
returns true
. An artifact file can be found but considered unavailable if the artifact was cached from a
remote repository that is not part of the list of remote repositories used for the query.null
if the artifact does not exist locally.public LocalArtifactResult setFile(java.io.File file)
file
- The artifact file, may be null
.null
.public boolean isAvailable()
true
if the artifact is available, false
otherwise.LocalArtifactRequest.getRepositories()
public LocalArtifactResult setAvailable(boolean available)
available
- true
if the artifact is available, false
otherwise.null
.public RemoteRepository getRepository()
null
if unknown or if
the artifact has been locally installed.LocalArtifactRequest.getRepositories()
public LocalArtifactResult setRepository(RemoteRepository repository)
repository
- The remote repository from which the artifact was originally retrieved, may be null
if
unknown or if the artifact has been locally installed.null
.public java.lang.String toString()
toString
in class java.lang.Object