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,
49                        boolean force )
50          throws TransferFailedException, ResourceDoesNotExistException;
51  
52      void getArtifact( Artifact artifact, List<ArtifactRepository> remoteRepositories,
53                        TransferListener transferListener, boolean force )
54          throws TransferFailedException, ResourceDoesNotExistException;
55  
56      void getRemoteFile( ArtifactRepository repository, File destination, String remotePath,
57                          TransferListener downloadMonitor, String checksumPolicy, boolean force )
58          throws TransferFailedException, ResourceDoesNotExistException;
59  
60      void getArtifactMetadata( ArtifactMetadata metadata, ArtifactRepository remoteRepository, File destination,
61                                String checksumPolicy )
62          throws TransferFailedException, ResourceDoesNotExistException;
63  
64      void getArtifactMetadataFromDeploymentRepository( ArtifactMetadata metadata, ArtifactRepository remoteRepository,
65                                                        File file, String checksumPolicyWarn )
66          throws TransferFailedException, ResourceDoesNotExistException;
67  
68      //
69      // Deployer
70      //
71      void putArtifact( File source, Artifact artifact, ArtifactRepository deploymentRepository,
72                        TransferListener downloadMonitor )
73          throws TransferFailedException;
74  
75      void putRemoteFile( ArtifactRepository repository, File source, String remotePath,
76                          TransferListener downloadMonitor )
77          throws TransferFailedException;
78  
79      void putArtifactMetadata( File source, ArtifactMetadata artifactMetadata, ArtifactRepository repository )
80          throws TransferFailedException;
81  }