public final class ArtifactResult extends Object
Constructor and Description |
---|
ArtifactResult(ArtifactRequest request)
Creates a new result for the specified request.
|
Modifier and Type | Method and Description |
---|---|
ArtifactResult |
addException(Exception exception)
Records the specified exception while resolving the artifact.
|
Artifact |
getArtifact()
Gets the resolved artifact (if any).
|
List<Exception> |
getExceptions()
Gets the exceptions that occurred while resolving the artifact.
|
ArtifactRepository |
getRepository()
Gets the repository from which the artifact was eventually resolved.
|
ArtifactRequest |
getRequest()
Gets the resolution request that was made.
|
boolean |
isMissing()
Indicates whether the requested artifact is not present in any of the specified repositories.
|
boolean |
isResolved()
Indicates whether the requested artifact was resolved.
|
ArtifactResult |
setArtifact(Artifact artifact)
Sets the resolved artifact.
|
ArtifactResult |
setRepository(ArtifactRepository repository)
Sets the repository from which the artifact was resolved.
|
String |
toString() |
public ArtifactResult(ArtifactRequest request)
request
- The resolution request, must not be null
.public ArtifactRequest getRequest()
null
.public Artifact getArtifact()
getExceptions()
to query the errors that occurred while trying
to resolve the artifact.null
if the resolution failed.public ArtifactResult setArtifact(Artifact artifact)
artifact
- The resolved artifact, may be null
if the resolution failed.null
.public List<Exception> getExceptions()
null
.isResolved()
public ArtifactResult addException(Exception exception)
exception
- The exception to record, may be null
.null
.public ArtifactRepository getRepository()
null
if unknown.public ArtifactResult setRepository(ArtifactRepository repository)
repository
- The repository from which the artifact was resolved, may be null
.null
.public boolean isResolved()
getExceptions()
indicating transfer errors while trying to fetch the artifact from some
of the specified remote repositories.true
if the artifact was resolved, false
otherwise.Artifact.getFile()
public boolean isMissing()
true
if the artifact is not present in any repository, false
otherwise.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.