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