test_class.declarator: testPath = "/testPath"
test_class.modifier: protected
test_class.original_string: protected String testPath = "/testPath";
test_class.type: String
test_class.var_name: testPath
test_class.declarator: childPath = "/testPath/childNode"
test_class.modifier: protected
test_class.original_string: protected String childPath = "/testPath/childNode";
test_class.type: String
test_class.var_name: childPath
test_class.declarator: testPrincipal
test_class.modifier: protected
test_class.original_string: protected Principal testPrincipal;
test_class.type: Principal
test_class.var_name: testPrincipal
test_class.declarator: principals = new ArrayList<>()
test_class.modifier: protected
test_class.original_string: protected List<Principal> principals = new ArrayList<>();
test_class.type: List<Principal>
test_class.var_name: principals
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/PermissionHookTest.java
test_class.identifier: PermissionHookTest
test_class.interfaces: implements AccessControlConstants, PermissionConstants, PrivilegeConstants
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void testHiddenChildNodeChanged() {
          PermissionHook ph = createPermissionHook(adminSession.getWorkspaceName());
  
          NodeState nodeState = getTreeProvider().asNodeState(root.getTree(PathUtils.ROOT_PATH));
  
          NodeState after = spy(nodeState);
          NodeState before = spy(nodeState);
  
          NodeState child = mock(NodeState.class);
          Iterable hidden = Collections.singleton(new MemoryChildNodeEntry(":hidden", child));
          Iterable cnes = Iterables.concat(hidden, nodeState.getChildNodeEntries());
          when(before.getChildNodeEntries()).thenReturn(cnes);
          when(before.getChildNode(":hidden")).thenReturn(child);
  
          NodeState child2 = when(mock(NodeState.class).exists()).thenReturn(true).getMock();
          hidden = Collections.singleton(new MemoryChildNodeEntry(":hidden", child2));
          cnes = Iterables.concat(hidden, nodeState.getChildNodeEntries());
          when(after.getChildNodeEntries()).thenReturn(cnes);
          when(after.getChildNode(":hidden")).thenReturn(child2);
  
          ph.processCommit(before, after, new CommitInfo("sid", null));
  
          verify(child, never()).getProperty(anyString());
          verify(child2, never()).getProperty(anyString());
      }
test_case.class_method_signature: PermissionHookTest.testHiddenChildNodeChanged()
test_case.full_signature: @Test public void testHiddenChildNodeChanged()
test_case.identifier: testHiddenChildNodeChanged
test_case.invocations: createPermissionHook getWorkspaceName asNodeState getTreeProvider getTree spy spy mock singleton concat getChildNodeEntries thenReturn when getChildNodeEntries thenReturn when getChildNode getMock thenReturn when exists mock singleton concat getChildNodeEntries thenReturn when getChildNodeEntries thenReturn when getChildNode processCommit getProperty verify never anyString getProperty verify never anyString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHiddenChildNodeChanged()
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: workspaceName
focal_class.modifier: private final
focal_class.original_string: private final String workspaceName;
focal_class.type: String
focal_class.var_name: workspaceName
focal_class.declarator: mountInfoProvider
focal_class.modifier: private final
focal_class.original_string: private final MountInfoProvider mountInfoProvider;
focal_class.type: MountInfoProvider
focal_class.var_name: mountInfoProvider
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.declarator: treeProvider
focal_class.modifier: private final
focal_class.original_string: private final TreeProvider treeProvider;
focal_class.type: TreeProvider
focal_class.var_name: treeProvider
focal_class.declarator: permissionStore
focal_class.modifier: private
focal_class.original_string: private NodeBuilder permissionStore;
focal_class.type: NodeBuilder
focal_class.var_name: permissionStore
focal_class.declarator: bitsProvider
focal_class.modifier: private
focal_class.original_string: private PrivilegeBitsProvider bitsProvider;
focal_class.type: PrivilegeBitsProvider
focal_class.var_name: bitsProvider
focal_class.declarator: isACL
focal_class.modifier: private
focal_class.original_string: private TypePredicate isACL;
focal_class.type: TypePredicate
focal_class.var_name: isACL
focal_class.declarator: isACE
focal_class.modifier: private
focal_class.original_string: private TypePredicate isACE;
focal_class.type: TypePredicate
focal_class.var_name: isACE
focal_class.declarator: isGrantACE
focal_class.modifier: private
focal_class.original_string: private TypePredicate isGrantACE;
focal_class.type: TypePredicate
focal_class.var_name: isGrantACE
focal_class.declarator: modified = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<String, PermissionStoreEditor> modified = new HashMap<>();
focal_class.type: Map<String, PermissionStoreEditor>
focal_class.var_name: modified
focal_class.declarator: deleted = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<String, PermissionStoreEditor> deleted = new HashMap<>();
focal_class.type: Map<String, PermissionStoreEditor>
focal_class.var_name: deleted
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/PermissionHook.java
focal_class.identifier: PermissionHook
focal_class.interfaces: implements PostValidationHook, AccessControlConstants, PermissionConstants
focal_class.class_method_signature: PermissionHook.PermissionHook(@NotNull String workspaceName, @NotNull RestrictionProvider restrictionProvider,
                            @NotNull MountInfoProvider mountInfoProvider, @NotNull RootProvider rootProvider,
                            @NotNull TreeProvider treeProvider)
focal_class.full_signature: public  PermissionHook(@NotNull String workspaceName, @NotNull RestrictionProvider restrictionProvider,
                            @NotNull MountInfoProvider mountInfoProvider, @NotNull RootProvider rootProvider,
                            @NotNull TreeProvider treeProvider)
focal_class.identifier: PermissionHook
focal_class.modifiers: public
focal_class.parameters: (@NotNull String workspaceName, @NotNull RestrictionProvider restrictionProvider,
                            @NotNull MountInfoProvider mountInfoProvider, @NotNull RootProvider rootProvider,
                            @NotNull TreeProvider treeProvider)
focal_class.signature:  PermissionHook(@NotNull String workspaceName, @NotNull RestrictionProvider restrictionProvider,
                            @NotNull MountInfoProvider mountInfoProvider, @NotNull RootProvider rootProvider,
                            @NotNull TreeProvider treeProvider)
focal_class.class_method_signature: PermissionHook.processCommit(NodeState before, NodeState after, CommitInfo info)
focal_class.full_signature: @NotNull @Override public NodeState processCommit(NodeState before, NodeState after, CommitInfo info)
focal_class.identifier: processCommit
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (NodeState before, NodeState after, CommitInfo info)
focal_class.return: NodeState
focal_class.signature: NodeState processCommit(NodeState before, NodeState after, CommitInfo info)
focal_class.class_method_signature: PermissionHook.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: PermissionHook.apply()
focal_class.full_signature: private void apply()
focal_class.identifier: apply
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void apply()
focal_class.class_method_signature: PermissionHook.getPermissionStore(@NotNull NodeBuilder rootBuilder)
focal_class.full_signature: @NotNull private static NodeBuilder getPermissionStore(@NotNull NodeBuilder rootBuilder)
focal_class.identifier: getPermissionStore
focal_class.modifiers: @NotNull private static
focal_class.parameters: (@NotNull NodeBuilder rootBuilder)
focal_class.return: NodeBuilder
focal_class.signature: NodeBuilder getPermissionStore(@NotNull NodeBuilder rootBuilder)
focal_class.class_method_signature: PermissionHook.getPermissionRoot(@NotNull String path)
focal_class.full_signature: @NotNull private NodeBuilder getPermissionRoot(@NotNull String path)
focal_class.identifier: getPermissionRoot
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NotNull String path)
focal_class.return: NodeBuilder
focal_class.signature: NodeBuilder getPermissionRoot(@NotNull String path)
focal_method.body: @NotNull
      @Override
      public NodeState processCommit(NodeState before, NodeState after, CommitInfo info) {
          NodeBuilder rootAfter = after.builder();
  
          permissionStore = getPermissionStore(rootAfter);
          bitsProvider = new PrivilegeBitsProvider(rootProvider.createReadOnlyRoot(after));
  
          isACL = new TypePredicate(after, NT_REP_ACL);
          isACE = new TypePredicate(after, NT_REP_ACE);
          isGrantACE = new TypePredicate(after, NT_REP_GRANT_ACE);
  
          Diff diff = new Diff("");
          after.compareAgainstBaseState(before, diff);
          apply();
          return rootAfter.getNodeState();
      }
focal_method.class_method_signature: PermissionHook.processCommit(NodeState before, NodeState after, CommitInfo info)
focal_method.full_signature: @NotNull @Override public NodeState processCommit(NodeState before, NodeState after, CommitInfo info)
focal_method.identifier: processCommit
focal_method.invocations: builder getPermissionStore createReadOnlyRoot compareAgainstBaseState apply getNodeState
focal_method.modifiers: @NotNull @Override public
focal_method.parameters: (NodeState before, NodeState after, CommitInfo info)
focal_method.return: NodeState
focal_method.signature: NodeState processCommit(NodeState before, NodeState after, CommitInfo info)