1 package org.apache.archiva.repository; 2 3 /* 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 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 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 19 * under the License. 20 */ 21 22 23 import java.time.Duration; 24 import java.util.Map; 25 26 /** 27 * This represents a repository that is not fully managed by archiva. Its some kind of proxy that 28 * forwards requests to the remote repository and is able to cache artifacts locally. 29 */ 30 public interface RemoteRepository extends Repository { 31 32 /** 33 * Returns the interface to access the content of the repository. 34 * @return 35 */ 36 RemoteRepositoryContent getContent(); 37 38 /** 39 * Returns the credentials used to login to the remote repository. 40 * @return the credentials, null if not set. 41 */ 42 RepositoryCredentials getLoginCredentials(); 43 44 /** 45 * Returns the path relative to the root url of the repository that should be used 46 * to check the availability of the repository. 47 * @return The check path, null if not set. 48 */ 49 String getCheckPath(); 50 51 52 /** 53 * Returns additional parameters, that are used for accessing the remote repository. 54 * @return A map of key, value pairs. 55 */ 56 Map<String,String> getExtraParameters(); 57 58 59 /** 60 * Returns extra headers that are added to the request to the remote repository. 61 * @return 62 */ 63 Map<String,String> getExtraHeaders(); 64 65 /** 66 * Returns the time duration, after that the request is aborted and a error is returned, if the remote repository 67 * does not respond. 68 * @return The timeout. 69 */ 70 Duration getTimeout(); 71 72 73 }