1 package org.apache.maven.archiva.proxy;
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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
22 import org.apache.maven.archiva.model.ArchivaRepository;
23 import org.apache.maven.archiva.model.ArtifactReference;
24 import org.apache.maven.archiva.model.ProjectReference;
27 import java.util.List;
30 * Handler for potential repository proxy connectors.
32 * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
35 public interface RepositoryProxyConnectors
38 * Performs the artifact fetch operation against the target repositories
39 * of the provided source repository.
41 * If the artifact is found, it is downloaded and placed into the source repository
44 * @param repository the source repository to use. (must be a managed repository)
45 * @param artifact the artifact to fetch.
46 * @return true if the fetch operation succeeded in obtaining content, false if no content was obtained.
47 * @throws ProxyException if there was a problem fetching the content from the target repositories.
49 public File fetchFromProxies( ArchivaRepository repository, ArtifactReference artifact )
50 throws ProxyException;
53 * Performs the metadata fetch operation against the target repositories
54 * of the provided source repository.
56 * If the metadata is found, it is downloaded and placed into the source repository
59 * @param repository the source repository to use. (must be a managed repository)
60 * @param metadata the metadata to fetch.
61 * @return true if the fetch operation succeeded in obtaining content, false if no content was obtained.
62 * @throws ProxyException if there was a problem fetching the content from the target repositories.
64 public File fetchFromProxies( ArchivaRepository repository, ProjectReference metadata )
65 throws ProxyException;
68 * Get the List of {@link ProxyConnector} objects of the source repository.
70 * @param repository the source repository to look for.
71 * @return the List of {@link ProxyConnector} objects.
73 public List getProxyConnectors( ArchivaRepository repository );
76 * Tests to see if the provided repository is a source repository for
77 * any {@link ProxyConnector} objects.
79 * @param repository the source repository to look for.
80 * @return true if there are proxy connectors that use the provided
81 * repository as a source repository.
83 public boolean hasProxies( ArchivaRepository repository );