Simplify RestModifyView interface

The inputType can be determined by looking at the declaration
of the interface. We don't need to implement a method in each
view implementation to supply the correct data for reflection
in RestApiServlet.

Change-Id: I1afae6ddef661722efe39ccc917c028e7e993595
This commit is contained in:
Shawn Pearce
2013-01-26 11:55:39 -08:00
committed by Edwin Kempin
parent 63cc8ec1b6
commit 5ab78ad7c2
24 changed files with 78 additions and 162 deletions

View File

@@ -55,11 +55,6 @@ class SetDefaultDashboard implements RestModifyView<DashboardResource, Input> {
this.get = get;
}
@Override
public Class<Input> inputType() {
return Input.class;
}
@Override
public Object apply(DashboardResource resource, Input input)
throws AuthException, BadRequestException, ResourceConflictException,
@@ -137,11 +132,6 @@ class SetDefaultDashboard implements RestModifyView<DashboardResource, Input> {
this.setDefault = setDefault;
}
@Override
public Class<Input> inputType() {
return SetDashboard.Input.class;
}
@Override
public Object apply(ProjectResource resource, Input input)
throws AuthException, BadRequestException, ResourceConflictException,