Revert "Enable plugins to add REST views for /plugins/<plugin-id>/"
This reverts commit 1b256dfd08.
HttpPluginModule also binds on the exact same pattern to make
static resources and custom servlets from plugins available in the
URL space. With both bindings declared it is unspecified if plugin
resources are served, or if REST API views on PLUGIN_KIND are served.
This ambiguity is exactly why this feature was never supported.
Change-Id: Ie7cfeb18d2267cc68fffa0d8765a232fb4129044
This commit is contained in:
committed by
Jonathan Nieder
parent
3551dc0456
commit
9e6c1740de
@@ -29,7 +29,6 @@ import com.google.gerrit.httpd.restapi.AccountsRestApiServlet;
|
||||
import com.google.gerrit.httpd.restapi.ChangesRestApiServlet;
|
||||
import com.google.gerrit.httpd.restapi.ConfigRestApiServlet;
|
||||
import com.google.gerrit.httpd.restapi.GroupsRestApiServlet;
|
||||
import com.google.gerrit.httpd.restapi.PluginsRestApiServlet;
|
||||
import com.google.gerrit.httpd.restapi.ProjectsRestApiServlet;
|
||||
import com.google.gerrit.httpd.rpc.doc.QueryDocumentationFilter;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
@@ -104,7 +103,6 @@ class UrlModule extends ServletModule {
|
||||
serveRegex("^/(?:a/)?changes/(.*)$").with(ChangesRestApiServlet.class);
|
||||
serveRegex("^/(?:a/)?config/(.*)$").with(ConfigRestApiServlet.class);
|
||||
serveRegex("^/(?:a/)?groups/(.*)?$").with(GroupsRestApiServlet.class);
|
||||
serveRegex("^/(?:a/)?plugins/(.*)?$").with(PluginsRestApiServlet.class);
|
||||
serveRegex("^/(?:a/)?projects/(.*)?$").with(ProjectsRestApiServlet.class);
|
||||
|
||||
filter("/Documentation/").through(QueryDocumentationFilter.class);
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
// Copyright (C) 2016 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.httpd.restapi;
|
||||
|
||||
import com.google.gerrit.server.plugins.PluginsCollection;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
@Singleton
|
||||
public class PluginsRestApiServlet extends RestApiServlet {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Inject
|
||||
PluginsRestApiServlet(RestApiServlet.Globals globals,
|
||||
Provider<PluginsCollection> plugins) {
|
||||
super(globals, plugins);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user