test_class.declarator: cugAccessControlManager
test_class.modifier: private
test_class.original_string: private CugAccessControlManager cugAccessControlManager;
test_class.type: CugAccessControlManager
test_class.var_name: cugAccessControlManager
test_class.file: oak-authorization-cug/src/test/java/org/apache/jackrabbit/oak/spi/security/authorization/cug/impl/CugAccessControlManagerTest.java
test_class.identifier: CugAccessControlManagerTest
test_class.superclass: extends AbstractCugTest
test_case.body: @Test(expected = PathNotFoundException.class)
      public void testRemovePolicyInvalidPath() throws Exception {
          cugAccessControlManager.removePolicy(INVALID_PATH, createCug(INVALID_PATH));
      }
test_case.class_method_signature: CugAccessControlManagerTest.testRemovePolicyInvalidPath()
test_case.full_signature: @Test(expected = PathNotFoundException.class) public void testRemovePolicyInvalidPath()
test_case.identifier: testRemovePolicyInvalidPath
test_case.invocations: removePolicy createCug
test_case.modifiers: @Test(expected = PathNotFoundException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRemovePolicyInvalidPath()
focal_class.declarator: log = LoggerFactory.getLogger(CugAccessControlManager.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(CugAccessControlManager.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: supportedPaths
focal_class.modifier: private final
focal_class.original_string: private final Set<String> supportedPaths;
focal_class.type: Set<String>
focal_class.var_name: supportedPaths
focal_class.declarator: cugExclude
focal_class.modifier: private final
focal_class.original_string: private final CugExclude cugExclude;
focal_class.type: CugExclude
focal_class.var_name: cugExclude
focal_class.declarator: config
focal_class.modifier: private final
focal_class.original_string: private final ConfigurationParameters config;
focal_class.type: ConfigurationParameters
focal_class.var_name: config
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: rootProvider
focal_class.modifier: private final
focal_class.original_string: private final RootProvider rootProvider;
focal_class.type: RootProvider
focal_class.var_name: rootProvider
focal_class.file: oak-authorization-cug/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/cug/impl/CugAccessControlManager.java
focal_class.identifier: CugAccessControlManager
focal_class.interfaces: implements CugConstants, PolicyOwner
focal_class.class_method_signature: CugAccessControlManager.CugAccessControlManager(@NotNull Root root,
                              @NotNull NamePathMapper namePathMapper,
                              @NotNull SecurityProvider securityProvider,
                              @NotNull Set<String> supportedPaths,
                              @NotNull CugExclude cugExclude, RootProvider rootProvider)
focal_class.full_signature:   CugAccessControlManager(@NotNull Root root,
                              @NotNull NamePathMapper namePathMapper,
                              @NotNull SecurityProvider securityProvider,
                              @NotNull Set<String> supportedPaths,
                              @NotNull CugExclude cugExclude, RootProvider rootProvider)
focal_class.identifier: CugAccessControlManager
focal_class.parameters: (@NotNull Root root,
                              @NotNull NamePathMapper namePathMapper,
                              @NotNull SecurityProvider securityProvider,
                              @NotNull Set<String> supportedPaths,
                              @NotNull CugExclude cugExclude, RootProvider rootProvider)
focal_class.signature:  CugAccessControlManager(@NotNull Root root,
                              @NotNull NamePathMapper namePathMapper,
                              @NotNull SecurityProvider securityProvider,
                              @NotNull Set<String> supportedPaths,
                              @NotNull CugExclude cugExclude, RootProvider rootProvider)
focal_class.class_method_signature: CugAccessControlManager.getSupportedPrivileges(@Nullable String absPath)
focal_class.full_signature: @NotNull @Override public Privilege[] getSupportedPrivileges(@Nullable String absPath)
focal_class.identifier: getSupportedPrivileges
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@Nullable String absPath)
focal_class.return: Privilege[]
focal_class.signature: Privilege[] getSupportedPrivileges(@Nullable String absPath)
focal_class.class_method_signature: CugAccessControlManager.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: CugAccessControlManager.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: CugAccessControlManager.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: CugAccessControlManager.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: CugAccessControlManager.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: CugAccessControlManager.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: CugAccessControlManager.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: CugAccessControlManager.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: CugAccessControlManager.defines(@Nullable String absPath, @NotNull AccessControlPolicy accessControlPolicy)
focal_class.full_signature: @Override public boolean defines(@Nullable String absPath, @NotNull AccessControlPolicy accessControlPolicy)
focal_class.identifier: defines
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable String absPath, @NotNull AccessControlPolicy accessControlPolicy)
focal_class.return: boolean
focal_class.signature: boolean defines(@Nullable String absPath, @NotNull AccessControlPolicy accessControlPolicy)
focal_class.class_method_signature: CugAccessControlManager.isSupportedPath(@Nullable String oakPath)
focal_class.full_signature: private boolean isSupportedPath(@Nullable String oakPath)
focal_class.identifier: isSupportedPath
focal_class.modifiers: private
focal_class.parameters: (@Nullable String oakPath)
focal_class.return: boolean
focal_class.signature: boolean isSupportedPath(@Nullable String oakPath)
focal_class.class_method_signature: CugAccessControlManager.checkValidPath(@Nullable String oakPath)
focal_class.full_signature: private void checkValidPath(@Nullable String oakPath)
focal_class.identifier: checkValidPath
focal_class.modifiers: private
focal_class.parameters: (@Nullable String oakPath)
focal_class.return: void
focal_class.signature: void checkValidPath(@Nullable String oakPath)
focal_class.class_method_signature: CugAccessControlManager.getCugPolicy(@NotNull String oakPath)
focal_class.full_signature: @Nullable private CugPolicy getCugPolicy(@NotNull String oakPath)
focal_class.identifier: getCugPolicy
focal_class.modifiers: @Nullable private
focal_class.parameters: (@NotNull String oakPath)
focal_class.return: CugPolicy
focal_class.signature: CugPolicy getCugPolicy(@NotNull String oakPath)
focal_class.class_method_signature: CugAccessControlManager.getCugPolicy(@NotNull String oakPath, @NotNull Tree tree, boolean isEffective)
focal_class.full_signature: @Nullable private CugPolicy getCugPolicy(@NotNull String oakPath, @NotNull Tree tree, boolean isEffective)
focal_class.identifier: getCugPolicy
focal_class.modifiers: @Nullable private
focal_class.parameters: (@NotNull String oakPath, @NotNull Tree tree, boolean isEffective)
focal_class.return: CugPolicy
focal_class.signature: CugPolicy getCugPolicy(@NotNull String oakPath, @NotNull Tree tree, boolean isEffective)
focal_class.class_method_signature: CugAccessControlManager.getPrincipals(@NotNull Tree cugTree)
focal_class.full_signature: private Iterable<Principal> getPrincipals(@NotNull Tree cugTree)
focal_class.identifier: getPrincipals
focal_class.modifiers: private
focal_class.parameters: (@NotNull Tree cugTree)
focal_class.return: Iterable<Principal>
focal_class.signature: Iterable<Principal> getPrincipals(@NotNull Tree cugTree)
focal_class.class_method_signature: CugAccessControlManager.isValidPolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.full_signature: private static boolean isValidPolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.identifier: isValidPolicy
focal_class.modifiers: private static
focal_class.parameters: (@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.return: boolean
focal_class.signature: boolean isValidPolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.class_method_signature: CugAccessControlManager.checkValidPolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.full_signature: private static void checkValidPolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.identifier: checkValidPolicy
focal_class.modifiers: private static
focal_class.parameters: (@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.return: void
focal_class.signature: void checkValidPolicy(@Nullable String absPath, @NotNull AccessControlPolicy policy)
focal_class.class_method_signature: CugAccessControlManager.collectEffectiveCandidates(@NotNull Root r, @NotNull Iterable<String> principalNames)
focal_class.full_signature: private Set<String> collectEffectiveCandidates(@NotNull Root r, @NotNull Iterable<String> principalNames)
focal_class.identifier: collectEffectiveCandidates
focal_class.modifiers: private
focal_class.parameters: (@NotNull Root r, @NotNull Iterable<String> principalNames)
focal_class.return: Set<String>
focal_class.signature: Set<String> collectEffectiveCandidates(@NotNull Root r, @NotNull Iterable<String> principalNames)
focal_class.class_method_signature: CugAccessControlManager.nestedCugPaths(@NotNull Tree t)
focal_class.full_signature: private static Iterable<String> nestedCugPaths(@NotNull Tree t)
focal_class.identifier: nestedCugPaths
focal_class.modifiers: private static
focal_class.parameters: (@NotNull Tree t)
focal_class.return: Iterable<String>
focal_class.signature: Iterable<String> nestedCugPaths(@NotNull Tree t)
focal_class.superclass: extends AbstractAccessControlManager
focal_method.body: @Override
      public void removePolicy(String absPath, AccessControlPolicy policy) throws RepositoryException {
          String oakPath = getOakPath(absPath);
          if (isSupportedPath(oakPath)) {
              checkValidPolicy(absPath, policy);
  
              Tree tree = getTree(oakPath, Permissions.MODIFY_ACCESS_CONTROL, true);
              Tree cug = tree.getChild(REP_CUG_POLICY);
              if (!CugUtil.definesCug(cug)) {
                  throw new AccessControlException("Unexpected primary type of node rep:cugPolicy.");
              } else {
                  // remove the rep:CugMixin if it has been explicitly added upon setPolicy
                  Set<String> mixins = Sets.newHashSet(TreeUtil.getNames(tree, NodeTypeConstants.JCR_MIXINTYPES));
                  if (mixins.remove(MIX_REP_CUG_MIXIN)) {
                      tree.setProperty(JcrConstants.JCR_MIXINTYPES, mixins, NAMES);
                  } else {
                      log.debug("Cannot remove mixin type {}", MIX_REP_CUG_MIXIN);
                  }
                  cug.remove();
              }
          } else {
              throw new AccessControlException("Unsupported path: " + absPath);
          }
      }
focal_method.class_method_signature: CugAccessControlManager.removePolicy(String absPath, AccessControlPolicy policy)
focal_method.full_signature: @Override public void removePolicy(String absPath, AccessControlPolicy policy)
focal_method.identifier: removePolicy
focal_method.invocations: getOakPath isSupportedPath checkValidPolicy getTree getChild definesCug newHashSet getNames remove setProperty debug remove
focal_method.modifiers: @Override public
focal_method.parameters: (String absPath, AccessControlPolicy policy)
focal_method.return: void
focal_method.signature: void removePolicy(String absPath, AccessControlPolicy policy)