@Test public void call() throws IOException { when(userStore.listRoles()).thenReturn(Lists.newArrayList("reader", "editor")); BooleanQuery query = new BooleanQuery(); query.add(new TermQuery(new Term(PageIndex.VIEW_RESTRICTION_ROLE, "reader")), BooleanClause.Occur.SHOULD); query.add(new TermQuery(new Term(PageIndex.VIEW_RESTRICTION_ROLE, "editor")), BooleanClause.Occur.SHOULD); task.call(); verify(searcher).search(eq(query), Matchers.any(InaccessibleDocIdsCollector.class)); }
@Override public BitSet call() throws IOException { List<String> roles = userStore.listRoles(); BooleanQuery allRolesQuery = new BooleanQuery(); for (String role : roles) { TermQuery roleQuery = new TermQuery(new Term(PageIndex.VIEW_RESTRICTION_ROLE, role)); allRolesQuery.add(roleQuery, BooleanClause.Occur.SHOULD); } AbstractDocIdsCollector collector = new InaccessibleDocIdsCollector( permission, authentication, permissionEvaluator); searcher.search(allRolesQuery, collector); return collector.getDocIds(); }
GetInaccessibleDocIdsTask implements Callable<BitSet> { @Override public BitSet call() throws IOException { List<String> roles = userStore.listRoles(); BooleanQuery allRolesQuery = new BooleanQuery(); for (String role : roles) { TermQuery roleQuery = new TermQuery(new Term(PageIndex.VIEW_RESTRICTION_ROLE, role)); allRolesQuery.add(roleQuery, BooleanClause.Occur.SHOULD); } AbstractDocIdsCollector collector = new InaccessibleDocIdsCollector( permission, authentication, permissionEvaluator); searcher.search(allRolesQuery, collector); return collector.getDocIds(); } }
GetInaccessibleDocIdsTask implements Callable<BitSet> { @Override public BitSet call() throws IOException { List<String> roles = userStore.listRoles(); BooleanQuery allRolesQuery = new BooleanQuery(); for (String role : roles) { TermQuery roleQuery = new TermQuery(new Term(PageIndex.VIEW_RESTRICTION_ROLE, role)); allRolesQuery.add(roleQuery, BooleanClause.Occur.SHOULD); } AbstractDocIdsCollector collector = new InaccessibleDocIdsCollector( permission, authentication, permissionEvaluator); searcher.search(allRolesQuery, collector); return collector.getDocIds(); } GetInaccessibleDocIdsTask(IndexSearcher searcher, Permission permission, Authentication authentication,
			UserStore userStore, DocumentrPermissionEvaluator permissionEvaluator); }
GetInaccessibleDocIdsTask implements Callable<BitSet> { @Override public BitSet call() throws IOException { List<String> roles = userStore.listRoles(); BooleanQuery allRolesQuery = new BooleanQuery(); for (String role : roles) { TermQuery roleQuery = new TermQuery(new Term(PageIndex.VIEW_RESTRICTION_ROLE, role)); allRolesQuery.add(roleQuery, BooleanClause.Occur.SHOULD); } AbstractDocIdsCollector collector = new InaccessibleDocIdsCollector( permission, authentication, permissionEvaluator); searcher.search(allRolesQuery, collector); return collector.getDocIds(); } GetInaccessibleDocIdsTask(IndexSearcher searcher, Permission permission, Authentication authentication,
			UserStore userStore, DocumentrPermissionEvaluator permissionEvaluator); @Override BitSet call(); }
GetInaccessibleDocIdsTask implements Callable<BitSet> { @Override public BitSet call() throws IOException { List<String> roles = userStore.listRoles(); BooleanQuery allRolesQuery = new BooleanQuery(); for (String role : roles) { TermQuery roleQuery = new TermQuery(new Term(PageIndex.VIEW_RESTRICTION_ROLE, role)); allRolesQuery.add(roleQuery, BooleanClause.Occur.SHOULD); } AbstractDocIdsCollector collector = new InaccessibleDocIdsCollector( permission, authentication, permissionEvaluator); searcher.search(allRolesQuery, collector); return collector.getDocIds(); } GetInaccessibleDocIdsTask(IndexSearcher searcher, Permission permission, Authentication authentication,
			UserStore userStore, DocumentrPermissionEvaluator permissionEvaluator); @Override BitSet call();  }