Support to edit project plugin configuration parameters in UI

Plugins can define project configuration parameters that project
owners are allowed to edit through the ProjectInfoScreen. This makes
it much easier for project owners to change the project specific plugin
configuration.

With this change only string parameters without inheritance are
supported. Support for inheritance and other parameter types is added
by follow-up changes.

Change-Id: Iab3bc2ea2eb6dd6d0508f0049f43f7b9b21f58c8
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-11-15 16:00:00 +01:00
parent c73bcab298
commit 9ce4f55626
12 changed files with 340 additions and 4 deletions

View File

@@ -0,0 +1,46 @@
// Copyright (C) 2013 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.server.config;
import com.google.gerrit.extensions.annotations.ExtensionPoint;
@ExtensionPoint
public class ProjectConfigEntry {
public enum Type {
STRING
}
private final String displayName;
private final String defaultValue;
private final Type type;
public ProjectConfigEntry(String displayName, String defaultValue) {
this.displayName = displayName;
this.defaultValue = defaultValue;
this.type = Type.STRING;
}
public String getDisplayName() {
return displayName;
}
public String getDefaultValue() {
return defaultValue;
}
public Type getType() {
return type;
}
}