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.Id
s among the inputchangeIds
list that are starred by thecaller
user.com.google.common.collect.ImmutableSet<Change.Id>
byAccountId
(Account.Id accountId) Retrieves a set ofchangeIds
starred byAccount.Id
.com.google.common.collect.ImmutableSet<Change.Id>
byAccountId
(Account.Id accountId, boolean skipInvalidChanges) Retrieves a set ofChange.Id
s associated with the specified user account, optionally skipping invalid changes.com.google.common.collect.ImmutableList<Account.Id>
Retrieves a list ofAccount.Id
which starred aChange.Id
.boolean
isStarred
(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:
true
if the change is starred by the user,false
otherwise.
-
areStarred
Set<Change.Id> areStarred(org.eclipse.jgit.lib.Repository allUsersRepo, List<Change.Id> changeIds, Account.Id caller) Returns a subset ofChange.Id
s among the inputchangeIds
list that are starred by thecaller
user.- Parameters:
allUsersRepo
- 'All-Users' repository.changeIds
- the list ofChange.Id
s to check.caller
- theAccount.Id
to check starred changes by a user.- Returns:
- a set of
Change.Id
s that are starred by the specified user.
-
byChange
Retrieves a list ofAccount.Id
which starred aChange.Id
.- Parameters:
changeId
- theChange.Id
.- Returns:
- an immutable list of
Account.Id
s for the specified change.
-
byAccountId
Retrieves a set ofchangeIds
starred byAccount.Id
.- Parameters:
accountId
- theAccount.Id
.- Returns:
- an immutable set of
Change.Id
s associated with the specified user account.
-
byAccountId
com.google.common.collect.ImmutableSet<Change.Id> byAccountId(Account.Id accountId, boolean skipInvalidChanges) Retrieves a set ofChange.Id
s associated with the specified user account, optionally skipping invalid changes.- Parameters:
accountId
- theAccount.Id
.skipInvalidChanges
-true
to skip invalid changes,false
otherwise.- Returns:
- an immutable set of
Change.Id
s associated with the specified user account.
-