Line data Source code
1 : // Copyright (C) 2016 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.api.projects; 16 : 17 : import com.google.common.collect.ImmutableList; 18 : import com.google.common.collect.ImmutableMap; 19 : import com.google.gerrit.common.Nullable; 20 : import com.google.gerrit.extensions.client.InheritableBoolean; 21 : import com.google.gerrit.extensions.client.ProjectState; 22 : import com.google.gerrit.extensions.client.SubmitType; 23 : import com.google.gerrit.extensions.common.ActionInfo; 24 : import java.util.List; 25 : import java.util.Map; 26 : 27 22 : public class ConfigInfo { 28 : public String description; 29 : 30 : public InheritedBooleanInfo useContributorAgreements; 31 : public InheritedBooleanInfo useContentMerge; 32 : public InheritedBooleanInfo useSignedOffBy; 33 : public InheritedBooleanInfo createNewChangeForAllNotInTarget; 34 : public InheritedBooleanInfo requireChangeId; 35 : public InheritedBooleanInfo enableSignedPush; 36 : public InheritedBooleanInfo requireSignedPush; 37 : public InheritedBooleanInfo rejectImplicitMerges; 38 : public InheritedBooleanInfo privateByDefault; 39 : public InheritedBooleanInfo workInProgressByDefault; 40 : public InheritedBooleanInfo enableReviewerByEmail; 41 : public InheritedBooleanInfo matchAuthorToCommitterDate; 42 : public InheritedBooleanInfo rejectEmptyCommit; 43 : 44 : public MaxObjectSizeLimitInfo maxObjectSizeLimit; 45 : @Deprecated // Equivalent to defaultSubmitType.value 46 : public SubmitType submitType; 47 : public SubmitTypeInfo defaultSubmitType; 48 : public ProjectState state; 49 : public Map<String, Map<String, ConfigParameterInfo>> pluginConfig; 50 : public Map<String, ActionInfo> actions; 51 : 52 : public Map<String, CommentLinkInfo> commentlinks; 53 : 54 : public ImmutableMap<String, ImmutableList<String>> extensionPanelNames; 55 : 56 22 : public static class InheritedBooleanInfo { 57 : public Boolean value; 58 : public InheritableBoolean configuredValue; 59 : public Boolean inheritedValue; 60 : } 61 : 62 22 : public static class MaxObjectSizeLimitInfo { 63 : /** The effective value in bytes. Null if not set. */ 64 : @Nullable public String value; 65 : 66 : /** The value configured explicitly on the project as a formatted string. Null if not set. */ 67 : @Nullable public String configuredValue; 68 : 69 : /** 70 : * Whether the value was inherited or overridden from the project's parent hierarchy or global 71 : * config. Null if not inherited or overridden. 72 : */ 73 : @Nullable public String summary; 74 : } 75 : 76 1 : public static class ConfigParameterInfo { 77 : public String displayName; 78 : public String description; 79 : public String warning; 80 : public ProjectConfigEntryType type; 81 : public String value; 82 : public Boolean editable; 83 : public Boolean inheritable; 84 : public String configuredValue; 85 : public String inheritedValue; 86 : public List<String> permittedValues; 87 : public List<String> values; 88 : } 89 : 90 22 : public static class SubmitTypeInfo { 91 : public SubmitType value; 92 : public SubmitType configuredValue; 93 : public SubmitType inheritedValue; 94 : } 95 : }