001package org.apache.maven.repository.legacy;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *   http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import java.io.File;
023import java.util.List;
024
025import org.apache.maven.artifact.Artifact;
026import org.apache.maven.artifact.metadata.ArtifactMetadata;
027import org.apache.maven.artifact.repository.ArtifactRepository;
028import org.apache.maven.wagon.ResourceDoesNotExistException;
029import org.apache.maven.wagon.TransferFailedException;
030import org.apache.maven.wagon.UnsupportedProtocolException;
031import org.apache.maven.wagon.Wagon;
032import org.apache.maven.wagon.events.TransferListener;
033import org.apache.maven.wagon.repository.Repository;
034
035public interface WagonManager
036{
037    @Deprecated
038    Wagon getWagon( String protocol )
039        throws UnsupportedProtocolException;
040
041    @Deprecated
042    Wagon getWagon( Repository repository )
043        throws UnsupportedProtocolException, WagonConfigurationException;
044
045    //
046    // Retriever
047    //
048    void getArtifact( Artifact artifact, ArtifactRepository repository, TransferListener transferListener, boolean force )
049        throws TransferFailedException, ResourceDoesNotExistException;
050
051    void getArtifact( Artifact artifact, List<ArtifactRepository> remoteRepositories,
052                      TransferListener transferListener, boolean force )
053        throws TransferFailedException, ResourceDoesNotExistException;
054
055    void getRemoteFile( ArtifactRepository repository, File destination, String remotePath,
056                        TransferListener downloadMonitor, String checksumPolicy, boolean force )
057        throws TransferFailedException, ResourceDoesNotExistException;
058
059    void getArtifactMetadata( ArtifactMetadata metadata, ArtifactRepository remoteRepository, File destination,
060                              String checksumPolicy )
061        throws TransferFailedException, ResourceDoesNotExistException;
062
063    void getArtifactMetadataFromDeploymentRepository( ArtifactMetadata metadata, ArtifactRepository remoteRepository,
064                                                      File file, String checksumPolicyWarn )
065        throws TransferFailedException, ResourceDoesNotExistException;
066
067    //
068    // Deployer
069    //
070    void putArtifact( File source, Artifact artifact, ArtifactRepository deploymentRepository,
071                      TransferListener downloadMonitor )
072        throws TransferFailedException;
073
074    void putRemoteFile( ArtifactRepository repository, File source, String remotePath, TransferListener downloadMonitor )
075        throws TransferFailedException;
076
077    void putArtifactMetadata( File source, ArtifactMetadata artifactMetadata, ArtifactRepository repository )
078        throws TransferFailedException;
079}