test_class.declarator: LOCAL = ImmutableMap.of("rcj", "http://www.jcp.org/jcr/1.0")
test_class.modifier: private static final
test_class.original_string: private static final Map<String, String> LOCAL = ImmutableMap.of("rcj", "http://www.jcp.org/jcr/1.0");
test_class.type: Map<String, String>
test_class.var_name: LOCAL
test_class.declarator: REL_PATH = "r'e/l/path"
test_class.modifier: private static final
test_class.original_string: private static final String REL_PATH = "r'e/l/path";
test_class.type: String
test_class.var_name: REL_PATH
test_class.declarator: SERACH_EXPR = "s%e\\%arch\\E[:]xpr"
test_class.modifier: private static final
test_class.original_string: private static final String SERACH_EXPR = "s%e\\%arch\\E[:]xpr";
test_class.type: String
test_class.var_name: SERACH_EXPR
test_class.declarator: statement
test_class.modifier: private
test_class.original_string: private StringBuilder statement;
test_class.type: StringBuilder
test_class.var_name: statement
test_class.declarator: visitor
test_class.modifier: private
test_class.original_string: private XPathConditionVisitor visitor;
test_class.type: XPathConditionVisitor
test_class.var_name: visitor
test_class.declarator: testCondition
test_class.modifier: private
test_class.original_string: private Condition.Contains testCondition;
test_class.type: Condition.Contains
test_class.var_name: testCondition
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/query/XPathConditionVisitorTest.java
test_class.identifier: XPathConditionVisitorTest
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void testVisitImpersonationAdmin() throws Exception {
          String adminPrincipalName = getUserManager(root).getAuthorizable(getUserConfiguration().getParameters().getConfigValue(UserConstants.PARAM_ADMIN_ID, UserConstants.DEFAULT_ADMIN_ID)).getPrincipal().getName();
          Condition.Impersonation c = new Condition.Impersonation(adminPrincipalName);
          visitor.visit(c);
  
          String s = statement.toString();
          assertFalse(s.contains(UserConstants.REP_IMPERSONATORS));
          assertTrue(s.contains("@rcj:primaryType='" + UserConstants.NT_REP_USER + "'"));
      }
test_case.class_method_signature: XPathConditionVisitorTest.testVisitImpersonationAdmin()
test_case.full_signature: @Test public void testVisitImpersonationAdmin()
test_case.identifier: testVisitImpersonationAdmin
test_case.invocations: getName getPrincipal getAuthorizable getUserManager getConfigValue getParameters getUserConfiguration visit toString assertFalse contains assertTrue contains
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testVisitImpersonationAdmin()
focal_class.declarator: statement
focal_class.modifier: private final
focal_class.original_string: private final StringBuilder statement;
focal_class.type: StringBuilder
focal_class.var_name: statement
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: userMgr
focal_class.modifier: private final
focal_class.original_string: private final UserManager userMgr;
focal_class.type: UserManager
focal_class.var_name: userMgr
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/XPathConditionVisitor.java
focal_class.identifier: XPathConditionVisitor
focal_class.interfaces: implements ConditionVisitor
focal_class.class_method_signature: XPathConditionVisitor.XPathConditionVisitor(@NotNull StringBuilder statement, @NotNull NamePathMapper namePathMapper,
                            @NotNull UserManager userMgr)
focal_class.full_signature:   XPathConditionVisitor(@NotNull StringBuilder statement, @NotNull NamePathMapper namePathMapper,
                            @NotNull UserManager userMgr)
focal_class.identifier: XPathConditionVisitor
focal_class.parameters: (@NotNull StringBuilder statement, @NotNull NamePathMapper namePathMapper,
                            @NotNull UserManager userMgr)
focal_class.signature:  XPathConditionVisitor(@NotNull StringBuilder statement, @NotNull NamePathMapper namePathMapper,
                            @NotNull UserManager userMgr)
focal_class.class_method_signature: XPathConditionVisitor.visit(@NotNull Condition.Node condition)
focal_class.full_signature: @Override public void visit(@NotNull Condition.Node condition)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Condition.Node condition)
focal_class.return: void
focal_class.signature: void visit(@NotNull Condition.Node condition)
focal_class.class_method_signature: XPathConditionVisitor.visit(@NotNull Condition.PropertyValue condition)
focal_class.full_signature: @Override public void visit(@NotNull Condition.PropertyValue condition)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Condition.PropertyValue condition)
focal_class.return: void
focal_class.signature: void visit(@NotNull Condition.PropertyValue condition)
focal_class.class_method_signature: XPathConditionVisitor.visit(Condition.@NotNull PropertyLike condition)
focal_class.full_signature: @Override public void visit(Condition.@NotNull PropertyLike condition)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (Condition.@NotNull PropertyLike condition)
focal_class.return: void
focal_class.signature: void visit(Condition.@NotNull PropertyLike condition)
focal_class.class_method_signature: XPathConditionVisitor.visit(Condition.@NotNull PropertyExists condition)
focal_class.full_signature: @Override public void visit(Condition.@NotNull PropertyExists condition)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (Condition.@NotNull PropertyExists condition)
focal_class.return: void
focal_class.signature: void visit(Condition.@NotNull PropertyExists condition)
focal_class.class_method_signature: XPathConditionVisitor.visit(@NotNull Condition.Contains condition)
focal_class.full_signature: @Override public void visit(@NotNull Condition.Contains condition)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Condition.Contains condition)
focal_class.return: void
focal_class.signature: void visit(@NotNull Condition.Contains condition)
focal_class.class_method_signature: XPathConditionVisitor.visit(@NotNull Condition.Impersonation condition)
focal_class.full_signature: @Override public void visit(@NotNull Condition.Impersonation condition)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Condition.Impersonation condition)
focal_class.return: void
focal_class.signature: void visit(@NotNull Condition.Impersonation condition)
focal_class.class_method_signature: XPathConditionVisitor.visit(@NotNull Condition.Not condition)
focal_class.full_signature: @Override public void visit(@NotNull Condition.Not condition)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Condition.Not condition)
focal_class.return: void
focal_class.signature: void visit(@NotNull Condition.Not condition)
focal_class.class_method_signature: XPathConditionVisitor.visit(@NotNull Condition.And condition)
focal_class.full_signature: @Override public void visit(@NotNull Condition.And condition)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Condition.And condition)
focal_class.return: void
focal_class.signature: void visit(@NotNull Condition.And condition)
focal_class.class_method_signature: XPathConditionVisitor.visit(@NotNull Condition.Or condition)
focal_class.full_signature: @Override public void visit(@NotNull Condition.Or condition)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Condition.Or condition)
focal_class.return: void
focal_class.signature: void visit(@NotNull Condition.Or condition)
focal_method.body: @Override
      public void visit(@NotNull Condition.Node condition) {
          statement.append('(')
                  .append("jcr:like(@")
                  .append(QueryUtil.escapeForQuery(UserConstants.REP_AUTHORIZABLE_ID, namePathMapper))
                  .append(",'")
                  .append(QueryUtil.escapeForQuery(condition.getPattern()))
                  .append("')")
                  .append(" or ")
                  .append("jcr:like(@")
                  .append(QueryUtil.escapeForQuery(UserConstants.REP_PRINCIPAL_NAME, namePathMapper))
                  .append(",'")
                  .append(QueryUtil.escapeForQuery(condition.getPattern()))
                  .append("')")
                  .append(" or ")
                  .append("jcr:like(fn:name(),'")
                  .append(QueryUtil.escapeForQuery(QueryUtil.escapeNodeName(condition.getPattern())))
                  .append("')")
                  .append(')');
      }
focal_method.class_method_signature: XPathConditionVisitor.visit(@NotNull Condition.Node condition)
focal_method.full_signature: @Override public void visit(@NotNull Condition.Node condition)
focal_method.identifier: visit
focal_method.invocations: append append append append append append append append append append append append append append append append append escapeForQuery escapeForQuery getPattern escapeForQuery escapeForQuery getPattern escapeForQuery escapeNodeName getPattern
focal_method.modifiers: @Override public
focal_method.parameters: (@NotNull Condition.Node condition)
focal_method.return: void
focal_method.signature: void visit(@NotNull Condition.Node condition)