public final class LocalArtifactResult extends Object
Constructor and Description |
---|
LocalArtifactResult(LocalArtifactRequest request)
Creates a new result for the specified request.
|
Modifier and Type | Method and Description |
---|---|
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(File file)
Sets the file to requested artifact.
|
LocalArtifactResult |
setRepository(RemoteRepository repository)
Sets the (first) remote repository from which the artifact was cached.
|
String |
toString() |
public LocalArtifactResult(LocalArtifactRequest request)
request
- The local artifact request, must not be null
.public LocalArtifactRequest getRequest()
null
.public 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(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
.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.