DashboardApiImpl: Rename getDashboard to get

The "Dashboard" suffix is redundant and will make the list of members
look cluttered when we add further dashboard related endpoints later
and they all have the same suffix.

Change-Id: I3c1e9419e86d77997291e56171314d60a88a6689
This commit is contained in:
David Pursehouse
2017-09-19 19:07:51 +09:00
parent 5eeea0b9d5
commit 3f956041ef

View File

@@ -38,18 +38,18 @@ public class DashboardApiImpl implements DashboardApi {
}
private final DashboardsCollection dashboards;
private final Provider<GetDashboard> getDashboard;
private final Provider<GetDashboard> get;
private final ProjectResource project;
private final String id;
@Inject
DashboardApiImpl(
DashboardsCollection dashboards,
Provider<GetDashboard> getDashboard,
Provider<GetDashboard> get,
@Assisted ProjectResource project,
@Assisted String id) {
this.dashboards = dashboards;
this.getDashboard = getDashboard;
this.get = get;
this.project = project;
this.id = id;
}
@@ -62,7 +62,7 @@ public class DashboardApiImpl implements DashboardApi {
@Override
public DashboardInfo get(boolean inherited) throws RestApiException {
try {
return getDashboard.get().setInherited(inherited).apply(resource());
return get.get().setInherited(inherited).apply(resource());
} catch (IOException | PermissionBackendException | ConfigInvalidException e) {
throw asRestApiException("Cannot read dashboard", e);
}