CompositeAccessControlManager extends AbstractAccessControlManager { @NotNull @Override public Privilege[] getSupportedPrivileges(String absPath) throws RepositoryException { ImmutableSet.Builder<Privilege> privs = ImmutableSet.builder(); for (AccessControlManager acMgr : acMgrs) { privs.add(acMgr.getSupportedPrivileges(absPath)); } Set<Privilege> s = privs.build(); return s.toArray(new Privilege[0]); } CompositeAccessControlManager(@NotNull Root root,
                                         @NotNull NamePathMapper namePathMapper,
                                         @NotNull SecurityProvider securityProvider,
                                         @NotNull List<AccessControlManager> acMgrs,
                                         @NotNull AggregationFilter aggregationFilter); @NotNull @Override Privilege[] getSupportedPrivileges(String absPath); @Override AccessControlPolicy[] getPolicies(String absPath); @Override AccessControlPolicy[] getEffectivePolicies(String absPath); @Override AccessControlPolicyIterator getApplicablePolicies(String absPath); @Override void setPolicy(String absPath, AccessControlPolicy policy); @Override void removePolicy(String absPath, AccessControlPolicy policy); @NotNull @Override JackrabbitAccessControlPolicy[] getApplicablePolicies(@NotNull Principal principal); @NotNull @Override JackrabbitAccessControlPolicy[] getPolicies(@NotNull Principal principal); @NotNull @Override AccessControlPolicy[] getEffectivePolicies(@NotNull Set<Principal> principals);  }
@Test public void testGetSupportedPrivileges() throws Exception { Set<Privilege> expected = ImmutableSet.copyOf(getPrivilegeManager(root).getRegisteredPrivileges()); Set<Privilege> result = ImmutableSet.copyOf(acMgr.getSupportedPrivileges("/")); assertEquals(expected, result); result = Sets.newHashSet(acMgr.getSupportedPrivileges(TEST_PATH)); assertTrue(result.containsAll(expected)); assertTrue(result.contains(TestPrivilege.INSTANCE)); }