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 022import java.time.Duration; 023import java.util.Map; 024 025/** 026 * The editable part of a remote repository 027 */ 028public interface EditableRemoteRepository extends EditableRepository, RemoteRepository 029{ 030 031 /** 032 * Sets the login credentials for login to the remote repository. 033 * @param credentials 034 */ 035 void setCredentials(RepositoryCredentials credentials); 036 037 /** 038 * Sets the path relative to the root url of the repository that should be used to check 039 * the availability of the repository. 040 * 041 * @param path The path string. 042 */ 043 void setCheckPath(String path); 044 045 /** 046 * Sets additional parameters to be used to access the remote repository. 047 * @param params A map of parameters, may not be null. 048 */ 049 void setExtraParameters(Map<String,String> params); 050 051 /** 052 * Adds an additional parameter. 053 * @param key The key of the parameter 054 * @param value The value of the parameter 055 */ 056 void addExtraParameter(String key, String value); 057 058 /** 059 * Sets the extra headers, that are added to the requests to the remote repository. 060 */ 061 void setExtraHeaders(Map<String,String> headers); 062 063 /** 064 * Adds an extra header. 065 * @param header The header name 066 * @param value The header value 067 */ 068 void addExtraHeader(String header, String value); 069 070 /** 071 * Sets the timeout for requests to the remote repository. 072 * 073 * @param duration The amount of time, after that the request is aborted. 074 */ 075 void setTimeout(Duration duration); 076 077 /** 078 * Sets the content. 079 * @param content 080 */ 081 void setContent(RemoteRepositoryContent content); 082}