test_class.declarator: TEST_PATH = "/test"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_PATH = "/test";
test_class.type: String
test_class.var_name: TEST_PATH
test_class.declarator: acMgr
test_class.modifier: private
test_class.original_string: private CompositeAccessControlManager acMgr;
test_class.type: CompositeAccessControlManager
test_class.var_name: acMgr
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeAccessControlManagerTest.java
test_class.identifier: CompositeAccessControlManagerTest
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void testGetEffectivePolicies() throws Exception {
          AccessControlPolicy[] effective = acMgr.getEffectivePolicies(TEST_PATH);
          assertEquals(0, effective.length);
  
          AccessControlPolicyIterator it = acMgr.getApplicablePolicies(TEST_PATH);
          while (it.hasNext()) {
              AccessControlPolicy plc = it.nextAccessControlPolicy();
              if (plc instanceof AccessControlList) {
                  ((AccessControlList) plc).addAccessControlEntry(EveryonePrincipal.getInstance(), privilegesFromNames(PrivilegeConstants.JCR_READ));
              }
              acMgr.setPolicy(TEST_PATH, plc);
          }
          root.commit();
          assertEquals(2, acMgr.getEffectivePolicies(TEST_PATH).length);
  
          Tree child = root.getTree(TEST_PATH).addChild("child");
          child.setProperty(JcrConstants.JCR_PRIMARYTYPE, NodeTypeConstants.NT_OAK_UNSTRUCTURED);
  
          assertEquals(1, acMgr.getEffectivePolicies(child.getPath()).length);
      }
test_case.class_method_signature: CompositeAccessControlManagerTest.testGetEffectivePolicies()
test_case.full_signature: @Test public void testGetEffectivePolicies()
test_case.identifier: testGetEffectivePolicies
test_case.invocations: getEffectivePolicies assertEquals getApplicablePolicies hasNext nextAccessControlPolicy addAccessControlEntry getInstance privilegesFromNames setPolicy commit assertEquals getEffectivePolicies addChild getTree setProperty assertEquals getEffectivePolicies getPath
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetEffectivePolicies()
focal_class.declarator: acMgrs
focal_class.modifier: private final
focal_class.original_string: private final List<AccessControlManager> acMgrs;
focal_class.type: List<AccessControlManager>
focal_class.var_name: acMgrs
focal_class.declarator: aggregationFilter
focal_class.modifier: private final
focal_class.original_string: private final AggregationFilter aggregationFilter;
focal_class.type: AggregationFilter
focal_class.var_name: aggregationFilter
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeAccessControlManager.java
focal_class.identifier: CompositeAccessControlManager
focal_class.class_method_signature: CompositeAccessControlManager.CompositeAccessControlManager(@NotNull Root root,
                                           @NotNull NamePathMapper namePathMapper,
                                           @NotNull SecurityProvider securityProvider,
                                           @NotNull List<AccessControlManager> acMgrs,
                                           @NotNull AggregationFilter aggregationFilter)
focal_class.full_signature: public  CompositeAccessControlManager(@NotNull Root root,
                                           @NotNull NamePathMapper namePathMapper,
                                           @NotNull SecurityProvider securityProvider,
                                           @NotNull List<AccessControlManager> acMgrs,
                                           @NotNull AggregationFilter aggregationFilter)
focal_class.identifier: CompositeAccessControlManager
focal_class.modifiers: public
focal_class.parameters: (@NotNull Root root,
                                           @NotNull NamePathMapper namePathMapper,
                                           @NotNull SecurityProvider securityProvider,
                                           @NotNull List<AccessControlManager> acMgrs,
                                           @NotNull AggregationFilter aggregationFilter)
focal_class.signature:  CompositeAccessControlManager(@NotNull Root root,
                                           @NotNull NamePathMapper namePathMapper,
                                           @NotNull SecurityProvider securityProvider,
                                           @NotNull List<AccessControlManager> acMgrs,
                                           @NotNull AggregationFilter aggregationFilter)
focal_class.class_method_signature: CompositeAccessControlManager.getSupportedPrivileges(String absPath)
focal_class.full_signature: @NotNull @Override public Privilege[] getSupportedPrivileges(String absPath)
focal_class.identifier: getSupportedPrivileges
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (String absPath)
focal_class.return: Privilege[]
focal_class.signature: Privilege[] getSupportedPrivileges(String absPath)
focal_class.class_method_signature: CompositeAccessControlManager.getPolicies(String absPath)
focal_class.full_signature: @Override public AccessControlPolicy[] getPolicies(String absPath)
focal_class.identifier: getPolicies
focal_class.modifiers: @Override public
focal_class.parameters: (String absPath)
focal_class.return: AccessControlPolicy[]
focal_class.signature: AccessControlPolicy[] getPolicies(String absPath)
focal_class.class_method_signature: CompositeAccessControlManager.getEffectivePolicies(String absPath)
focal_class.full_signature: @Override public AccessControlPolicy[] getEffectivePolicies(String absPath)
focal_class.identifier: getEffectivePolicies
focal_class.modifiers: @Override public
focal_class.parameters: (String absPath)
focal_class.return: AccessControlPolicy[]
focal_class.signature: AccessControlPolicy[] getEffectivePolicies(String absPath)
focal_class.class_method_signature: CompositeAccessControlManager.getApplicablePolicies(String absPath)
focal_class.full_signature: @Override public AccessControlPolicyIterator getApplicablePolicies(String absPath)
focal_class.identifier: getApplicablePolicies
focal_class.modifiers: @Override public
focal_class.parameters: (String absPath)
focal_class.return: AccessControlPolicyIterator
focal_class.signature: AccessControlPolicyIterator getApplicablePolicies(String absPath)
focal_class.class_method_signature: CompositeAccessControlManager.setPolicy(String absPath, AccessControlPolicy policy)
focal_class.full_signature: @Override public void setPolicy(String absPath, AccessControlPolicy policy)
focal_class.identifier: setPolicy
focal_class.modifiers: @Override public
focal_class.parameters: (String absPath, AccessControlPolicy policy)
focal_class.return: void
focal_class.signature: void setPolicy(String absPath, AccessControlPolicy policy)
focal_class.class_method_signature: CompositeAccessControlManager.removePolicy(String absPath, AccessControlPolicy policy)
focal_class.full_signature: @Override public void removePolicy(String absPath, AccessControlPolicy policy)
focal_class.identifier: removePolicy
focal_class.modifiers: @Override public
focal_class.parameters: (String absPath, AccessControlPolicy policy)
focal_class.return: void
focal_class.signature: void removePolicy(String absPath, AccessControlPolicy policy)
focal_class.class_method_signature: CompositeAccessControlManager.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: CompositeAccessControlManager.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: CompositeAccessControlManager.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.superclass: extends AbstractAccessControlManager
focal_method.body: @Override
      public AccessControlPolicy[] getEffectivePolicies(String absPath) throws RepositoryException {
          ImmutableList.Builder<AccessControlPolicy> policies = ImmutableList.builder();
          for (AccessControlManager acMgr : acMgrs) {
              policies.add(acMgr.getEffectivePolicies(absPath));
              if (aggregationFilter.stop(acMgr, absPath)) {
                  break;
              }
          }
          List<AccessControlPolicy> l = policies.build();
          return l.toArray(new AccessControlPolicy[0]);
      }
focal_method.class_method_signature: CompositeAccessControlManager.getEffectivePolicies(String absPath)
focal_method.full_signature: @Override public AccessControlPolicy[] getEffectivePolicies(String absPath)
focal_method.identifier: getEffectivePolicies
focal_method.invocations: builder add getEffectivePolicies stop build toArray
focal_method.modifiers: @Override public
focal_method.parameters: (String absPath)
focal_method.return: AccessControlPolicy[]
focal_method.signature: AccessControlPolicy[] getEffectivePolicies(String absPath)