SystemInfoService{Impl}: Remove unused contributorAgreements method
Change-Id: Ib999603a21788ab48afe4a7d0d4a44196b4bef68
This commit is contained in:
parent
bfc0c378bc
commit
f801131ab2
|
@ -14,7 +14,6 @@
|
|||
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.common.auth.SignInRequired;
|
||||
import com.google.gwtjsonrpc.common.AllowCrossSiteRequest;
|
||||
import com.google.gwtjsonrpc.common.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.common.RemoteJsonService;
|
||||
|
@ -29,8 +28,5 @@ public interface SystemInfoService extends RemoteJsonService {
|
|||
@AllowCrossSiteRequest
|
||||
void daemonHostKeys(AsyncCallback<List<SshHostKey>> callback);
|
||||
|
||||
@SignInRequired
|
||||
void contributorAgreements(AsyncCallback<List<ContributorAgreement>> callback);
|
||||
|
||||
void clientError(String message, AsyncCallback<VoidResult> callback);
|
||||
}
|
||||
|
|
|
@ -14,11 +14,8 @@
|
|||
|
||||
package com.google.gerrit.httpd.rpc;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.gerrit.common.data.ContributorAgreement;
|
||||
import com.google.gerrit.common.data.SshHostKey;
|
||||
import com.google.gerrit.common.data.SystemInfoService;
|
||||
import com.google.gerrit.server.project.ProjectCache;
|
||||
import com.google.gerrit.server.ssh.SshInfo;
|
||||
import com.google.gwtjsonrpc.common.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.common.VoidResult;
|
||||
|
@ -32,7 +29,6 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
@ -45,28 +41,12 @@ class SystemInfoServiceImpl implements SystemInfoService {
|
|||
|
||||
private final List<HostKey> hostKeys;
|
||||
private final Provider<HttpServletRequest> httpRequest;
|
||||
private final ProjectCache projectCache;
|
||||
|
||||
@Inject
|
||||
SystemInfoServiceImpl(SshInfo daemon,
|
||||
Provider<HttpServletRequest> hsr,
|
||||
ProjectCache pc) {
|
||||
Provider<HttpServletRequest> hsr) {
|
||||
hostKeys = daemon.getHostKeys();
|
||||
httpRequest = hsr;
|
||||
projectCache = pc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contributorAgreements(
|
||||
final AsyncCallback<List<ContributorAgreement>> callback) {
|
||||
Collection<ContributorAgreement> agreements =
|
||||
projectCache.getAllProjects().getConfig().getContributorAgreements();
|
||||
List<ContributorAgreement> cas =
|
||||
Lists.newArrayListWithCapacity(agreements.size());
|
||||
for (ContributorAgreement ca : agreements) {
|
||||
cas.add(ca.forUi());
|
||||
}
|
||||
callback.onSuccess(cas);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue