Package com.google.gerrit.server
Interface StarredChangesReader
- All Known Implementing Classes:
StarredChangesUtilNoteDbImpl
public interface StarredChangesReader
Interface for reading information about starred changes.
-
Method Summary
Modifier and TypeMethodDescriptionareStarred(org.eclipse.jgit.lib.Repository allUsersRepo, List<Change.Id> changeIds, Account.Id caller) Returns a subset ofChange.Ids among the inputchangeIdslist that are starred by thecalleruser.com.google.common.collect.ImmutableSet<Change.Id> byAccountId(Account.Id accountId) Retrieves a set ofchangeIdsstarred byAccount.Id.com.google.common.collect.ImmutableSet<Change.Id> byAccountId(Account.Id accountId, boolean skipInvalidChanges) Retrieves a set ofChange.Ids associated with the specified user account, optionally skipping invalid changes.com.google.common.collect.ImmutableList<Account.Id> Retrieves a list ofAccount.Idwhich starred aChange.Id.booleanisStarred(Account.Id accountId, Change.Id changeId) Checks if a specific change is starred by a given user.
-
Method Details
-
isStarred
Checks if a specific change is starred by a given user.- Parameters:
accountId- theAccount.Id.changeId- theChange.Id.- Returns:
trueif the change is starred by the user,falseotherwise.
-
areStarred
Set<Change.Id> areStarred(org.eclipse.jgit.lib.Repository allUsersRepo, List<Change.Id> changeIds, Account.Id caller) Returns a subset ofChange.Ids among the inputchangeIdslist that are starred by thecalleruser.- Parameters:
allUsersRepo- 'All-Users' repository.changeIds- the list ofChange.Ids to check.caller- theAccount.Idto check starred changes by a user.- Returns:
- a set of
Change.Ids that are starred by the specified user.
-
byChange
Retrieves a list ofAccount.Idwhich starred aChange.Id.- Parameters:
changeId- theChange.Id.- Returns:
- an immutable list of
Account.Ids for the specified change.
-
byAccountId
Retrieves a set ofchangeIdsstarred byAccount.Id.- Parameters:
accountId- theAccount.Id.- Returns:
- an immutable set of
Change.Ids associated with the specified user account.
-
byAccountId
com.google.common.collect.ImmutableSet<Change.Id> byAccountId(Account.Id accountId, boolean skipInvalidChanges) Retrieves a set ofChange.Ids associated with the specified user account, optionally skipping invalid changes.- Parameters:
accountId- theAccount.Id.skipInvalidChanges-trueto skip invalid changes,falseotherwise.- Returns:
- an immutable set of
Change.Ids associated with the specified user account.
-