Interface ForestAccessCache
@Internal
public interface ForestAccessCache
Provides per-row, per-issue caching and functions to verify row/issue visibility to the user
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()default voidclear(ApplicationUser user) voidvoidcollectInvisibleIssues(LongIterable issues, ApplicationUser user, boolean overrideSecurity, LongCollector invisibleIssuesCollector) Collects issues that are not visible to the specified user.voidcollectInvisibleRows(ItemForest forest, ApplicationUser user, LongCollector invisibleRowsCollector) voidcollectInvisibleRows(ItemForest forest, String userKey, LongCollector invisibleRowsCollector) Collects invisible rows from a temporary forest.getInvisibleItems(Set<ItemIdentity> items, ApplicationUser user) LongSetgetInvisibleRows(LongIterable rows, ApplicationUser user) LongSetgetInvisibleRows(LongIterable rows, String userKey) Calculates/retrieves the set of row IDs (among the passedrows), which contain items not visible to the specified user.
-
Method Details
-
clear
void clear() -
clear
default void clear(ApplicationUser user) -
clear
-
getInvisibleRows
@NotNull LongSet getInvisibleRows(LongIterable rows, String userKey) throws ForestAccessCache.UserLookupException Calculates/retrieves the set of row IDs (among the passedrows), 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 checkuserKey- the userinvisibleRowsCollector- 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 useroverrideSecurity- when true, searching with overrideSecurity is usedinvisibleIssuesCollector- a collector to receive invisible issue IDs
-
getInvisibleItems
-