jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1431958 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/ oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/
Date Fri, 11 Jan 2013 09:49:46 GMT
Author: angela
Date: Fri Jan 11 09:49:45 2013
New Revision: 1431958

URL: http://svn.apache.org/viewvc?rev=1431958&view=rev
Log:
OAK-480 : Authorizable Query (WIP)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManager.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/XPathQueryBuilder.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserQueryTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManager.java?rev=1431958&r1=1431957&r2=1431958&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManager.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManager.java
Fri Jan 11 09:49:45 2013
@@ -116,7 +116,7 @@ public class UserQueryManager {
                     .append(sortDir.getDirection());
         }
 
-        if (builder.getGroupName() == null) {
+        if (builder.getGroupID() == null) {
             long offset = builder.getOffset();
             if (bound != null && offset > 0) {
                 log.warn("Found bound {} and offset {} in limit. Discarding offset.", bound,
offset);
@@ -128,7 +128,7 @@ public class UserQueryManager {
             // and limit on the result set.
             Iterator<Authorizable> result = findAuthorizables(statement.toString(),
Long.MAX_VALUE, 0);
             Predicate groupFilter = new GroupPredicate(userManager,
-                    builder.getGroupName(),
+                    builder.getGroupID(),
                     builder.isDeclaredMembersOnly());
             return ResultIterator.create(builder.getOffset(), builder.getMaxCount(),
                     Iterators.filter(result, groupFilter));

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/XPathQueryBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/XPathQueryBuilder.java?rev=1431958&r1=1431957&r2=1431958&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/XPathQueryBuilder.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/XPathQueryBuilder.java
Fri Jan 11 09:49:45 2013
@@ -27,7 +27,7 @@ import org.apache.jackrabbit.oak.spi.sec
 class XPathQueryBuilder implements QueryBuilder<Condition> {
 
     private AuthorizableType selectorType = AuthorizableType.AUTHORIZABLE;
-    private String groupName;
+    private String groupID;
     private boolean declaredMembersOnly;
     private Condition condition;
     private String sortProperty;
@@ -50,8 +50,8 @@ class XPathQueryBuilder implements Query
     }
 
     @Override
-    public void setScope(String groupName, boolean declaredOnly) {
-        this.groupName = groupName;
+    public void setScope(String groupID, boolean declaredOnly) {
+        this.groupID = groupID;
         declaredMembersOnly = declaredOnly;
     }
 
@@ -168,8 +168,8 @@ class XPathQueryBuilder implements Query
         return selectorType;
     }
 
-    String getGroupName() {
-        return groupName;
+    String getGroupID() {
+        return groupID;
     }
 
     boolean isDeclaredMembersOnly() {

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserQueryTest.java?rev=1431958&r1=1431957&r2=1431958&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserQueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserQueryTest.java
Fri Jan 11 09:49:45 2013
@@ -482,8 +482,7 @@ public class UserQueryTest extends Abstr
     public void testContains3() throws RepositoryException {
         Iterator<Authorizable> result = userMgr.findAuthorizables(new Query() {
             public <T> void build(QueryBuilder<T> builder) {
-                builder.setCondition(builder.
-                        contains("profile/.", "grass"));
+                builder.setCondition(builder.contains("profile/.", "grass"));
             }
         });
 



Mime
View raw message