Interface ForestAccessCache


@Internal public interface ForestAccessCache
Provides per-row, per-issue caching and functions to verify row/issue visibility to the user
  • Method Details

    • clear

      void clear()
    • clear

      default void clear(ApplicationUser user)
    • clear

      void clear(String userKey)
    • getInvisibleRows

      @NotNull LongSet getInvisibleRows(LongIterable rows, String userKey) throws ForestAccessCache.UserLookupException
      Calculates/retrieves the set of row IDs (among the passed rows), which contain items not visible to the specified user.
      Parameters:
      rows - Rows to check -- only inserted rows must be passed here. Temporary rows (from ItemForest) are not allowed, because this method works with RowManager and caches.
      Throws:
      ForestAccessCache.UserLookupException
    • getInvisibleRows

      @NotNull LongSet getInvisibleRows(LongIterable rows, ApplicationUser user)
      See Also:
    • collectInvisibleRows

      void collectInvisibleRows(ItemForest forest, String userKey, LongCollector invisibleRowsCollector) throws ForestAccessCache.UserLookupException
      Collects invisible rows from a temporary forest. Rows do not have to exist, and rows cache is not used by this method. (Issue cache *is* used, after rows get converted to items.)
      Parameters:
      forest - a forest to check
      userKey - the user
      invisibleRowsCollector - collector that will receive row IDs for the rows that contain an item not visible to the user
      Throws:
      ForestAccessCache.UserLookupException
    • collectInvisibleRows

      void collectInvisibleRows(ItemForest forest, ApplicationUser user, LongCollector invisibleRowsCollector)
    • collectInvisibleIssues

      void collectInvisibleIssues(LongIterable issues, ApplicationUser user, boolean overrideSecurity, LongCollector invisibleIssuesCollector)
      Collects issues that are not visible to the specified user. Uses per-user visibility cache to speed up processing.
      Parameters:
      issues - issue IDs (in any order)
      user - the user
      overrideSecurity - when true, searching with overrideSecurity is used
      invisibleIssuesCollector - a collector to receive invisible issue IDs
    • getInvisibleItems

      ItemIdentitySet getInvisibleItems(Set<ItemIdentity> items, ApplicationUser user)