test_class.declarator: rootTree
test_class.modifier: private
test_class.original_string: private Tree rootTree;
test_class.type: Tree
test_class.var_name: rootTree
test_class.declarator: fullScopeProvider
test_class.modifier: private
test_class.original_string: private AggregatedPermissionProvider fullScopeProvider;
test_class.type: AggregatedPermissionProvider
test_class.var_name: fullScopeProvider
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeTreePermissionTest.java
test_class.identifier: CompositeTreePermissionTest
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void testCanReadProperties() {
          PropertyState ps = PropertyStates.createProperty("propName", "value");
  
          TreePermission mockTp = when(mock(TreePermission.class).canReadProperties()).thenReturn(true).getMock();
          when(mockTp.canRead(ps)).thenReturn(false);
  
          AggregatedPermissionProvider mockPP = mock(AggregatedPermissionProvider.class);
          when(mockPP.getTreePermission(any(Tree.class), any(TreeType.class), any(TreePermission.class))).thenReturn(mockTp);
          when(mockPP.supportedPermissions(mockTp, null, Permissions.READ_PROPERTY)).thenReturn(Permissions.ALL);
  
          TreePermission rootTp = createRootTreePermission(mockPP, fullScopeProvider);
  
          rootTp.canReadProperties();
          rootTp.canReadProperties();
          rootTp.canRead(ps);
  
          verify(mockTp, never()).canRead();
          verify(mockTp, times(1)).canReadProperties();
          verify(mockTp, never()).canRead(ps);
          verify(mockTp, never()).canReadAll();
      }
test_case.class_method_signature: CompositeTreePermissionTest.testCanReadProperties()
test_case.full_signature: @Test public void testCanReadProperties()
test_case.identifier: testCanReadProperties
test_case.invocations: createProperty getMock thenReturn when canReadProperties mock thenReturn when canRead mock thenReturn when getTreePermission any any any thenReturn when supportedPermissions createRootTreePermission canReadProperties canReadProperties canRead canRead verify never canReadProperties verify times canRead verify never canReadAll verify never
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCanReadProperties()
focal_class.declarator: tree
focal_class.modifier: private final
focal_class.original_string: private final Tree tree;
focal_class.type: Tree
focal_class.var_name: tree
focal_class.declarator: type
focal_class.modifier: private final
focal_class.original_string: private final TreeType type;
focal_class.type: TreeType
focal_class.var_name: type
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: typeProvider
focal_class.modifier: private final
focal_class.original_string: private final TreeTypeProvider typeProvider;
focal_class.type: TreeTypeProvider
focal_class.var_name: typeProvider
focal_class.declarator: providers
focal_class.modifier: private final
focal_class.original_string: private final AggregatedPermissionProvider[] providers;
focal_class.type: AggregatedPermissionProvider[]
focal_class.var_name: providers
focal_class.declarator: treePermissions
focal_class.modifier: private final
focal_class.original_string: private final TreePermission[] treePermissions;
focal_class.type: TreePermission[]
focal_class.var_name: treePermissions
focal_class.declarator: childSize
focal_class.modifier: private final
focal_class.original_string: private final int childSize;
focal_class.type: int
focal_class.var_name: childSize
focal_class.declarator: canRead
focal_class.modifier: private
focal_class.original_string: private Boolean canRead;
focal_class.type: Boolean
focal_class.var_name: canRead
focal_class.declarator: canReadProperties
focal_class.modifier: private
focal_class.original_string: private Boolean canReadProperties;
focal_class.type: Boolean
focal_class.var_name: canReadProperties
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeTreePermission.java
focal_class.identifier: CompositeTreePermission
focal_class.interfaces: implements TreePermission
focal_class.class_method_signature: CompositeTreePermission.CompositeTreePermission(@NotNull Tree tree, @NotNull TreeType type,
                                      @NotNull TreeProvider treeProvider,
                                      @NotNull TreeTypeProvider typeProvider,
                                      @NotNull AggregatedPermissionProvider[] providers,
                                      @NotNull TreePermission[] treePermissions, int cnt)
focal_class.full_signature: private  CompositeTreePermission(@NotNull Tree tree, @NotNull TreeType type,
                                      @NotNull TreeProvider treeProvider,
                                      @NotNull TreeTypeProvider typeProvider,
                                      @NotNull AggregatedPermissionProvider[] providers,
                                      @NotNull TreePermission[] treePermissions, int cnt)
focal_class.identifier: CompositeTreePermission
focal_class.modifiers: private
focal_class.parameters: (@NotNull Tree tree, @NotNull TreeType type,
                                      @NotNull TreeProvider treeProvider,
                                      @NotNull TreeTypeProvider typeProvider,
                                      @NotNull AggregatedPermissionProvider[] providers,
                                      @NotNull TreePermission[] treePermissions, int cnt)
focal_class.signature:  CompositeTreePermission(@NotNull Tree tree, @NotNull TreeType type,
                                      @NotNull TreeProvider treeProvider,
                                      @NotNull TreeTypeProvider typeProvider,
                                      @NotNull AggregatedPermissionProvider[] providers,
                                      @NotNull TreePermission[] treePermissions, int cnt)
focal_class.class_method_signature: CompositeTreePermission.create(@NotNull Tree rootTree,
                                   @NotNull TreeProvider treeProvider,
                                   @NotNull TreeTypeProvider typeProvider,
                                   @NotNull AggregatedPermissionProvider[] providers,
                                   @NotNull CompositionType compositionType)
focal_class.full_signature: static TreePermission create(@NotNull Tree rootTree,
                                   @NotNull TreeProvider treeProvider,
                                   @NotNull TreeTypeProvider typeProvider,
                                   @NotNull AggregatedPermissionProvider[] providers,
                                   @NotNull CompositionType compositionType)
focal_class.identifier: create
focal_class.modifiers: static
focal_class.parameters: (@NotNull Tree rootTree,
                                   @NotNull TreeProvider treeProvider,
                                   @NotNull TreeTypeProvider typeProvider,
                                   @NotNull AggregatedPermissionProvider[] providers,
                                   @NotNull CompositionType compositionType)
focal_class.return: TreePermission
focal_class.signature: TreePermission create(@NotNull Tree rootTree,
                                   @NotNull TreeProvider treeProvider,
                                   @NotNull TreeTypeProvider typeProvider,
                                   @NotNull AggregatedPermissionProvider[] providers,
                                   @NotNull CompositionType compositionType)
focal_class.class_method_signature: CompositeTreePermission.create(@NotNull final Tree tree, @NotNull TreeProvider treeProvider, @NotNull CompositeTreePermission parentPermission)
focal_class.full_signature: static TreePermission create(@NotNull final Tree tree, @NotNull TreeProvider treeProvider, @NotNull CompositeTreePermission parentPermission)
focal_class.identifier: create
focal_class.modifiers: static
focal_class.parameters: (@NotNull final Tree tree, @NotNull TreeProvider treeProvider, @NotNull CompositeTreePermission parentPermission)
focal_class.return: TreePermission
focal_class.signature: TreePermission create(@NotNull final Tree tree, @NotNull TreeProvider treeProvider, @NotNull CompositeTreePermission parentPermission)
focal_class.class_method_signature: CompositeTreePermission.create(@NotNull final Tree tree, @NotNull TreeProvider treeProvider, @NotNull CompositeTreePermission parentPermission,
                                   @Nullable TreeType treeType)
focal_class.full_signature: static TreePermission create(@NotNull final Tree tree, @NotNull TreeProvider treeProvider, @NotNull CompositeTreePermission parentPermission,
                                   @Nullable TreeType treeType)
focal_class.identifier: create
focal_class.modifiers: static
focal_class.parameters: (@NotNull final Tree tree, @NotNull TreeProvider treeProvider, @NotNull CompositeTreePermission parentPermission,
                                   @Nullable TreeType treeType)
focal_class.return: TreePermission
focal_class.signature: TreePermission create(@NotNull final Tree tree, @NotNull TreeProvider treeProvider, @NotNull CompositeTreePermission parentPermission,
                                   @Nullable TreeType treeType)
focal_class.class_method_signature: CompositeTreePermission.create(@NotNull Supplier<Tree> lazyTree,
                                           @NotNull String childName, @NotNull NodeState childState,
                                           @NotNull CompositeTreePermission parentPermission,
                                           @Nullable TreeType treeType)
focal_class.full_signature: private static TreePermission create(@NotNull Supplier<Tree> lazyTree,
                                           @NotNull String childName, @NotNull NodeState childState,
                                           @NotNull CompositeTreePermission parentPermission,
                                           @Nullable TreeType treeType)
focal_class.identifier: create
focal_class.modifiers: private static
focal_class.parameters: (@NotNull Supplier<Tree> lazyTree,
                                           @NotNull String childName, @NotNull NodeState childState,
                                           @NotNull CompositeTreePermission parentPermission,
                                           @Nullable TreeType treeType)
focal_class.return: TreePermission
focal_class.signature: TreePermission create(@NotNull Supplier<Tree> lazyTree,
                                           @NotNull String childName, @NotNull NodeState childState,
                                           @NotNull CompositeTreePermission parentPermission,
                                           @Nullable TreeType treeType)
focal_class.class_method_signature: CompositeTreePermission.getChildPermission(@NotNull final String childName, @NotNull final NodeState childState)
focal_class.full_signature: @NotNull @Override public TreePermission getChildPermission(@NotNull final String childName, @NotNull final NodeState childState)
focal_class.identifier: getChildPermission
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull final String childName, @NotNull final NodeState childState)
focal_class.return: TreePermission
focal_class.signature: TreePermission getChildPermission(@NotNull final String childName, @NotNull final NodeState childState)
focal_class.class_method_signature: CompositeTreePermission.canRead()
focal_class.full_signature: @Override public boolean canRead()
focal_class.identifier: canRead
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean canRead()
focal_class.class_method_signature: CompositeTreePermission.canRead(@NotNull PropertyState property)
focal_class.full_signature: @Override public boolean canRead(@NotNull PropertyState property)
focal_class.identifier: canRead
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull PropertyState property)
focal_class.return: boolean
focal_class.signature: boolean canRead(@NotNull PropertyState property)
focal_class.class_method_signature: CompositeTreePermission.canReadAll()
focal_class.full_signature: @Override public boolean canReadAll()
focal_class.identifier: canReadAll
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean canReadAll()
focal_class.class_method_signature: CompositeTreePermission.canReadProperties()
focal_class.full_signature: @Override public boolean canReadProperties()
focal_class.identifier: canReadProperties
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean canReadProperties()
focal_class.class_method_signature: CompositeTreePermission.isGranted(long permissions)
focal_class.full_signature: @Override public boolean isGranted(long permissions)
focal_class.identifier: isGranted
focal_class.modifiers: @Override public
focal_class.parameters: (long permissions)
focal_class.return: boolean
focal_class.signature: boolean isGranted(long permissions)
focal_class.class_method_signature: CompositeTreePermission.isGranted(long permissions, @NotNull PropertyState property)
focal_class.full_signature: @Override public boolean isGranted(long permissions, @NotNull PropertyState property)
focal_class.identifier: isGranted
focal_class.modifiers: @Override public
focal_class.parameters: (long permissions, @NotNull PropertyState property)
focal_class.return: boolean
focal_class.signature: boolean isGranted(long permissions, @NotNull PropertyState property)
focal_class.class_method_signature: CompositeTreePermission.getCompositionType()
focal_class.full_signature: @NotNull abstract CompositionType getCompositionType()
focal_class.identifier: getCompositionType
focal_class.modifiers: @NotNull abstract
focal_class.parameters: ()
focal_class.return: CompositionType
focal_class.signature: CompositionType getCompositionType()
focal_class.class_method_signature: CompositeTreePermission.grantsPermission(long permissions, @Nullable PropertyState property)
focal_class.full_signature: abstract boolean grantsPermission(long permissions, @Nullable PropertyState property)
focal_class.identifier: grantsPermission
focal_class.modifiers: abstract
focal_class.parameters: (long permissions, @Nullable PropertyState property)
focal_class.return: boolean
focal_class.signature: boolean grantsPermission(long permissions, @Nullable PropertyState property)
focal_class.class_method_signature: CompositeTreePermission.grantsRead(@Nullable PropertyState property)
focal_class.full_signature: abstract boolean grantsRead(@Nullable PropertyState property)
focal_class.identifier: grantsRead
focal_class.modifiers: abstract
focal_class.parameters: (@Nullable PropertyState property)
focal_class.return: boolean
focal_class.signature: boolean grantsRead(@Nullable PropertyState property)
focal_class.class_method_signature: CompositeTreePermission.grantsReadProperties()
focal_class.full_signature: abstract boolean grantsReadProperties()
focal_class.identifier: grantsReadProperties
focal_class.modifiers: abstract
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean grantsReadProperties()
focal_class.class_method_signature: CompositeTreePermission.length()
focal_class.full_signature:  int length()
focal_class.identifier: length
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int length()
focal_class.class_method_signature: CompositeTreePermission.provider(int index)
focal_class.full_signature: @NotNull AggregatedPermissionProvider provider(int index)
focal_class.identifier: provider
focal_class.modifiers: @NotNull
focal_class.parameters: (int index)
focal_class.return: AggregatedPermissionProvider
focal_class.signature: AggregatedPermissionProvider provider(int index)
focal_class.class_method_signature: CompositeTreePermission.treePermission(int index)
focal_class.full_signature: @NotNull TreePermission treePermission(int index)
focal_class.identifier: treePermission
focal_class.modifiers: @NotNull
focal_class.parameters: (int index)
focal_class.return: TreePermission
focal_class.signature: TreePermission treePermission(int index)
focal_class.class_method_signature: CompositeTreePermission.isValid(@NotNull TreePermission tp)
focal_class.full_signature: private static boolean isValid(@NotNull TreePermission tp)
focal_class.identifier: isValid
focal_class.modifiers: private static
focal_class.parameters: (@NotNull TreePermission tp)
focal_class.return: boolean
focal_class.signature: boolean isValid(@NotNull TreePermission tp)
focal_class.class_method_signature: CompositeTreePermission.getType(@NotNull Tree tree, @NotNull CompositeTreePermission parent)
focal_class.full_signature: private static TreeType getType(@NotNull Tree tree, @NotNull CompositeTreePermission parent)
focal_class.identifier: getType
focal_class.modifiers: private static
focal_class.parameters: (@NotNull Tree tree, @NotNull CompositeTreePermission parent)
focal_class.return: TreeType
focal_class.signature: TreeType getType(@NotNull Tree tree, @NotNull CompositeTreePermission parent)
focal_method.body: @Override
      public boolean canReadProperties() {
          if (canReadProperties == null) {
              canReadProperties = grantsReadProperties();
          }
          return canReadProperties;
      }
focal_method.class_method_signature: CompositeTreePermission.canReadProperties()
focal_method.full_signature: @Override public boolean canReadProperties()
focal_method.identifier: canReadProperties
focal_method.invocations: grantsReadProperties
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: boolean
focal_method.signature: boolean canReadProperties()