use of com.google.gerrit.client.changes.AccountDashboardScreen in project gerrit by GerritCodeReview.
the class Dispatcher method mine.
private static Screen mine() {
if (Gerrit.isSignedIn()) {
return new AccountDashboardScreen(Gerrit.getUserAccount().getId());
}
Screen r = new AccountDashboardScreen(null);
r.setRequiresSignIn(true);
return r;
}
use of com.google.gerrit.client.changes.AccountDashboardScreen in project gerrit by GerritCodeReview.
the class Dispatcher method dashboard.
private static void dashboard(final String token) {
String rest = skip(token);
if (rest.matches("[0-9]+")) {
Gerrit.display(token, new AccountDashboardScreen(Account.Id.parse(rest)));
return;
}
if (rest.equals("self")) {
if (Gerrit.isSignedIn()) {
Gerrit.display(token, new AccountDashboardScreen(Gerrit.getUserAccount().getId()));
} else {
Screen s = new AccountDashboardScreen(null);
s.setRequiresSignIn(true);
Gerrit.display(token, s);
}
return;
}
if (rest.startsWith("?")) {
Gerrit.display(token, new CustomDashboardScreen(rest.substring(1)));
return;
}
Gerrit.display(token, new NotFoundScreen());
}
Aggregations