Class ArtifactDownload

    • Constructor Summary

      Constructors 
      Constructor Description
      ArtifactDownload()
      Creates a new uninitialized download.
      ArtifactDownload​(org.eclipse.aether.artifact.Artifact artifact, java.lang.String context, java.io.File file, java.lang.String checksumPolicy)
      Creates a new download with the specified properties.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getChecksumPolicy()
      Gets the checksum policy for this transfer.
      java.util.List<org.eclipse.aether.repository.RemoteRepository> getRepositories()
      Gets the remote repositories that are being aggregated by the physically contacted remote repository (i.e.
      java.lang.String getRequestContext()
      Gets the context of this transfer.
      java.util.Collection<java.lang.String> getSupportedContexts()
      Gets the set of request contexts in which the artifact is generally available.
      boolean isExistenceCheck()
      Indicates whether this transfer shall only verify the existence of the artifact in the remote repository rather than actually downloading the file.
      ArtifactDownload setArtifact​(org.eclipse.aether.artifact.Artifact artifact)
      Sets the artifact to transfer.
      ArtifactDownload setChecksumPolicy​(java.lang.String checksumPolicy)
      Sets the checksum policy for this transfer.
      ArtifactDownload setException​(org.eclipse.aether.transfer.ArtifactTransferException exception)
      Sets the exception that occurred during the transfer.
      ArtifactDownload setExistenceCheck​(boolean existenceCheck)
      Controls whether this transfer shall only verify the existence of the artifact in the remote repository rather than actually downloading the file.
      ArtifactDownload setFile​(java.io.File file)
      Sets the local file the artifact is downloaded to or uploaded from.
      ArtifactDownload setListener​(org.eclipse.aether.transfer.TransferListener listener)  
      ArtifactDownload setRepositories​(java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories)
      Sets the remote repositories that are being aggregated by the physically contacted remote repository (i.e.
      ArtifactDownload setRequestContext​(java.lang.String context)
      Sets the context of this transfer.
      ArtifactDownload setSupportedContexts​(java.util.Collection<java.lang.String> contexts)
      Sets the set of request contexts in which the artifact is generally available.
      ArtifactDownload setTrace​(org.eclipse.aether.RequestTrace trace)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ArtifactDownload

        public ArtifactDownload()
        Creates a new uninitialized download.
      • ArtifactDownload

        public ArtifactDownload​(org.eclipse.aether.artifact.Artifact artifact,
                                java.lang.String context,
                                java.io.File file,
                                java.lang.String checksumPolicy)
        Creates a new download with the specified properties.
        Parameters:
        artifact - The artifact to download, may be null.
        context - The context in which this download is performed, may be null.
        file - The local file to download the artifact to, may be null.
        checksumPolicy - The checksum policy, may be null.
    • Method Detail

      • setFile

        public ArtifactDownload setFile​(java.io.File file)
        Description copied from class: ArtifactTransfer
        Sets the local file the artifact is downloaded to or uploaded from.
        Overrides:
        setFile in class ArtifactTransfer
        Parameters:
        file - The local file, may be null.
        Returns:
        This transfer for chaining, never null.
      • isExistenceCheck

        public boolean isExistenceCheck()
        Indicates whether this transfer shall only verify the existence of the artifact in the remote repository rather than actually downloading the file. Just like with an actual transfer, a connector is expected to signal the non-existence of the artifact by associating an ArtifactNotFoundException with this download. Note: If an existence check is requested, ArtifactTransfer.getFile() may be null, i.e. the connector must not try to access the local file.
        Returns:
        true if only the artifact existence shall be verified, false to actually download the artifact.
      • setExistenceCheck

        public ArtifactDownload setExistenceCheck​(boolean existenceCheck)
        Controls whether this transfer shall only verify the existence of the artifact in the remote repository rather than actually downloading the file.
        Parameters:
        existenceCheck - true if only the artifact existence shall be verified, false to actually download the artifact.
        Returns:
        This transfer for chaining, never null.
      • getChecksumPolicy

        public java.lang.String getChecksumPolicy()
        Gets the checksum policy for this transfer.
        Returns:
        The checksum policy, never null.
      • setChecksumPolicy

        public ArtifactDownload setChecksumPolicy​(java.lang.String checksumPolicy)
        Sets the checksum policy for this transfer.
        Parameters:
        checksumPolicy - The checksum policy, may be null.
        Returns:
        This transfer for chaining, never null.
      • getRequestContext

        public java.lang.String getRequestContext()
        Gets the context of this transfer.
        Returns:
        The context id, never null.
      • setRequestContext

        public ArtifactDownload setRequestContext​(java.lang.String context)
        Sets the context of this transfer.
        Parameters:
        context - The context id, may be null.
        Returns:
        This transfer for chaining, never null.
      • getSupportedContexts

        public java.util.Collection<java.lang.String> getSupportedContexts()
        Gets the set of request contexts in which the artifact is generally available. Repository managers can indicate that an artifact is available in more than the requested context to avoid future remote trips for the same artifact in a different context.
        Returns:
        The set of requests context in which the artifact is available, never null.
      • setSupportedContexts

        public ArtifactDownload setSupportedContexts​(java.util.Collection<java.lang.String> contexts)
        Sets the set of request contexts in which the artifact is generally available. Repository managers can indicate that an artifact is available in more than the requested context to avoid future remote trips for the same artifact in a different context. The set of supported contexts defaults to the original request context if not overridden by the repository connector.
        Parameters:
        contexts - The set of requests context in which the artifact is available, may be null.
        Returns:
        This transfer for chaining, never null.
      • getRepositories

        public java.util.List<org.eclipse.aether.repository.RemoteRepository> getRepositories()
        Gets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a repository manager).
        Returns:
        The remote repositories being aggregated, never null.
      • setRepositories

        public ArtifactDownload setRepositories​(java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories)
        Sets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a repository manager).
        Parameters:
        repositories - The remote repositories being aggregated, may be null.
        Returns:
        This transfer for chaining, never null.
      • setException

        public ArtifactDownload setException​(org.eclipse.aether.transfer.ArtifactTransferException exception)
        Description copied from class: ArtifactTransfer
        Sets the exception that occurred during the transfer.
        Overrides:
        setException in class ArtifactTransfer
        Parameters:
        exception - The exception, may be null to denote a successful transfer.
        Returns:
        This transfer for chaining, never null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object