Interface StarredChangesReader

All Known Implementing Classes:
StarredChangesUtilNoteDbImpl

public interface StarredChangesReader
Interface for reading information about starred changes.
  • Method Summary

    Modifier and Type
    Method
    Description
    areStarred(org.eclipse.jgit.lib.Repository allUsersRepo, List<Change.Id> changeIds, Account.Id caller)
    Returns a subset of Change.Ids among the input changeIds list that are starred by the caller user.
    com.google.common.collect.ImmutableSet<Change.Id>
    Retrieves a set of changeIds starred by Account.Id.
    com.google.common.collect.ImmutableSet<Change.Id>
    byAccountId(Account.Id accountId, boolean skipInvalidChanges)
    Retrieves a set of Change.Ids associated with the specified user account, optionally skipping invalid changes.
    com.google.common.collect.ImmutableList<Account.Id>
    byChange(Change.Id changeId)
    Retrieves a list of Account.Id which starred a Change.Id.
    boolean
    isStarred(Account.Id accountId, Change.Id changeId)
    Checks if a specific change is starred by a given user.
  • Method Details

    • isStarred

      boolean isStarred(Account.Id accountId, Change.Id changeId)
      Checks if a specific change is starred by a given user.
      Parameters:
      accountId - the Account.Id.
      changeId - the Change.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 of Change.Ids among the input changeIds list that are starred by the caller user.
      Parameters:
      allUsersRepo - 'All-Users' repository.
      changeIds - the list of Change.Ids to check.
      caller - the Account.Id to check starred changes by a user.
      Returns:
      a set of Change.Ids that are starred by the specified user.
    • byChange

      com.google.common.collect.ImmutableList<Account.Id> byChange(Change.Id changeId)
      Retrieves a list of Account.Id which starred a Change.Id.
      Parameters:
      changeId - the Change.Id.
      Returns:
      an immutable list of Account.Ids for the specified change.
    • byAccountId

      com.google.common.collect.ImmutableSet<Change.Id> byAccountId(Account.Id accountId)
      Retrieves a set of changeIds starred by Account.Id.
      Parameters:
      accountId - the Account.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 of Change.Ids associated with the specified user account, optionally skipping invalid changes.
      Parameters:
      accountId - the Account.Id.
      skipInvalidChanges - true to skip invalid changes, false otherwise.
      Returns:
      an immutable set of Change.Ids associated with the specified user account.