1 /** 2 * Copyright 2008-2012 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.codehaus.mojo.wagon.shared; 17 18 /* 19 * Licensed to the Apache Software Foundation (ASF) under one or more contributor license 20 * agreements. See the NOTICE file distributed with this work for additional information regarding 21 * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the 22 * "License"); you may not use this file except in compliance with the License. You may obtain a 23 * copy of the License at 24 * 25 * http://www.apache.org/licenses/LICENSE-2.0 26 * 27 * Unless required by applicable law or agreed to in writing, software distributed under the License 28 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 29 * or implied. See the License for the specific language governing permissions and limitations under 30 * the License. 31 */ 32 33 import java.util.List; 34 35 import org.apache.maven.plugin.logging.Log; 36 import org.apache.maven.wagon.Wagon; 37 import org.apache.maven.wagon.WagonException; 38 39 /** 40 * 41 */ 42 public interface WagonDownload { 43 String ROLE = WagonDownload.class.getName(); 44 45 /** 46 * @param wagon 47 * - a Wagon instance 48 * @param fileSet 49 * - Criteria to build the list 50 * @param logger 51 * @return a list of files at the remote host relative to RemoteFileSet's directory 52 * @throws WagonException 53 */ 54 List<String> getFileList(Wagon wagon, WagonFileSet fileSet, Log logger) throws WagonException; 55 56 /** 57 * 58 * @param wagon 59 * - a Wagon instance 60 * @param remoteFileSet 61 * - 62 * @param logger 63 * @throws WagonException 64 */ 65 public void download(Wagon wagon, WagonFileSet remoteFileSet, Log logger, boolean skipExisting) 66 throws WagonException; 67 68 /** 69 * 70 * @param wagon 71 * - a Wagon instance 72 * @param resource 73 * @throws WagonException 74 */ 75 public boolean exists(Wagon wagon, String resource) throws WagonException; 76 77 }