jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1397104 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user: AuthorizableBaseProvider.java MembershipProviderImpl.java
Date Thu, 11 Oct 2012 15:14:53 GMT
Author: mduerig
Date: Thu Oct 11 15:14:52 2012
New Revision: 1397104

URL: http://svn.apache.org/viewvc?rev=1397104&view=rev
Log:
OAK-371 Query package refactoring

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AuthorizableBaseProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipProviderImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AuthorizableBaseProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AuthorizableBaseProvider.java?rev=1397104&r1=1397103&r2=1397104&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AuthorizableBaseProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AuthorizableBaseProvider.java
Thu Oct 11 15:14:52 2012
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.oak.security.user;
 
 import org.apache.jackrabbit.JcrConstants;
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager;
@@ -41,13 +40,11 @@ abstract class AuthorizableBaseProvider 
 
     final UserConfig config;
     final Root root;
-    final CoreValueFactory valueFactory;
     final IdentifierManager identifierManager;
 
     AuthorizableBaseProvider(Root root, UserConfig config) {
         this.root = root;
         this.config = config;
-        this.valueFactory = root.getValueFactory();
         this.identifierManager = new IdentifierManager(root);
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipProviderImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipProviderImpl.java?rev=1397104&r1=1397103&r2=1397104&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipProviderImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipProviderImpl.java
Thu Oct 11 15:14:52 2012
@@ -19,7 +19,6 @@ package org.apache.jackrabbit.oak.securi
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Set;
 
 import javax.annotation.Nullable;
@@ -30,14 +29,11 @@ import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Iterators;
 import org.apache.jackrabbit.commons.iterator.RangeIteratorAdapter;
-import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
-import org.apache.jackrabbit.oak.plugins.memory.CoreValues;
 import org.apache.jackrabbit.oak.plugins.memory.MemoryPropertyBuilder;
 import org.apache.jackrabbit.oak.plugins.memory.PropertyStates;
-import org.apache.jackrabbit.oak.spi.query.PropertyValues;
 import org.apache.jackrabbit.oak.spi.security.user.AuthorizableType;
 import org.apache.jackrabbit.oak.spi.security.user.MembershipProvider;
 import org.apache.jackrabbit.oak.spi.security.user.UserConfig;
@@ -149,11 +145,11 @@ public class MembershipProviderImpl exte
         } else {
             PropertyState property = groupTree.getProperty(REP_MEMBERS);
             if (property != null) {
-                List<CoreValue> vs = CoreValues.getValues(property);
-                memberPaths = Iterables.transform(vs, new Function<CoreValue,String>()
{
+                Iterable<String> vs = property.getValue(STRINGS);
+                memberPaths = Iterables.transform(vs, new Function<String, String>()
{
                     @Override
-                    public String apply(@Nullable CoreValue value) {
-                        return identifierManager.getPath(PropertyStates.createProperty("",
value.getString(), value.getType()));
+                    public String apply(@Nullable String value) {
+                        return identifierManager.getPath(PropertyStates.createProperty("",
value, WEAKREFERENCE));
                     }
                 });
             }



Mime
View raw message