test_class.file: oak-authorization-principalbased/src/test/java/org/apache/jackrabbit/oak/spi/security/authorization/principalbased/impl/PrincipalBasedAuthorizationConfigurationTest.java
test_class.identifier: PrincipalBasedAuthorizationConfigurationTest
test_class.superclass: extends AbstractPrincipalBasedTest
test_case.body: @Test
      public void testGetPermissionProvider() throws Exception {
          Filter filter = mock(Filter.class);
          when(filter.canHandle(any(Set.class))).thenReturn(Boolean.TRUE);
          when(filter.getOakPath(any(Principal.class))).thenReturn("/some/path");
          FilterProvider fp = when(mock(FilterProvider.class).getFilter(any(SecurityProvider.class), any(Root.class), any(NamePathMapper.class))).thenReturn(filter).getMock();
  
          PrincipalBasedAuthorizationConfiguration pbac = new PrincipalBasedAuthorizationConfiguration();
          pbac.bindFilterProvider(fp);
          pbac.setSecurityProvider(getSecurityProvider());
          pbac.setRootProvider(getRootProvider());
  
          Set<Principal> principals = ImmutableSet.of(getTestUser().getPrincipal());
          PermissionProvider pp = pbac.getPermissionProvider(root, "wspName", principals);
          assertTrue(pp instanceof PrincipalBasedPermissionProvider);
      }
test_case.class_method_signature: PrincipalBasedAuthorizationConfigurationTest.testGetPermissionProvider()
test_case.full_signature: @Test public void testGetPermissionProvider()
test_case.identifier: testGetPermissionProvider
test_case.invocations: mock thenReturn when canHandle any thenReturn when getOakPath any getMock thenReturn when getFilter mock any any any bindFilterProvider setSecurityProvider getSecurityProvider setRootProvider getRootProvider of getPrincipal getTestUser getPermissionProvider assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetPermissionProvider()
focal_class.declarator: filterProvider
focal_class.modifier: private
focal_class.original_string: private FilterProvider filterProvider;
focal_class.type: FilterProvider
focal_class.var_name: filterProvider
focal_class.declarator: mountInfoProvider
focal_class.modifier: private
focal_class.original_string: private MountInfoProvider mountInfoProvider;
focal_class.type: MountInfoProvider
focal_class.var_name: mountInfoProvider
focal_class.declarator: aggregationFilterRegistration
focal_class.modifier: private
focal_class.original_string: private ServiceRegistration aggregationFilterRegistration;
focal_class.type: ServiceRegistration
focal_class.var_name: aggregationFilterRegistration
focal_class.file: oak-authorization-principalbased/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/principalbased/impl/PrincipalBasedAuthorizationConfiguration.java
focal_class.identifier: PrincipalBasedAuthorizationConfiguration
focal_class.interfaces: implements AuthorizationConfiguration
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.PrincipalBasedAuthorizationConfiguration()
focal_class.full_signature: @SuppressWarnings("UnusedDeclaration") public  PrincipalBasedAuthorizationConfiguration()
focal_class.identifier: PrincipalBasedAuthorizationConfiguration
focal_class.modifiers: @SuppressWarnings("UnusedDeclaration") public
focal_class.parameters: ()
focal_class.signature:  PrincipalBasedAuthorizationConfiguration()
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.getAccessControlManager(@NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.full_signature: @NotNull @Override public AccessControlManager getAccessControlManager(@NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.identifier: getAccessControlManager
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.return: AccessControlManager
focal_class.signature: AccessControlManager getAccessControlManager(@NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.getRestrictionProvider()
focal_class.full_signature: @NotNull @Override public RestrictionProvider getRestrictionProvider()
focal_class.identifier: getRestrictionProvider
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: RestrictionProvider
focal_class.signature: RestrictionProvider getRestrictionProvider()
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.getPermissionProvider(@NotNull Root root, @NotNull String workspaceName, @NotNull Set<Principal> principals)
focal_class.full_signature: @NotNull @Override public PermissionProvider getPermissionProvider(@NotNull Root root, @NotNull String workspaceName, @NotNull Set<Principal> principals)
focal_class.identifier: getPermissionProvider
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull Root root, @NotNull String workspaceName, @NotNull Set<Principal> principals)
focal_class.return: PermissionProvider
focal_class.signature: PermissionProvider getPermissionProvider(@NotNull Root root, @NotNull String workspaceName, @NotNull Set<Principal> principals)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.getName()
focal_class.full_signature: @NotNull @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.getRepositoryInitializer()
focal_class.full_signature: @NotNull @Override public RepositoryInitializer getRepositoryInitializer()
focal_class.identifier: getRepositoryInitializer
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: RepositoryInitializer
focal_class.signature: RepositoryInitializer getRepositoryInitializer()
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.getCommitHooks(@NotNull String workspaceName)
focal_class.full_signature: @NotNull @Override public List<? extends CommitHook> getCommitHooks(@NotNull String workspaceName)
focal_class.identifier: getCommitHooks
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull String workspaceName)
focal_class.return: List<? extends CommitHook>
focal_class.signature: List<? extends CommitHook> getCommitHooks(@NotNull String workspaceName)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.getValidators(@NotNull String workspaceName, @NotNull Set<Principal> principals, @NotNull MoveTracker moveTracker)
focal_class.full_signature: @NotNull @Override public List<? extends ValidatorProvider> getValidators(@NotNull String workspaceName, @NotNull Set<Principal> principals, @NotNull MoveTracker moveTracker)
focal_class.identifier: getValidators
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull String workspaceName, @NotNull Set<Principal> principals, @NotNull MoveTracker moveTracker)
focal_class.return: List<? extends ValidatorProvider>
focal_class.signature: List<? extends ValidatorProvider> getValidators(@NotNull String workspaceName, @NotNull Set<Principal> principals, @NotNull MoveTracker moveTracker)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.getProtectedItemImporters()
focal_class.full_signature: @NotNull @Override public List<ProtectedItemImporter> getProtectedItemImporters()
focal_class.identifier: getProtectedItemImporters
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: List<ProtectedItemImporter>
focal_class.signature: List<ProtectedItemImporter> getProtectedItemImporters()
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.getContext()
focal_class.full_signature: @NotNull @Override public Context getContext()
focal_class.identifier: getContext
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: Context
focal_class.signature: Context getContext()
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.activate(@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.full_signature: @Activate public void activate(@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.identifier: activate
focal_class.modifiers: @Activate public
focal_class.parameters: (@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.return: void
focal_class.signature: void activate(@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.modified(@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.full_signature: @Modified public void modified(@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.identifier: modified
focal_class.modifiers: @Modified public
focal_class.parameters: (@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.return: void
focal_class.signature: void modified(@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.deactivate(@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.full_signature: @Deactivate public void deactivate(@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.identifier: deactivate
focal_class.modifiers: @Deactivate public
focal_class.parameters: (@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.return: void
focal_class.signature: void deactivate(@NotNull BundleContext context, @NotNull Configuration configuration)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.bindFilterProvider(@NotNull FilterProvider filterProvider)
focal_class.full_signature: @Reference(name = "filterProvider", cardinality = ReferenceCardinality.MANDATORY) public void bindFilterProvider(@NotNull FilterProvider filterProvider)
focal_class.identifier: bindFilterProvider
focal_class.modifiers: @Reference(name = "filterProvider", cardinality = ReferenceCardinality.MANDATORY) public
focal_class.parameters: (@NotNull FilterProvider filterProvider)
focal_class.return: void
focal_class.signature: void bindFilterProvider(@NotNull FilterProvider filterProvider)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.unbindFilterProvider(@NotNull FilterProvider filterProvider)
focal_class.full_signature: public void unbindFilterProvider(@NotNull FilterProvider filterProvider)
focal_class.identifier: unbindFilterProvider
focal_class.modifiers: public
focal_class.parameters: (@NotNull FilterProvider filterProvider)
focal_class.return: void
focal_class.signature: void unbindFilterProvider(@NotNull FilterProvider filterProvider)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.bindMountInfoProvider(@NotNull MountInfoProvider mountInfoProvider)
focal_class.full_signature: @Reference(name = "mountInfoProvider", cardinality = ReferenceCardinality.MANDATORY) public void bindMountInfoProvider(@NotNull MountInfoProvider mountInfoProvider)
focal_class.identifier: bindMountInfoProvider
focal_class.modifiers: @Reference(name = "mountInfoProvider", cardinality = ReferenceCardinality.MANDATORY) public
focal_class.parameters: (@NotNull MountInfoProvider mountInfoProvider)
focal_class.return: void
focal_class.signature: void bindMountInfoProvider(@NotNull MountInfoProvider mountInfoProvider)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.unbindMountInfoProvider(@NotNull MountInfoProvider mountInfoProvider)
focal_class.full_signature: public void unbindMountInfoProvider(@NotNull MountInfoProvider mountInfoProvider)
focal_class.identifier: unbindMountInfoProvider
focal_class.modifiers: public
focal_class.parameters: (@NotNull MountInfoProvider mountInfoProvider)
focal_class.return: void
focal_class.signature: void unbindMountInfoProvider(@NotNull MountInfoProvider mountInfoProvider)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.checkConflictingMount()
focal_class.full_signature: private void checkConflictingMount()
focal_class.identifier: checkConflictingMount
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void checkConflictingMount()
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.registerNodeTypes(@NotNull final Root root)
focal_class.full_signature: private static boolean registerNodeTypes(@NotNull final Root root)
focal_class.identifier: registerNodeTypes
focal_class.modifiers: private static
focal_class.parameters: (@NotNull final Root root)
focal_class.return: boolean
focal_class.signature: boolean registerNodeTypes(@NotNull final Root root)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.registerAggregationFilter(@NotNull BundleContext context)
focal_class.full_signature: private void registerAggregationFilter(@NotNull BundleContext context)
focal_class.identifier: registerAggregationFilter
focal_class.modifiers: private
focal_class.parameters: (@NotNull BundleContext context)
focal_class.return: void
focal_class.signature: void registerAggregationFilter(@NotNull BundleContext context)
focal_class.class_method_signature: PrincipalBasedAuthorizationConfiguration.unregisterAggregationFilter()
focal_class.full_signature: private void unregisterAggregationFilter()
focal_class.identifier: unregisterAggregationFilter
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void unregisterAggregationFilter()
focal_class.superclass: extends ConfigurationBase
focal_method.body: @NotNull
      @Override
      public PermissionProvider getPermissionProvider(@NotNull Root root, @NotNull String workspaceName, @NotNull Set<Principal> principals) {
          Filter f = filterProvider.getFilter(getSecurityProvider(), getRootProvider().createReadOnlyRoot(root), NamePathMapper.DEFAULT);
          if (!f.canHandle(principals)) {
              return EmptyPermissionProvider.getInstance();
          } else {
              Iterable<String> principalPaths = Iterables.transform(principals, principal -> f.getOakPath(principal));
              return new PrincipalBasedPermissionProvider(root, workspaceName, principalPaths, this);
          }
      }
focal_method.class_method_signature: PrincipalBasedAuthorizationConfiguration.getPermissionProvider(@NotNull Root root, @NotNull String workspaceName, @NotNull Set<Principal> principals)
focal_method.full_signature: @NotNull @Override public PermissionProvider getPermissionProvider(@NotNull Root root, @NotNull String workspaceName, @NotNull Set<Principal> principals)
focal_method.identifier: getPermissionProvider
focal_method.invocations: getFilter getSecurityProvider createReadOnlyRoot getRootProvider canHandle getInstance transform getOakPath
focal_method.modifiers: @NotNull @Override public
focal_method.parameters: (@NotNull Root root, @NotNull String workspaceName, @NotNull Set<Principal> principals)
focal_method.return: PermissionProvider
focal_method.signature: PermissionProvider getPermissionProvider(@NotNull Root root, @NotNull String workspaceName, @NotNull Set<Principal> principals)