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