001package org.apache.archiva.repository; 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 022 023import java.time.Duration; 024import java.util.Map; 025 026/** 027 * This represents a repository that is not fully managed by archiva. Its some kind of proxy that 028 * forwards requests to the remote repository and is able to cache artifacts locally. 029 */ 030public interface RemoteRepository extends Repository { 031 032 /** 033 * Returns the interface to access the content of the repository. 034 * @return 035 */ 036 RemoteRepositoryContent getContent(); 037 038 /** 039 * Returns the credentials used to login to the remote repository. 040 * @return the credentials, null if not set. 041 */ 042 RepositoryCredentials getLoginCredentials(); 043 044 /** 045 * Returns the path relative to the root url of the repository that should be used 046 * to check the availability of the repository. 047 * @return The check path, null if not set. 048 */ 049 String getCheckPath(); 050 051 052 /** 053 * Returns additional parameters, that are used for accessing the remote repository. 054 * @return A map of key, value pairs. 055 */ 056 Map<String,String> getExtraParameters(); 057 058 059 /** 060 * Returns extra headers that are added to the request to the remote repository. 061 * @return 062 */ 063 Map<String,String> getExtraHeaders(); 064 065 /** 066 * Returns the time duration, after that the request is aborted and a error is returned, if the remote repository 067 * does not respond. 068 * @return The timeout. 069 */ 070 Duration getTimeout(); 071 072 073}