1 package org.apache.archiva.repository;
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 java.time.Duration;
26 * The editable part of a remote repository
28 public interface EditableRemoteRepository extends EditableRepository, RemoteRepository
32 * Sets the login credentials for login to the remote repository.
35 void setCredentials(RepositoryCredentials credentials);
38 * Sets the path relative to the root url of the repository that should be used to check
39 * the availability of the repository.
41 * @param path The path string.
43 void setCheckPath(String path);
46 * Sets additional parameters to be used to access the remote repository.
47 * @param params A map of parameters, may not be null.
49 void setExtraParameters(Map<String,String> params);
52 * Adds an additional parameter.
53 * @param key The key of the parameter
54 * @param value The value of the parameter
56 void addExtraParameter(String key, String value);
59 * Sets the extra headers, that are added to the requests to the remote repository.
61 void setExtraHeaders(Map<String,String> headers);
64 * Adds an extra header.
65 * @param header The header name
66 * @param value The header value
68 void addExtraHeader(String header, String value);
71 * Sets the timeout for requests to the remote repository.
73 * @param duration The amount of time, after that the request is aborted.
75 void setTimeout(Duration duration);
81 void setContent(RemoteRepositoryContent content);