Make all REST resources public so that they can be used from plugins
Make the RestResource classes and their constructors public so that they can be used from plugins. Most RestResource classes were already public, so this makes it consistent across all RestResources. Change-Id: I49b7dc9b3bd7e9b0734d5933392df60b006e5745 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
committed by
David Pursehouse
parent
04cbd34e70
commit
d6a48f0201
@@ -48,11 +48,11 @@ public class AccountResource implements RestResource {
|
||||
return user;
|
||||
}
|
||||
|
||||
static class Capability implements RestResource {
|
||||
public static class Capability implements RestResource {
|
||||
private final IdentifiedUser user;
|
||||
private final String capability;
|
||||
|
||||
Capability(IdentifiedUser user, String capability) {
|
||||
public Capability(IdentifiedUser user, String capability) {
|
||||
this.user = user;
|
||||
this.capability = capability;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ChangeResource implements RestResource, HasETag {
|
||||
|
||||
private final ChangeControl control;
|
||||
|
||||
ChangeResource(ChangeControl control) {
|
||||
public ChangeResource(ChangeControl control) {
|
||||
this.control = control;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public class CommentResource implements RestResource {
|
||||
private final RevisionResource rev;
|
||||
private final PatchLineComment comment;
|
||||
|
||||
CommentResource(RevisionResource rev, PatchLineComment c) {
|
||||
public CommentResource(RevisionResource rev, PatchLineComment c) {
|
||||
this.rev = rev;
|
||||
this.comment = c;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class DraftCommentResource implements RestResource {
|
||||
private final RevisionResource rev;
|
||||
private final PatchLineComment comment;
|
||||
|
||||
DraftCommentResource(RevisionResource rev, PatchLineComment c) {
|
||||
public DraftCommentResource(RevisionResource rev, PatchLineComment c) {
|
||||
this.rev = rev;
|
||||
this.comment = c;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class FileResource implements RestResource {
|
||||
private final RevisionResource rev;
|
||||
private final Patch.Key key;
|
||||
|
||||
FileResource(RevisionResource rev, String name) {
|
||||
public FileResource(RevisionResource rev, String name) {
|
||||
this.rev = rev;
|
||||
this.key = new Patch.Key(rev.getPatchSet().getId(), name);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@ public class IncludedGroupResource extends GroupResource {
|
||||
|
||||
private final GroupDescription.Basic member;
|
||||
|
||||
IncludedGroupResource(GroupResource group, GroupDescription.Basic member) {
|
||||
public IncludedGroupResource(GroupResource group,
|
||||
GroupDescription.Basic member) {
|
||||
super(group);
|
||||
this.member = member;
|
||||
}
|
||||
|
||||
@@ -25,12 +25,12 @@ public class PluginResource implements RestResource {
|
||||
private final Plugin plugin;
|
||||
private final String name;
|
||||
|
||||
PluginResource(Plugin plugin) {
|
||||
public PluginResource(Plugin plugin) {
|
||||
this.plugin = plugin;
|
||||
this.name = plugin.getName();
|
||||
}
|
||||
|
||||
PluginResource(String name) {
|
||||
public PluginResource(String name) {
|
||||
this.plugin = null;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ChildProjectResource extends ProjectResource {
|
||||
|
||||
private final ProjectControl child;
|
||||
|
||||
ChildProjectResource(ProjectResource project, ProjectControl child) {
|
||||
public ChildProjectResource(ProjectResource project, ProjectControl child) {
|
||||
super(project);
|
||||
this.child = child;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class DashboardResource implements RestResource {
|
||||
public static final TypeLiteral<RestView<DashboardResource>> DASHBOARD_KIND =
|
||||
new TypeLiteral<RestView<DashboardResource>>() {};
|
||||
|
||||
static DashboardResource projectDefault(ProjectControl ctl) {
|
||||
public static DashboardResource projectDefault(ProjectControl ctl) {
|
||||
return new DashboardResource(ctl, null, null, null, true);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class DashboardResource implements RestResource {
|
||||
private final Config config;
|
||||
private final boolean projectDefault;
|
||||
|
||||
DashboardResource(ProjectControl control,
|
||||
public DashboardResource(ProjectControl control,
|
||||
String refName,
|
||||
String pathName,
|
||||
Config config,
|
||||
|
||||
Reference in New Issue
Block a user