Move RestApiServlet classes under httpd.restapi

Instead of having them all under their own separate package where in
some cases (for example httpd.rpc.access) they are the only class.

This also makes it a bit easier to see, from the remaining classes
under httpd.rpc, what features are potentially still missing from
the REST API.

Change-Id: I205fd40241a9f4144d785206e4e0eaed46584b4e
This commit is contained in:
David Pursehouse
2016-02-18 19:01:26 +09:00
parent 34e205799c
commit c93d66513d
7 changed files with 12 additions and 18 deletions

View File

@@ -0,0 +1,31 @@
// 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.httpd.restapi;
import com.google.gerrit.server.access.AccessCollection;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
@Singleton
public class AccessRestApiServlet extends RestApiServlet {
private static final long serialVersionUID = 1L;
@Inject
AccessRestApiServlet(RestApiServlet.Globals globals,
Provider<AccessCollection> access) {
super(globals, access);
}
}

View File

@@ -0,0 +1,31 @@
// Copyright (C) 2012 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.account.AccountsCollection;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
@Singleton
public class AccountsRestApiServlet extends RestApiServlet {
private static final long serialVersionUID = 1L;
@Inject
AccountsRestApiServlet(RestApiServlet.Globals globals,
Provider<AccountsCollection> accounts) {
super(globals, accounts);
}
}

View File

@@ -0,0 +1,31 @@
// Copyright (C) 2012 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.change.ChangesCollection;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
@Singleton
public class ChangesRestApiServlet extends RestApiServlet {
private static final long serialVersionUID = 1L;
@Inject
ChangesRestApiServlet(RestApiServlet.Globals globals,
Provider<ChangesCollection> changes) {
super(globals, changes);
}
}

View File

@@ -0,0 +1,31 @@
// 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.httpd.restapi;
import com.google.gerrit.server.config.ConfigCollection;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
@Singleton
public class ConfigRestApiServlet extends RestApiServlet {
private static final long serialVersionUID = 1L;
@Inject
ConfigRestApiServlet(RestApiServlet.Globals globals,
Provider<ConfigCollection> configCollection) {
super(globals, configCollection);
}
}

View File

@@ -0,0 +1,31 @@
// 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.httpd.restapi;
import com.google.gerrit.server.group.GroupsCollection;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
@Singleton
public class GroupsRestApiServlet extends RestApiServlet {
private static final long serialVersionUID = 1L;
@Inject
GroupsRestApiServlet(RestApiServlet.Globals globals,
Provider<GroupsCollection> groups) {
super(globals, groups);
}
}

View File

@@ -0,0 +1,31 @@
// Copyright (C) 2012 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.project.ProjectsCollection;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
@Singleton
public class ProjectsRestApiServlet extends RestApiServlet {
private static final long serialVersionUID = 1L;
@Inject
ProjectsRestApiServlet(RestApiServlet.Globals globals,
Provider<ProjectsCollection> projects) {
super(globals, projects);
}
}