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  
24  import org.apache.maven.artifact.Artifact;
25  import org.apache.maven.artifact.metadata.ArtifactMetadata;
26  import org.apache.maven.artifact.repository.ArtifactRepository;
27  import org.apache.maven.wagon.ResourceDoesNotExistException;
28  import org.apache.maven.wagon.TransferFailedException;
29  import org.apache.maven.wagon.UnsupportedProtocolException;
30  import org.apache.maven.wagon.Wagon;
31  import org.apache.maven.wagon.events.TransferListener;
32  import org.apache.maven.wagon.repository.Repository;
33  
34  /**
35   * WagonManager
36   */
37  public interface WagonManager {
38      @Deprecated
39      Wagon getWagon(String protocol) throws UnsupportedProtocolException;
40  
41      @Deprecated
42      Wagon getWagon(Repository repository) throws UnsupportedProtocolException, WagonConfigurationException;
43  
44      //
45      // Retriever
46      //
47      void getArtifact(Artifact artifact, ArtifactRepository repository, TransferListener transferListener, boolean force)
48              throws TransferFailedException, ResourceDoesNotExistException;
49  
50      void getArtifact(
51              Artifact artifact,
52              List<ArtifactRepository> remoteRepositories,
53              TransferListener transferListener,
54              boolean force)
55              throws TransferFailedException, ResourceDoesNotExistException;
56  
57      void getRemoteFile(
58              ArtifactRepository repository,
59              File destination,
60              String remotePath,
61              TransferListener downloadMonitor,
62              String checksumPolicy,
63              boolean force)
64              throws TransferFailedException, ResourceDoesNotExistException;
65  
66      void getArtifactMetadata(
67              ArtifactMetadata metadata, ArtifactRepository remoteRepository, File destination, String checksumPolicy)
68              throws TransferFailedException, ResourceDoesNotExistException;
69  
70      void getArtifactMetadataFromDeploymentRepository(
71              ArtifactMetadata metadata, ArtifactRepository remoteRepository, File file, String checksumPolicyWarn)
72              throws TransferFailedException, ResourceDoesNotExistException;
73  
74      //
75      // Deployer
76      //
77      void putArtifact(
78              File source, Artifact artifact, ArtifactRepository deploymentRepository, TransferListener downloadMonitor)
79              throws TransferFailedException;
80  
81      void putRemoteFile(ArtifactRepository repository, File source, String remotePath, TransferListener downloadMonitor)
82              throws TransferFailedException;
83  
84      void putArtifactMetadata(File source, ArtifactMetadata artifactMetadata, ArtifactRepository repository)
85              throws TransferFailedException;
86  }