test_class.file: model/enforcers/src/test/java/org/eclipse/ditto/model/enforcers/trie/TrieBasedPolicyEnforcerTest.java
test_class.identifier: TrieBasedPolicyEnforcerTest
test_case.body: @Test
      public void buildJsonView() {
          final TrieBasedPolicyEnforcer underTest =
                  TrieBasedPolicyEnforcer.newInstance(defaultPolicy(PolicyId.of("namespace", "id")));
  
          final JsonObject createdJsonView = underTest.buildJsonView(
                  ResourceKey.newInstance("foo", "bar"),
                  JsonFactory.nullObject(),
                  AuthorizationContext.newInstance(DittoAuthorizationContextType.UNSPECIFIED,
                          AuthorizationSubject.newInstance("itsMe")),
                  Permissions.none());
  
          final JsonObject expectedJsonView = JsonFactory.nullObject();
  
          assertThat(createdJsonView).isEqualTo(expectedJsonView);
      }
test_case.class_method_signature: TrieBasedPolicyEnforcerTest.buildJsonView()
test_case.full_signature: @Test public void buildJsonView()
test_case.identifier: buildJsonView
test_case.invocations: newInstance defaultPolicy of buildJsonView newInstance nullObject newInstance newInstance none nullObject isEqualTo assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void buildJsonView()
focal_class.declarator: inheritedTrie
focal_class.modifier: private final
focal_class.original_string: private final PolicyTrie inheritedTrie;
focal_class.type: PolicyTrie
focal_class.var_name: inheritedTrie
focal_class.declarator: bottomUpGrantTrie
focal_class.modifier: private final
focal_class.original_string: private final PolicyTrie bottomUpGrantTrie;
focal_class.type: PolicyTrie
focal_class.var_name: bottomUpGrantTrie
focal_class.declarator: bottomUpRevokeTrie
focal_class.modifier: private final
focal_class.original_string: private final PolicyTrie bottomUpRevokeTrie;
focal_class.type: PolicyTrie
focal_class.var_name: bottomUpRevokeTrie
focal_class.file: model/enforcers/src/main/java/org/eclipse/ditto/model/enforcers/trie/TrieBasedPolicyEnforcer.java
focal_class.identifier: TrieBasedPolicyEnforcer
focal_class.interfaces: implements Enforcer
focal_class.class_method_signature: TrieBasedPolicyEnforcer.TrieBasedPolicyEnforcer(final Iterable<PolicyEntry> policy)
focal_class.full_signature: private  TrieBasedPolicyEnforcer(final Iterable<PolicyEntry> policy)
focal_class.identifier: TrieBasedPolicyEnforcer
focal_class.modifiers: private
focal_class.parameters: (final Iterable<PolicyEntry> policy)
focal_class.signature:  TrieBasedPolicyEnforcer(final Iterable<PolicyEntry> policy)
focal_class.class_method_signature: TrieBasedPolicyEnforcer.newInstance(final Policy policy)
focal_class.full_signature: public static TrieBasedPolicyEnforcer newInstance(final Policy policy)
focal_class.identifier: newInstance
focal_class.modifiers: public static
focal_class.parameters: (final Policy policy)
focal_class.return: TrieBasedPolicyEnforcer
focal_class.signature: TrieBasedPolicyEnforcer newInstance(final Policy policy)
focal_class.class_method_signature: TrieBasedPolicyEnforcer.hasUnrestrictedPermissions(final ResourceKey resourceKey,
              final AuthorizationContext authorizationContext, final Permissions permissions)
focal_class.full_signature: @Override public boolean hasUnrestrictedPermissions(final ResourceKey resourceKey,
              final AuthorizationContext authorizationContext, final Permissions permissions)
focal_class.identifier: hasUnrestrictedPermissions
focal_class.modifiers: @Override public
focal_class.parameters: (final ResourceKey resourceKey,
              final AuthorizationContext authorizationContext, final Permissions permissions)
focal_class.return: boolean
focal_class.signature: boolean hasUnrestrictedPermissions(final ResourceKey resourceKey,
              final AuthorizationContext authorizationContext, final Permissions permissions)
focal_class.class_method_signature: TrieBasedPolicyEnforcer.hasPartialPermissions(final ResourceKey resourceKey, final AuthorizationContext authorizationContext,
              final Permissions permissions)
focal_class.full_signature: @Override public boolean hasPartialPermissions(final ResourceKey resourceKey, final AuthorizationContext authorizationContext,
              final Permissions permissions)
focal_class.identifier: hasPartialPermissions
focal_class.modifiers: @Override public
focal_class.parameters: (final ResourceKey resourceKey, final AuthorizationContext authorizationContext,
              final Permissions permissions)
focal_class.return: boolean
focal_class.signature: boolean hasPartialPermissions(final ResourceKey resourceKey, final AuthorizationContext authorizationContext,
              final Permissions permissions)
focal_class.class_method_signature: TrieBasedPolicyEnforcer.getSubjectIdsWithPermission(final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.full_signature: @Override public EffectedSubjectIds getSubjectIdsWithPermission(final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.identifier: getSubjectIdsWithPermission
focal_class.modifiers: @Override public
focal_class.parameters: (final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.return: EffectedSubjectIds
focal_class.signature: EffectedSubjectIds getSubjectIdsWithPermission(final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.class_method_signature: TrieBasedPolicyEnforcer.getSubjectsWithPermission(final ResourceKey resourceKey, final Permissions permissions)
focal_class.full_signature: @Override public EffectedSubjects getSubjectsWithPermission(final ResourceKey resourceKey, final Permissions permissions)
focal_class.identifier: getSubjectsWithPermission
focal_class.modifiers: @Override public
focal_class.parameters: (final ResourceKey resourceKey, final Permissions permissions)
focal_class.return: EffectedSubjects
focal_class.signature: EffectedSubjects getSubjectsWithPermission(final ResourceKey resourceKey, final Permissions permissions)
focal_class.class_method_signature: TrieBasedPolicyEnforcer.checkResourceKey(final ResourceKey resourceKey)
focal_class.full_signature: private static void checkResourceKey(final ResourceKey resourceKey)
focal_class.identifier: checkResourceKey
focal_class.modifiers: private static
focal_class.parameters: (final ResourceKey resourceKey)
focal_class.return: void
focal_class.signature: void checkResourceKey(final ResourceKey resourceKey)
focal_class.class_method_signature: TrieBasedPolicyEnforcer.checkPermissions(final Permissions permissions)
focal_class.full_signature: private static void checkPermissions(final Permissions permissions)
focal_class.identifier: checkPermissions
focal_class.modifiers: private static
focal_class.parameters: (final Permissions permissions)
focal_class.return: void
focal_class.signature: void checkPermissions(final Permissions permissions)
focal_class.class_method_signature: TrieBasedPolicyEnforcer.getSubjectIdsWithPartialPermission(final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.full_signature: @Override public Set<String> getSubjectIdsWithPartialPermission(final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.identifier: getSubjectIdsWithPartialPermission
focal_class.modifiers: @Override public
focal_class.parameters: (final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.return: Set<String>
focal_class.signature: Set<String> getSubjectIdsWithPartialPermission(final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.class_method_signature: TrieBasedPolicyEnforcer.getSubjectsWithPartialPermission(final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.full_signature: @Override public Set<AuthorizationSubject> getSubjectsWithPartialPermission(final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.identifier: getSubjectsWithPartialPermission
focal_class.modifiers: @Override public
focal_class.parameters: (final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.return: Set<AuthorizationSubject>
focal_class.signature: Set<AuthorizationSubject> getSubjectsWithPartialPermission(final ResourceKey resourceKey,
              final Permissions permissions)
focal_class.class_method_signature: TrieBasedPolicyEnforcer.buildJsonView(final ResourceKey resourceKey,
              final Iterable<JsonField> jsonFields,
              final AuthorizationContext authorizationContext,
              final Permissions permissions)
focal_class.full_signature: @Override public JsonObject buildJsonView(final ResourceKey resourceKey,
              final Iterable<JsonField> jsonFields,
              final AuthorizationContext authorizationContext,
              final Permissions permissions)
focal_class.identifier: buildJsonView
focal_class.modifiers: @Override public
focal_class.parameters: (final ResourceKey resourceKey,
              final Iterable<JsonField> jsonFields,
              final AuthorizationContext authorizationContext,
              final Permissions permissions)
focal_class.return: JsonObject
focal_class.signature: JsonObject buildJsonView(final ResourceKey resourceKey,
              final Iterable<JsonField> jsonFields,
              final AuthorizationContext authorizationContext,
              final Permissions permissions)
focal_class.class_method_signature: TrieBasedPolicyEnforcer.seekWithFallback(final ResourceKey resourceKey, final PolicyTrie firstTry,
              final PolicyTrie fallback)
focal_class.full_signature: private static PolicyTrie seekWithFallback(final ResourceKey resourceKey, final PolicyTrie firstTry,
              final PolicyTrie fallback)
focal_class.identifier: seekWithFallback
focal_class.modifiers: private static
focal_class.parameters: (final ResourceKey resourceKey, final PolicyTrie firstTry,
              final PolicyTrie fallback)
focal_class.return: PolicyTrie
focal_class.signature: PolicyTrie seekWithFallback(final ResourceKey resourceKey, final PolicyTrie firstTry,
              final PolicyTrie fallback)
focal_method.body: @Override
      public JsonObject buildJsonView(final ResourceKey resourceKey,
              final Iterable<JsonField> jsonFields,
              final AuthorizationContext authorizationContext,
              final Permissions permissions) {
  
          checkResourceKey(resourceKey);
          checkNotNull(jsonFields, "JSON fields");
          checkPermissions(permissions);
  
          final JsonKey typeKey = JsonKey.of(resourceKey.getResourceType());
  
          if (inheritedTrie.hasChild(typeKey)) {
              final PolicyTrie start = inheritedTrie.seekToLeastAncestor(PolicyTrie.getJsonKeyIterator(resourceKey));
              return start.buildJsonView(jsonFields, authorizationContext.getAuthorizationSubjectIds(), permissions);
          } else {
              return JsonFactory.newObject();
          }
      }
focal_method.class_method_signature: TrieBasedPolicyEnforcer.buildJsonView(final ResourceKey resourceKey,
              final Iterable<JsonField> jsonFields,
              final AuthorizationContext authorizationContext,
              final Permissions permissions)
focal_method.full_signature: @Override public JsonObject buildJsonView(final ResourceKey resourceKey,
              final Iterable<JsonField> jsonFields,
              final AuthorizationContext authorizationContext,
              final Permissions permissions)
focal_method.identifier: buildJsonView
focal_method.invocations: checkResourceKey checkNotNull checkPermissions of getResourceType hasChild seekToLeastAncestor getJsonKeyIterator buildJsonView getAuthorizationSubjectIds newObject
focal_method.modifiers: @Override public
focal_method.parameters: (final ResourceKey resourceKey,
              final Iterable<JsonField> jsonFields,
              final AuthorizationContext authorizationContext,
              final Permissions permissions)
focal_method.return: JsonObject
focal_method.signature: JsonObject buildJsonView(final ResourceKey resourceKey,
              final Iterable<JsonField> jsonFields,
              final AuthorizationContext authorizationContext,
              final Permissions permissions)