use of com.google.gerrit.client.rpc.ScreenLoadCallback in project gerrit by GerritCodeReview.
the class ProjectAccessScreen method onLoad.
@Override
protected void onLoad() {
super.onLoad();
CallbackGroup cbs = new CallbackGroup();
ConfigServerApi.capabilities(cbs.add(new AsyncCallback<NativeMap<CapabilityInfo>>() {
@Override
public void onSuccess(NativeMap<CapabilityInfo> result) {
capabilityMap = result;
}
@Override
public void onFailure(Throwable caught) {
// Handled by ScreenLoadCallback.onFailure().
}
}));
Util.PROJECT_SVC.projectAccess(getProjectKey(), cbs.addFinal(new ScreenLoadCallback<ProjectAccess>(this) {
@Override
public void preDisplay(ProjectAccess access) {
displayReadOnly(access);
}
}));
savedPanel = ACCESS;
}
use of com.google.gerrit.client.rpc.ScreenLoadCallback in project gerrit by GerritCodeReview.
the class ProjectInfoScreen method onLoad.
@Override
protected void onLoad() {
super.onLoad();
Project.NameKey project = getProjectKey();
CallbackGroup cbg = new CallbackGroup();
AccessMap.get(project, cbg.add(new GerritCallback<ProjectAccessInfo>() {
@Override
public void onSuccess(ProjectAccessInfo result) {
isOwner = result.isOwner();
configVisible = result.configVisible();
enableForm();
saveProject.setVisible(isOwner);
}
}));
ProjectApi.getConfig(project, cbg.addFinal(new ScreenLoadCallback<ConfigInfo>(this) {
@Override
public void preDisplay(ConfigInfo result) {
display(result);
}
}));
savedPanel = INFO;
}
Aggregations