Package org.eclipse.aether.spi.connector
Class ArtifactTransfer
java.lang.Object
org.eclipse.aether.spi.connector.Transfer
org.eclipse.aether.spi.connector.ArtifactTransfer
- Direct Known Subclasses:
ArtifactDownload
,ArtifactUpload
A download/upload of an artifact.
- Restriction:
- This class is not intended to be extended by clients.
-
Method Summary
Modifier and TypeMethodDescriptionGets the artifact being transferred.Gets the exception that occurred during the transfer (if any).getFile()
Deprecated.getPath()
Gets the local file the artifact is downloaded to or uploaded from.setArtifact
(Artifact artifact) Sets the artifact to transfer.setException
(ArtifactTransferException exception) Sets the exception that occurred during the transfer.Deprecated.UsesetPath(Path)
instead.Sets the local file the artifact is downloaded to or uploaded from.Methods inherited from class org.eclipse.aether.spi.connector.Transfer
getListener, getTrace
-
Method Details
-
getArtifact
Gets the artifact being transferred.- Returns:
- The artifact being transferred or
null
if not set.
-
setArtifact
Sets the artifact to transfer.- Parameters:
artifact
- The artifact, may benull
.- Returns:
- This transfer for chaining, never
null
.
-
getFile
Deprecated.UsegetPath()
instead.Gets the local file the artifact is downloaded to or uploaded from. In case of a download, a connector should first transfer the bytes to a temporary file and only overwrite the target file once the entire download is completed such that an interrupted/failed download does not corrupt the current file contents.- Returns:
- The local file or
null
if not set.
-
getPath
Gets the local file the artifact is downloaded to or uploaded from. In case of a download, a connector should first transfer the bytes to a temporary file and only overwrite the target file once the entire download is completed such that an interrupted/failed download does not corrupt the current file contents.- Returns:
- The local file or
null
if not set. - Since:
- 2.0.0
-
setFile
Deprecated.UsesetPath(Path)
instead.Sets the local file the artifact is downloaded to or uploaded from.- Parameters:
file
- The local file, may benull
.- Returns:
- This transfer for chaining, never
null
.
-
setPath
Sets the local file the artifact is downloaded to or uploaded from.- Parameters:
path
- The local file, may benull
.- Returns:
- This transfer for chaining, never
null
. - Since:
- 2.0.0
-
getException
Gets the exception that occurred during the transfer (if any).- Specified by:
getException
in classTransfer
- Returns:
- The exception or
null
if the transfer was successful.
-
setException
Sets the exception that occurred during the transfer.- Parameters:
exception
- The exception, may benull
to denote a successful transfer.- Returns:
- This transfer for chaining, never
null
.
-
getPath()
instead.