001 package org.codehaus.mojo.wagon.shared;
002
003 /*
004 * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
005 * agreements. See the NOTICE file distributed with this work for additional information regarding
006 * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance with the License. You may obtain a
008 * copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software distributed under the License
013 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
014 * or implied. See the License for the specific language governing permissions and limitations under
015 * the License.
016 */
017
018 import java.util.List;
019
020 import org.apache.maven.plugin.logging.Log;
021 import org.apache.maven.wagon.Wagon;
022 import org.apache.maven.wagon.WagonException;
023
024 /**
025 *
026 */
027 public interface WagonDownload {
028 String ROLE = WagonDownload.class.getName();
029
030 /**
031 * @param wagon
032 * - a Wagon instance
033 * @param fileSet
034 * - Criteria to build the list
035 * @param logger
036 * @return a list of files at the remote host relative to RemoteFileSet's directory
037 * @throws WagonException
038 */
039 List<?> getFileList(Wagon wagon, WagonFileSet fileSet, Log logger) throws WagonException;
040
041 /**
042 *
043 * @param wagon
044 * - a Wagon instance
045 * @param remoteFileSet
046 * -
047 * @param logger
048 * @throws WagonException
049 */
050 public void download(Wagon wagon, WagonFileSet remoteFileSet, Log logger) throws WagonException;
051
052 /**
053 *
054 * @param wagon
055 * - a Wagon instance
056 * @param resource
057 * @throws WagonException
058 */
059 public boolean exists(Wagon wagon, String resource) throws WagonException;
060
061 }