View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.repository.legacy;
20  
21  import java.io.File;
22  import java.util.List;
23  import org.apache.maven.artifact.Artifact;
24  import org.apache.maven.artifact.metadata.ArtifactMetadata;
25  import org.apache.maven.artifact.repository.ArtifactRepository;
26  import org.apache.maven.wagon.ResourceDoesNotExistException;
27  import org.apache.maven.wagon.TransferFailedException;
28  import org.apache.maven.wagon.UnsupportedProtocolException;
29  import org.apache.maven.wagon.Wagon;
30  import org.apache.maven.wagon.events.TransferListener;
31  import org.apache.maven.wagon.repository.Repository;
32  
33  /**
34   * WagonManager
35   */
36  public interface WagonManager {
37      @Deprecated
38      Wagon getWagon(String protocol) throws UnsupportedProtocolException;
39  
40      @Deprecated
41      Wagon getWagon(Repository repository) throws UnsupportedProtocolException, WagonConfigurationException;
42  
43      //
44      // Retriever
45      //
46      void getArtifact(Artifact artifact, ArtifactRepository repository, TransferListener transferListener, boolean force)
47              throws TransferFailedException, ResourceDoesNotExistException;
48  
49      void getArtifact(
50              Artifact artifact,
51              List<ArtifactRepository> remoteRepositories,
52              TransferListener transferListener,
53              boolean force)
54              throws TransferFailedException, ResourceDoesNotExistException;
55  
56      void getRemoteFile(
57              ArtifactRepository repository,
58              File destination,
59              String remotePath,
60              TransferListener downloadMonitor,
61              String checksumPolicy,
62              boolean force)
63              throws TransferFailedException, ResourceDoesNotExistException;
64  
65      void getArtifactMetadata(
66              ArtifactMetadata metadata, ArtifactRepository remoteRepository, File destination, String checksumPolicy)
67              throws TransferFailedException, ResourceDoesNotExistException;
68  
69      void getArtifactMetadataFromDeploymentRepository(
70              ArtifactMetadata metadata, ArtifactRepository remoteRepository, File file, String checksumPolicyWarn)
71              throws TransferFailedException, ResourceDoesNotExistException;
72  
73      //
74      // Deployer
75      //
76      void putArtifact(
77              File source, Artifact artifact, ArtifactRepository deploymentRepository, TransferListener downloadMonitor)
78              throws TransferFailedException;
79  
80      void putRemoteFile(ArtifactRepository repository, File source, String remotePath, TransferListener downloadMonitor)
81              throws TransferFailedException;
82  
83      void putArtifactMetadata(File source, ArtifactMetadata artifactMetadata, ArtifactRepository repository)
84              throws TransferFailedException;
85  }