Make group specific REST API accessible from SSH command

Change-Id: I66255575519c91d60b2f550c475df55a0745872d
This commit is contained in:
David Ostrovsky
2013-06-11 00:56:21 +02:00
parent 47126937b5
commit 2180d654bb
3 changed files with 15 additions and 4 deletions

View File

@@ -43,12 +43,18 @@ import java.util.List;
import java.util.Map;
public class AddIncludedGroups implements RestModifyView<GroupResource, Input> {
static class Input {
public static class Input {
@DefaultInput
String _oneGroup;
List<String> groups;
public static Input fromGroups(List<String> groups) {
Input in = new Input();
in.groups = groups;
return in;
}
static Input init(Input in) {
if (in == null) {
in = new Input();

View File

@@ -46,12 +46,17 @@ import com.google.inject.Provider;
import java.util.List;
import java.util.Map;
class AddMembers implements RestModifyView<GroupResource, Input> {
static class Input {
public class AddMembers implements RestModifyView<GroupResource, Input> {
public static class Input {
@DefaultInput
String _oneMember;
List<String> members;
public static Input fromMembers(List<String> members) {
Input in = new Input();
in.members = members;
return in;
}
static Input init(Input in) {
if (in == null) {

View File

@@ -28,7 +28,7 @@ public class GroupResource implements RestResource {
private final GroupControl control;
GroupResource(GroupControl control) {
public GroupResource(GroupControl control) {
this.control = control;
}