test_class.declarator: TEST_LOCAL_PREFIX = "test"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_LOCAL_PREFIX = "test";
test_class.type: String
test_class.var_name: TEST_LOCAL_PREFIX
test_class.declarator: TEST_PREFIX = "jr"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_PREFIX = "jr";
test_class.type: String
test_class.var_name: TEST_PREFIX
test_class.declarator: TEST_URI = "http://jackrabbit.apache.org"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_URI = "http://jackrabbit.apache.org";
test_class.type: String
test_class.var_name: TEST_URI
test_class.declarator: testName = TEST_PREFIX + ":testRoot"
test_class.modifier: private final
test_class.original_string: private final String testName = TEST_PREFIX + ":testRoot";
test_class.type: String
test_class.var_name: testName
test_class.declarator: testPath = '/' + testName
test_class.modifier: private final
test_class.original_string: private final String testPath = '/' + testName;
test_class.type: String
test_class.var_name: testPath
test_class.declarator: testPrincipal
test_class.modifier: private
test_class.original_string: private Principal testPrincipal;
test_class.type: Principal
test_class.var_name: testPrincipal
test_class.declarator: testPrivileges
test_class.modifier: private
test_class.original_string: private Privilege[] testPrivileges;
test_class.type: Privilege[]
test_class.var_name: testPrivileges
test_class.declarator: acMgr
test_class.modifier: private
test_class.original_string: private AccessControlManagerImpl acMgr;
test_class.type: AccessControlManagerImpl
test_class.var_name: acMgr
test_class.declarator: npMapper
test_class.modifier: private
test_class.original_string: private NamePathMapper npMapper;
test_class.type: NamePathMapper
test_class.var_name: npMapper
test_class.declarator: valueFactory
test_class.modifier: private
test_class.original_string: private ValueFactory valueFactory;
test_class.type: ValueFactory
test_class.var_name: valueFactory
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/accesscontrol/AccessControlManagerImplTest.java
test_class.identifier: AccessControlManagerImplTest
test_class.interfaces: implements AccessControlConstants
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void testEffectivePolicyIsolatedAce() throws Exception {
          Root r = spy(root);
          ContentSession cs = when(spy(adminSession).getLatestRoot()).thenReturn(r).getMock();
          when(r.getContentSession()).thenReturn(cs);
  
          Tree testTree = r.getTree(testPath);
          Tree ace = TreeUtil.addChild(testTree, "ace", NT_REP_GRANT_ACE);
          ace.setProperty(REP_PRINCIPAL_NAME, testPrincipal.getName());
          ace.setProperty(REP_PRIVILEGES, ImmutableList.of(JCR_READ), Type.NAMES);
  
          ResultRow row = when(mock(ResultRow.class).getPath()).thenReturn(ace.getPath()).getMock();
          Iterable rows = ImmutableList.of(row);
          Result res = mock(Result.class);
          when(res.getRows()).thenReturn(rows).getMock();
          QueryEngine qe = mock(QueryEngine.class);
          when(qe.executeQuery(anyString(), anyString(), any(Map.class), any(Map.class))).thenReturn(res);
          when(r.getQueryEngine()).thenReturn(qe);
  
          AccessControlManagerImpl mgr = createAccessControlManager(r, getNamePathMapper());
          AccessControlPolicy[] policies = mgr.getEffectivePolicies(ImmutableSet.of(testPrincipal));
          assertPolicies(policies, 0);
      }
test_case.class_method_signature: AccessControlManagerImplTest.testEffectivePolicyIsolatedAce()
test_case.full_signature: @Test public void testEffectivePolicyIsolatedAce()
test_case.identifier: testEffectivePolicyIsolatedAce
test_case.invocations: spy getMock thenReturn when getLatestRoot spy thenReturn when getContentSession getTree addChild setProperty getName setProperty of getMock thenReturn when getPath mock getPath of mock getMock thenReturn when getRows mock thenReturn when executeQuery anyString anyString any any thenReturn when getQueryEngine createAccessControlManager getNamePathMapper getEffectivePolicies of assertPolicies
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEffectivePolicyIsolatedAce()
focal_class.declarator: log = LoggerFactory.getLogger(AccessControlManagerImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(AccessControlManagerImpl.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: bitsProvider
focal_class.modifier: private final
focal_class.original_string: private final PrivilegeBitsProvider bitsProvider;
focal_class.type: PrivilegeBitsProvider
focal_class.var_name: bitsProvider
focal_class.declarator: ntMgr
focal_class.modifier: private final
focal_class.original_string: private final ReadOnlyNodeTypeManager ntMgr;
focal_class.type: ReadOnlyNodeTypeManager
focal_class.var_name: ntMgr
focal_class.declarator: principalManager
focal_class.modifier: private final
focal_class.original_string: private final PrincipalManager principalManager;
focal_class.type: PrincipalManager
focal_class.var_name: principalManager
focal_class.declarator: restrictionProvider
focal_class.modifier: private final
focal_class.original_string: private final RestrictionProvider restrictionProvider;
focal_class.type: RestrictionProvider
focal_class.var_name: restrictionProvider
focal_class.declarator: configParams
focal_class.modifier: private final
focal_class.original_string: private final ConfigurationParameters configParams;
focal_class.type: ConfigurationParameters
focal_class.var_name: configParams
focal_class.declarator: readPaths
focal_class.modifier: private final
focal_class.original_string: private final Set<String> readPaths;
focal_class.type: Set<String>
focal_class.var_name: readPaths
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/accesscontrol/AccessControlManagerImpl.java
focal_class.identifier: AccessControlManagerImpl
focal_class.interfaces: implements PolicyOwner
focal_class.class_method_signature: AccessControlManagerImpl.AccessControlManagerImpl(@NotNull Root root, @NotNull NamePathMapper namePathMapper,
                                      @NotNull SecurityProvider securityProvider)
focal_class.full_signature: public  AccessControlManagerImpl(@NotNull Root root, @NotNull NamePathMapper namePathMapper,
                                      @NotNull SecurityProvider securityProvider)
focal_class.identifier: AccessControlManagerImpl
focal_class.modifiers: public
focal_class.parameters: (@NotNull Root root, @NotNull NamePathMapper namePathMapper,
                                      @NotNull SecurityProvider securityProvider)
focal_class.signature:  AccessControlManagerImpl(@NotNull Root root, @NotNull NamePathMapper namePathMapper,
                                      @NotNull SecurityProvider securityProvider)
focal_class.class_method_signature: AccessControlManagerImpl.getPolicies(@Nullable String absPath)
focal_class.full_signature: @NotNull @Override public AccessControlPolicy[] getPolicies(@Nullable String absPath)
focal_class.identifier: getPolicies
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@Nullable String absPath)
focal_class.return: AccessControlPolicy[]
focal_class.signature: AccessControlPolicy[] getPolicies(@Nullable String absPath)
focal_class.class_method_signature: AccessControlManagerImpl.getEffectivePolicies(@Nullable String absPath)
focal_class.full_signature: @NotNull @Override public AccessControlPolicy[] getEffectivePolicies(@Nullable String absPath)
focal_class.identifier: getEffectivePolicies
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@Nullable String absPath)
focal_class.return: AccessControlPolicy[]
focal_class.signature: AccessControlPolicy[] getEffectivePolicies(@Nullable String absPath)
focal_class.class_method_signature: AccessControlManagerImpl.isEffectiveReadPath(@Nullable String oakPath)
focal_class.full_signature: private boolean isEffectiveReadPath(@Nullable String oakPath)
focal_class.identifier: isEffectiveReadPath
focal_class.modifiers: private
focal_class.parameters: (@Nullable String oakPath)
focal_class.return: boolean
focal_class.signature: boolean isEffectiveReadPath(@Nullable String oakPath)
focal_class.class_method_signature: AccessControlManagerImpl.getApplicablePolicies(@Nullable String absPath)
focal_class.full_signature: @NotNull @Override public AccessControlPolicyIterator getApplicablePolicies(@Nullable String absPath)
focal_class.identifier: getApplicablePolicies
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@Nullable String absPath)
focal_class.return: AccessControlPolicyIterator
focal_class.signature: AccessControlPolicyIterator getApplicablePolicies(@Nullable String absPath)
focal_class.class_method_signature: AccessControlManagerImpl.setPolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.full_signature: @Override public void setPolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.identifier: setPolicy
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.return: void
focal_class.signature: void setPolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.class_method_signature: AccessControlManagerImpl.setPrincipalBasedAcl(PrincipalACL principalAcl)
focal_class.full_signature: private void setPrincipalBasedAcl(PrincipalACL principalAcl)
focal_class.identifier: setPrincipalBasedAcl
focal_class.modifiers: private
focal_class.parameters: (PrincipalACL principalAcl)
focal_class.return: void
focal_class.signature: void setPrincipalBasedAcl(PrincipalACL principalAcl)
focal_class.class_method_signature: AccessControlManagerImpl.setNodeBasedAcl(@Nullable String oakPath, @NotNull Tree tree,
                                   @NotNull ACL acl)
focal_class.full_signature: private void setNodeBasedAcl(@Nullable String oakPath, @NotNull Tree tree,
                                   @NotNull ACL acl)
focal_class.identifier: setNodeBasedAcl
focal_class.modifiers: private
focal_class.parameters: (@Nullable String oakPath, @NotNull Tree tree,
                                   @NotNull ACL acl)
focal_class.return: void
focal_class.signature: void setNodeBasedAcl(@Nullable String oakPath, @NotNull Tree tree,
                                   @NotNull ACL acl)
focal_class.class_method_signature: AccessControlManagerImpl.removePolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.full_signature: @Override public void removePolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.identifier: removePolicy
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.return: void
focal_class.signature: void removePolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.class_method_signature: AccessControlManagerImpl.getApplicablePolicies(@NotNull Principal principal)
focal_class.full_signature: @NotNull @Override public JackrabbitAccessControlPolicy[] getApplicablePolicies(@NotNull Principal principal)
focal_class.identifier: getApplicablePolicies
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull Principal principal)
focal_class.return: JackrabbitAccessControlPolicy[]
focal_class.signature: JackrabbitAccessControlPolicy[] getApplicablePolicies(@NotNull Principal principal)
focal_class.class_method_signature: AccessControlManagerImpl.getPolicies(@NotNull Principal principal)
focal_class.full_signature: @NotNull @Override public JackrabbitAccessControlPolicy[] getPolicies(@NotNull Principal principal)
focal_class.identifier: getPolicies
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull Principal principal)
focal_class.return: JackrabbitAccessControlPolicy[]
focal_class.signature: JackrabbitAccessControlPolicy[] getPolicies(@NotNull Principal principal)
focal_class.class_method_signature: AccessControlManagerImpl.getEffectivePolicies(@NotNull Set<Principal> principals)
focal_class.full_signature: @NotNull @Override public AccessControlPolicy[] getEffectivePolicies(@NotNull Set<Principal> principals)
focal_class.identifier: getEffectivePolicies
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull Set<Principal> principals)
focal_class.return: AccessControlPolicy[]
focal_class.signature: AccessControlPolicy[] getEffectivePolicies(@NotNull Set<Principal> principals)
focal_class.class_method_signature: AccessControlManagerImpl.defines(String absPath, @NotNull AccessControlPolicy accessControlPolicy)
focal_class.full_signature: @Override public boolean defines(String absPath, @NotNull AccessControlPolicy accessControlPolicy)
focal_class.identifier: defines
focal_class.modifiers: @Override public
focal_class.parameters: (String absPath, @NotNull AccessControlPolicy accessControlPolicy)
focal_class.return: boolean
focal_class.signature: boolean defines(String absPath, @NotNull AccessControlPolicy accessControlPolicy)
focal_class.class_method_signature: AccessControlManagerImpl.getAclTree(@Nullable String oakPath, @NotNull Tree accessControlledTree)
focal_class.full_signature: @Nullable private Tree getAclTree(@Nullable String oakPath, @NotNull Tree accessControlledTree)
focal_class.identifier: getAclTree
focal_class.modifiers: @Nullable private
focal_class.parameters: (@Nullable String oakPath, @NotNull Tree accessControlledTree)
focal_class.return: Tree
focal_class.signature: Tree getAclTree(@Nullable String oakPath, @NotNull Tree accessControlledTree)
focal_class.class_method_signature: AccessControlManagerImpl.createAclTree(@Nullable String oakPath, @NotNull Tree tree)
focal_class.full_signature: @NotNull private Tree createAclTree(@Nullable String oakPath, @NotNull Tree tree)
focal_class.identifier: createAclTree
focal_class.modifiers: @NotNull private
focal_class.parameters: (@Nullable String oakPath, @NotNull Tree tree)
focal_class.return: Tree
focal_class.signature: Tree createAclTree(@Nullable String oakPath, @NotNull Tree tree)
focal_class.class_method_signature: AccessControlManagerImpl.createACL(@Nullable String oakPath,
                                                    @NotNull Tree accessControlledTree,
                                                    boolean isEffectivePolicy,
                                                    @NotNull Predicate<Tree> predicate)
focal_class.full_signature: @Nullable private JackrabbitAccessControlList createACL(@Nullable String oakPath,
                                                    @NotNull Tree accessControlledTree,
                                                    boolean isEffectivePolicy,
                                                    @NotNull Predicate<Tree> predicate)
focal_class.identifier: createACL
focal_class.modifiers: @Nullable private
focal_class.parameters: (@Nullable String oakPath,
                                                    @NotNull Tree accessControlledTree,
                                                    boolean isEffectivePolicy,
                                                    @NotNull Predicate<Tree> predicate)
focal_class.return: JackrabbitAccessControlList
focal_class.signature: JackrabbitAccessControlList createACL(@Nullable String oakPath,
                                                    @NotNull Tree accessControlledTree,
                                                    boolean isEffectivePolicy,
                                                    @NotNull Predicate<Tree> predicate)
focal_class.class_method_signature: AccessControlManagerImpl.createPrincipalACL(@Nullable String oakPath,
                                                             @NotNull Principal principal)
focal_class.full_signature: @Nullable private JackrabbitAccessControlList createPrincipalACL(@Nullable String oakPath,
                                                             @NotNull Principal principal)
focal_class.identifier: createPrincipalACL
focal_class.modifiers: @Nullable private
focal_class.parameters: (@Nullable String oakPath,
                                                             @NotNull Principal principal)
focal_class.return: JackrabbitAccessControlList
focal_class.signature: JackrabbitAccessControlList createPrincipalACL(@Nullable String oakPath,
                                                             @NotNull Principal principal)
focal_class.class_method_signature: AccessControlManagerImpl.createACE(@Nullable String oakPath,
                            @NotNull Tree aceTree,
                            @NotNull RestrictionProvider restrictionProvider,
                            @NotNull Map<String, Principal> principalMap)
focal_class.full_signature: @NotNull private ACE createACE(@Nullable String oakPath,
                            @NotNull Tree aceTree,
                            @NotNull RestrictionProvider restrictionProvider,
                            @NotNull Map<String, Principal> principalMap)
focal_class.identifier: createACE
focal_class.modifiers: @NotNull private
focal_class.parameters: (@Nullable String oakPath,
                            @NotNull Tree aceTree,
                            @NotNull RestrictionProvider restrictionProvider,
                            @NotNull Map<String, Principal> principalMap)
focal_class.return: ACE
focal_class.signature: ACE createACE(@Nullable String oakPath,
                            @NotNull Tree aceTree,
                            @NotNull RestrictionProvider restrictionProvider,
                            @NotNull Map<String, Principal> principalMap)
focal_class.class_method_signature: AccessControlManagerImpl.searchAces(@NotNull Set<Principal> principals, @NotNull Root root)
focal_class.full_signature: @NotNull private static Result searchAces(@NotNull Set<Principal> principals, @NotNull Root root)
focal_class.identifier: searchAces
focal_class.modifiers: @NotNull private static
focal_class.parameters: (@NotNull Set<Principal> principals, @NotNull Root root)
focal_class.return: Result
focal_class.signature: Result searchAces(@NotNull Set<Principal> principals, @NotNull Root root)
focal_class.class_method_signature: AccessControlManagerImpl.getPrincipal(@NotNull Tree aceTree, @NotNull Map<String, Principal> principalMap)
focal_class.full_signature: @NotNull private Principal getPrincipal(@NotNull Tree aceTree, @NotNull Map<String, Principal> principalMap)
focal_class.identifier: getPrincipal
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NotNull Tree aceTree, @NotNull Map<String, Principal> principalMap)
focal_class.return: Principal
focal_class.signature: Principal getPrincipal(@NotNull Tree aceTree, @NotNull Map<String, Principal> principalMap)
focal_class.class_method_signature: AccessControlManagerImpl.getNodePath(ACE principalBasedAce)
focal_class.full_signature: private String getNodePath(ACE principalBasedAce)
focal_class.identifier: getNodePath
focal_class.modifiers: private
focal_class.parameters: (ACE principalBasedAce)
focal_class.return: String
focal_class.signature: String getNodePath(ACE principalBasedAce)
focal_class.superclass: extends AbstractAccessControlManager
focal_method.body: @NotNull
      @Override
      public AccessControlPolicy[] getEffectivePolicies(@Nullable String absPath) throws RepositoryException {
          String oakPath = getOakPath(absPath);
          Tree tree = getTree(oakPath, Permissions.READ_ACCESS_CONTROL, true);
  
          Root r = getRoot().getContentSession().getLatestRoot();
          tree = r.getTree(tree.getPath());
  
          List<AccessControlPolicy> effective = new ArrayList<>();
          AccessControlPolicy policy = createACL(oakPath, tree, true, Predicates.alwaysTrue());
          if (policy != null) {
              effective.add(policy);
          }
          if (oakPath != null) {
              String parentPath = Text.getRelativeParent(oakPath, 1);
              while (!parentPath.isEmpty()) {
                  Tree t = r.getTree(parentPath);
                  AccessControlPolicy plc = createACL(parentPath, t, true, Predicates.alwaysTrue());
                  if (plc != null) {
                      effective.add(plc);
                  }
                  parentPath = (PathUtils.denotesRoot(parentPath)) ? "" : Text.getRelativeParent(parentPath, 1);
              }
          }
          if (isEffectiveReadPath(oakPath)) {
              effective.add(ReadPolicy.INSTANCE);
          }
          return effective.toArray(new AccessControlPolicy[0]);
      }
focal_method.class_method_signature: AccessControlManagerImpl.getEffectivePolicies(@Nullable String absPath)
focal_method.full_signature: @NotNull @Override public AccessControlPolicy[] getEffectivePolicies(@Nullable String absPath)
focal_method.identifier: getEffectivePolicies
focal_method.invocations: getOakPath getTree getLatestRoot getContentSession getRoot getTree getPath createACL alwaysTrue add getRelativeParent isEmpty getTree createACL alwaysTrue add denotesRoot getRelativeParent isEffectiveReadPath add toArray
focal_method.modifiers: @NotNull @Override public
focal_method.parameters: (@Nullable String absPath)
focal_method.return: AccessControlPolicy[]
focal_method.signature: AccessControlPolicy[] getEffectivePolicies(@Nullable String absPath)