test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/PermissionCacheBuilderTest.java
test_class.identifier: PermissionCacheBuilderTest
test_class.superclass: extends AbstractCacheTest
test_case.body: @Test(expected = IllegalStateException.class)
      public void testBuildBeforeInitialized() {
          permissionCacheBuilder.build();
      }
test_case.class_method_signature: PermissionCacheBuilderTest.testBuildBeforeInitialized()
test_case.full_signature: @Test(expected = IllegalStateException.class) public void testBuildBeforeInitialized()
test_case.identifier: testBuildBeforeInitialized
test_case.invocations: build
test_case.modifiers: @Test(expected = IllegalStateException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBuildBeforeInitialized()
focal_class.declarator: store
focal_class.modifier: private final
focal_class.original_string: private final PermissionStore store;
focal_class.type: PermissionStore
focal_class.var_name: store
focal_class.declarator: peCache
focal_class.modifier: private final
focal_class.original_string: private final PermissionEntryCache peCache;
focal_class.type: PermissionEntryCache
focal_class.var_name: peCache
focal_class.declarator: existingNames
focal_class.modifier: private
focal_class.original_string: private Set<String> existingNames;
focal_class.type: Set<String>
focal_class.var_name: existingNames
focal_class.declarator: usePathEntryMap
focal_class.modifier: private
focal_class.original_string: private boolean usePathEntryMap;
focal_class.type: boolean
focal_class.var_name: usePathEntryMap
focal_class.declarator: initialized = false
focal_class.modifier: private
focal_class.original_string: private boolean initialized = false;
focal_class.type: boolean
focal_class.var_name: initialized
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/PermissionCacheBuilder.java
focal_class.identifier: PermissionCacheBuilder
focal_class.class_method_signature: PermissionCacheBuilder.PermissionCacheBuilder(@NotNull PermissionStore store)
focal_class.full_signature:   PermissionCacheBuilder(@NotNull PermissionStore store)
focal_class.identifier: PermissionCacheBuilder
focal_class.parameters: (@NotNull PermissionStore store)
focal_class.signature:  PermissionCacheBuilder(@NotNull PermissionStore store)
focal_class.class_method_signature: PermissionCacheBuilder.init(@NotNull Set<String> principalNames, @NotNull CacheStrategy cacheStrategy)
focal_class.full_signature:  boolean init(@NotNull Set<String> principalNames, @NotNull CacheStrategy cacheStrategy)
focal_class.identifier: init
focal_class.parameters: (@NotNull Set<String> principalNames, @NotNull CacheStrategy cacheStrategy)
focal_class.return: boolean
focal_class.signature: boolean init(@NotNull Set<String> principalNames, @NotNull CacheStrategy cacheStrategy)
focal_class.class_method_signature: PermissionCacheBuilder.build()
focal_class.full_signature: @NotNull PermissionCache build()
focal_class.identifier: build
focal_class.modifiers: @NotNull
focal_class.parameters: ()
focal_class.return: PermissionCache
focal_class.signature: PermissionCache build()
focal_method.body: @NotNull
      PermissionCache build() {
          checkState(initialized);
          if (existingNames.isEmpty()) {
              return EmptyCache.INSTANCE;
          }
          if (usePathEntryMap) {
              // the total number of access controlled paths is smaller that maxSize,
              // so we can load all permission entries for all principals having
              // any entries right away into the pathEntryMap
              Map<String, Collection<PermissionEntry>> pathEntryMap = new HashMap<>();
              for (String name : existingNames) {
                  PrincipalPermissionEntries ppe = peCache.getFullyLoadedEntries(store, name);
                  for (Map.Entry<String, Collection<PermissionEntry>> e : ppe.getEntries().entrySet()) {
                      String path = e.getKey();
                      Collection<PermissionEntry> pathEntries = pathEntryMap.get(path);
                      if (pathEntries == null) {
                          pathEntries = new TreeSet<>(e.getValue());
                          pathEntryMap.put(path, pathEntries);
                      } else {
                          pathEntries.addAll(e.getValue());
                      }
                  }
              }
              if (pathEntryMap.isEmpty()) {
                  return EmptyCache.INSTANCE;
              } else {
                  return new PathEntryMapCache(pathEntryMap);
              }
          } else {
              return new DefaultPermissionCache(store, peCache, existingNames);
          }
      }
focal_method.class_method_signature: PermissionCacheBuilder.build()
focal_method.full_signature: @NotNull PermissionCache build()
focal_method.identifier: build
focal_method.invocations: checkState isEmpty getFullyLoadedEntries entrySet getEntries getKey get getValue put addAll getValue isEmpty
focal_method.modifiers: @NotNull
focal_method.parameters: ()
focal_method.return: PermissionCache
focal_method.signature: PermissionCache build()