test_class.declarator: valueFactory
test_class.modifier: private
test_class.original_string: private ValueFactory valueFactory;
test_class.type: ValueFactory
test_class.var_name: valueFactory
test_class.declarator: queryMgr
test_class.modifier: private
test_class.original_string: private UserQueryManager queryMgr;
test_class.type: UserQueryManager
test_class.var_name: queryMgr
test_class.declarator: user
test_class.modifier: private
test_class.original_string: private User user;
test_class.type: User
test_class.var_name: user
test_class.declarator: propertyName
test_class.modifier: private
test_class.original_string: private String propertyName;
test_class.type: String
test_class.var_name: propertyName
test_class.declarator: v
test_class.modifier: private
test_class.original_string: private Value v;
test_class.type: Value
test_class.var_name: v
test_class.declarator: groups = new ArrayList<>()
test_class.modifier: private
test_class.original_string: private List<Group> groups = new ArrayList<>();
test_class.type: List<Group>
test_class.var_name: groups
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManagerTest.java
test_class.identifier: UserQueryManagerTest
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void testQueryScopeEveryoneWithIdDiffersPrincipalName() throws Exception {
          Group g = createGroup("eGroup", EveryonePrincipal.getInstance());
          g.setProperty(propertyName, v);
          user.setProperty(propertyName, v);
          root.commit();
  
          Query q = new Query() {
              @Override
              public <T> void build(@NotNull QueryBuilder<T> builder) {
                  builder.setCondition(builder.eq(propertyName, v));
                  builder.setScope("eGroup", false);
              }
          };
  
          Iterator<Authorizable> result = queryMgr.findAuthorizables(q);
          assertResultContainsAuthorizables(result, user);
      }
test_case.class_method_signature: UserQueryManagerTest.testQueryScopeEveryoneWithIdDiffersPrincipalName()
test_case.full_signature: @Test public void testQueryScopeEveryoneWithIdDiffersPrincipalName()
test_case.identifier: testQueryScopeEveryoneWithIdDiffersPrincipalName
test_case.invocations: createGroup getInstance setProperty setProperty commit setCondition eq setScope findAuthorizables assertResultContainsAuthorizables
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testQueryScopeEveryoneWithIdDiffersPrincipalName()
focal_class.declarator: log = LoggerFactory.getLogger(UserQueryManager.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(UserQueryManager.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: userManager
focal_class.modifier: private final
focal_class.original_string: private final UserManagerImpl userManager;
focal_class.type: UserManagerImpl
focal_class.var_name: userManager
focal_class.declarator: namePathMapper
focal_class.modifier: private final
focal_class.original_string: private final NamePathMapper namePathMapper;
focal_class.type: NamePathMapper
focal_class.var_name: namePathMapper
focal_class.declarator: config
focal_class.modifier: private final
focal_class.original_string: private final ConfigurationParameters config;
focal_class.type: ConfigurationParameters
focal_class.var_name: config
focal_class.declarator: root
focal_class.modifier: private final
focal_class.original_string: private final Root root;
focal_class.type: Root
focal_class.var_name: root
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManager.java
focal_class.identifier: UserQueryManager
focal_class.class_method_signature: UserQueryManager.UserQueryManager(@NotNull UserManagerImpl userManager,
                              @NotNull NamePathMapper namePathMapper,
                              @NotNull ConfigurationParameters config,
                              @NotNull Root root)
focal_class.full_signature: public  UserQueryManager(@NotNull UserManagerImpl userManager,
                              @NotNull NamePathMapper namePathMapper,
                              @NotNull ConfigurationParameters config,
                              @NotNull Root root)
focal_class.identifier: UserQueryManager
focal_class.modifiers: public
focal_class.parameters: (@NotNull UserManagerImpl userManager,
                              @NotNull NamePathMapper namePathMapper,
                              @NotNull ConfigurationParameters config,
                              @NotNull Root root)
focal_class.signature:  UserQueryManager(@NotNull UserManagerImpl userManager,
                              @NotNull NamePathMapper namePathMapper,
                              @NotNull ConfigurationParameters config,
                              @NotNull Root root)
focal_class.class_method_signature: UserQueryManager.findAuthorizables(@NotNull Query query)
focal_class.full_signature: @NotNull public Iterator<Authorizable> findAuthorizables(@NotNull Query query)
focal_class.identifier: findAuthorizables
focal_class.modifiers: @NotNull public
focal_class.parameters: (@NotNull Query query)
focal_class.return: Iterator<Authorizable>
focal_class.signature: Iterator<Authorizable> findAuthorizables(@NotNull Query query)
focal_class.class_method_signature: UserQueryManager.findAuthorizables(@NotNull String relPath,
                                                      @Nullable String value,
                                                      @NotNull AuthorizableType authorizableType)
focal_class.full_signature: @NotNull public Iterator<Authorizable> findAuthorizables(@NotNull String relPath,
                                                      @Nullable String value,
                                                      @NotNull AuthorizableType authorizableType)
focal_class.identifier: findAuthorizables
focal_class.modifiers: @NotNull public
focal_class.parameters: (@NotNull String relPath,
                                                      @Nullable String value,
                                                      @NotNull AuthorizableType authorizableType)
focal_class.return: Iterator<Authorizable>
focal_class.signature: Iterator<Authorizable> findAuthorizables(@NotNull String relPath,
                                                      @Nullable String value,
                                                      @NotNull AuthorizableType authorizableType)
focal_class.class_method_signature: UserQueryManager.findAuthorizables(@NotNull String relPath,
                                                      @Nullable String value,
                                                      @NotNull AuthorizableType authorizableType,
                                                      boolean exact)
focal_class.full_signature: @NotNull public Iterator<Authorizable> findAuthorizables(@NotNull String relPath,
                                                      @Nullable String value,
                                                      @NotNull AuthorizableType authorizableType,
                                                      boolean exact)
focal_class.identifier: findAuthorizables
focal_class.modifiers: @NotNull public
focal_class.parameters: (@NotNull String relPath,
                                                      @Nullable String value,
                                                      @NotNull AuthorizableType authorizableType,
                                                      boolean exact)
focal_class.return: Iterator<Authorizable>
focal_class.signature: Iterator<Authorizable> findAuthorizables(@NotNull String relPath,
                                                      @Nullable String value,
                                                      @NotNull AuthorizableType authorizableType,
                                                      boolean exact)
focal_class.class_method_signature: UserQueryManager.buildXPathStatement(@NotNull String relPath,
                                         @Nullable String value,
                                         @NotNull AuthorizableType type, boolean exact)
focal_class.full_signature: @NotNull private String buildXPathStatement(@NotNull String relPath,
                                         @Nullable String value,
                                         @NotNull AuthorizableType type, boolean exact)
focal_class.identifier: buildXPathStatement
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NotNull String relPath,
                                         @Nullable String value,
                                         @NotNull AuthorizableType type, boolean exact)
focal_class.return: String
focal_class.signature: String buildXPathStatement(@NotNull String relPath,
                                         @Nullable String value,
                                         @NotNull AuthorizableType type, boolean exact)
focal_class.class_method_signature: UserQueryManager.buildXPathStatement(@NotNull XPathQueryBuilder builder)
focal_class.full_signature: @NotNull private String buildXPathStatement(@NotNull XPathQueryBuilder builder)
focal_class.identifier: buildXPathStatement
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NotNull XPathQueryBuilder builder)
focal_class.return: String
focal_class.signature: String buildXPathStatement(@NotNull XPathQueryBuilder builder)
focal_class.class_method_signature: UserQueryManager.findAuthorizables(@NotNull String statement,
                                                       long limit,
                                                       long offset,
                                                       @Nullable AuthorizableType type)
focal_class.full_signature: @NotNull private Iterator<Authorizable> findAuthorizables(@NotNull String statement,
                                                       long limit,
                                                       long offset,
                                                       @Nullable AuthorizableType type)
focal_class.identifier: findAuthorizables
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NotNull String statement,
                                                       long limit,
                                                       long offset,
                                                       @Nullable AuthorizableType type)
focal_class.return: Iterator<Authorizable>
focal_class.signature: Iterator<Authorizable> findAuthorizables(@NotNull String statement,
                                                       long limit,
                                                       long offset,
                                                       @Nullable AuthorizableType type)
focal_class.class_method_signature: UserQueryManager.getQueryPath(@NotNull String relPath)
focal_class.full_signature: @Nullable private static String getQueryPath(@NotNull String relPath)
focal_class.identifier: getQueryPath
focal_class.modifiers: @Nullable private static
focal_class.parameters: (@NotNull String relPath)
focal_class.return: String
focal_class.signature: String getQueryPath(@NotNull String relPath)
focal_class.class_method_signature: UserQueryManager.isReserved(@NotNull String propName)
focal_class.full_signature: private static boolean isReserved(@NotNull String propName)
focal_class.identifier: isReserved
focal_class.modifiers: private static
focal_class.parameters: (@NotNull String propName)
focal_class.return: boolean
focal_class.signature: boolean isReserved(@NotNull String propName)
focal_class.class_method_signature: UserQueryManager.isEveryone(@NotNull String groupId)
focal_class.full_signature: private boolean isEveryone(@NotNull String groupId)
focal_class.identifier: isEveryone
focal_class.modifiers: private
focal_class.parameters: (@NotNull String groupId)
focal_class.return: boolean
focal_class.signature: boolean isEveryone(@NotNull String groupId)
focal_method.body: @NotNull
      public Iterator<Authorizable> findAuthorizables(@NotNull Query query) throws RepositoryException {
          XPathQueryBuilder builder = new XPathQueryBuilder();
          query.build(builder);
  
          if (builder.getMaxCount() == 0) {
              return Collections.emptyIterator();
          }
  
          String statement = buildXPathStatement(builder);
          final String groupId = builder.getGroupID();
          if (groupId == null || isEveryone(groupId)) {
              long offset = builder.getOffset();
              Iterator<Authorizable> result = findAuthorizables(statement, builder.getMaxCount(), offset, null);
              if (groupId == null) {
                  return result;
              } else {
                  return Iterators.filter(result, authorizable -> !groupId.equals(getID(authorizable)));
              }
          } else {
              // filtering by group name included in query -> enforce offset and limit on the result set.
              Iterator<Authorizable> result = findAuthorizables(statement, Long.MAX_VALUE, 0, null);
              Predicate<Authorizable> filter;
              if (builder.isDeclaredMembersOnly()) {
                  filter = new DeclaredMembershipPredicate(userManager, groupId);
              } else {
                  filter = new GroupPredicate(userManager, groupId, false);
  
              }
              return ResultIterator.create(builder.getOffset(), builder.getMaxCount(), Iterators.filter(result, filter));
          }
      }
focal_method.class_method_signature: UserQueryManager.findAuthorizables(@NotNull Query query)
focal_method.full_signature: @NotNull public Iterator<Authorizable> findAuthorizables(@NotNull Query query)
focal_method.identifier: findAuthorizables
focal_method.invocations: build getMaxCount emptyIterator buildXPathStatement getGroupID isEveryone getOffset findAuthorizables getMaxCount filter equals getID findAuthorizables isDeclaredMembersOnly create getOffset getMaxCount filter
focal_method.modifiers: @NotNull public
focal_method.parameters: (@NotNull Query query)
focal_method.return: Iterator<Authorizable>
focal_method.signature: Iterator<Authorizable> findAuthorizables(@NotNull Query query)