Search in sources :

Example 1 with Star

use of com.google.gerrit.server.account.AccountResource.Star in project gerrit by GerritCodeReview.

the class Stars method parse.

@Override
public Star parse(AccountResource parent, IdString id) throws ResourceNotFoundException, OrmException {
    IdentifiedUser user = parent.getUser();
    ChangeResource change = changes.parse(TopLevelResource.INSTANCE, id);
    Set<String> labels = starredChangesUtil.getLabels(user.getAccountId(), change.getId());
    return new AccountResource.Star(user, change, labels);
}
Also used : ChangeResource(com.google.gerrit.server.change.ChangeResource) Star(com.google.gerrit.server.account.AccountResource.Star) IdString(com.google.gerrit.extensions.restapi.IdString) IdentifiedUser(com.google.gerrit.server.IdentifiedUser)

Aggregations

IdString (com.google.gerrit.extensions.restapi.IdString)1 IdentifiedUser (com.google.gerrit.server.IdentifiedUser)1 Star (com.google.gerrit.server.account.AccountResource.Star)1 ChangeResource (com.google.gerrit.server.change.ChangeResource)1