Line data Source code
1 : // Copyright (C) 2013 The Android Open Source Project 2 : // 3 : // Licensed under the Apache License, Version 2.0 (the "License"); 4 : // you may not use this file except in compliance with the License. 5 : // You may obtain a copy of the License at 6 : // 7 : // http://www.apache.org/licenses/LICENSE-2.0 8 : // 9 : // Unless required by applicable law or agreed to in writing, software 10 : // distributed under the License is distributed on an "AS IS" BASIS, 11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 : // See the License for the specific language governing permissions and 13 : // limitations under the License. 14 : 15 : package com.google.gerrit.extensions.config; 16 : 17 : import com.google.gerrit.extensions.annotations.ExtensionPoint; 18 : 19 : @ExtensionPoint 20 1 : public abstract class DownloadScheme { 21 : /** 22 : * Returns the URL of this download scheme. 23 : * 24 : * @param project the name of the project for which the URL should be returned 25 : * @return URL of the download scheme 26 : */ 27 : public abstract String getUrl(String project); 28 : 29 : /** Returns whether this scheme requires authentication */ 30 : public abstract boolean isAuthRequired(); 31 : 32 : /** Returns whether this scheme supports authentication */ 33 : public abstract boolean isAuthSupported(); 34 : 35 : /** Returns whether the download scheme is enabled */ 36 : public abstract boolean isEnabled(); 37 : }