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