jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1372796 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserProviderImpl.java oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerImpl.java
Date Tue, 14 Aug 2012 09:22:43 GMT
Author: angela
Date: Tue Aug 14 09:22:42 2012
New Revision: 1372796

URL: http://svn.apache.org/viewvc?rev=1372796&view=rev
Log:
OAK-50 : Implement User Management (WIP)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserProviderImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserProviderImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserProviderImpl.java?rev=1372796&r1=1372795&r2=1372796&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserProviderImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserProviderImpl.java
Tue Aug 14 09:22:42 2012
@@ -22,10 +22,9 @@ import javax.jcr.RepositoryException;
 import javax.jcr.nodetype.ConstraintViolationException;
 
 import org.apache.jackrabbit.JcrConstants;
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
+import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
-import org.apache.jackrabbit.oak.namepath.NameMapper;
 import org.apache.jackrabbit.oak.spi.security.user.UserConstants;
 import org.apache.jackrabbit.oak.spi.security.user.UserManagerConfig;
 import org.apache.jackrabbit.oak.spi.security.user.UserProvider;
@@ -120,21 +119,17 @@ public class UserProviderImpl implements
     private static final String DELIMITER = "/";
     private static final int DEFAULT_DEPTH = 2;
 
+    private final ContentSession contentSession;
     private final Root root;
-    private final CoreValueFactory valueFactory;
-    private final NameMapper nameMapper;
 
     private final int defaultDepth;
 
     private final String groupPath;
     private final String userPath;
 
-    public UserProviderImpl(Root root, CoreValueFactory valueFactory,
-                            NameMapper nameMapper,
-                            UserManagerConfig config) {
+    public UserProviderImpl(ContentSession contentSession, Root root, UserManagerConfig config)
{
+        this.contentSession = contentSession;
         this.root = root;
-        this.valueFactory = valueFactory;
-        this.nameMapper = nameMapper;
 
         defaultDepth = config.getConfigValue(UserManagerConfig.PARAM_DEFAULT_DEPTH, DEFAULT_DEPTH);
 
@@ -200,12 +195,12 @@ public class UserProviderImpl implements
         NodeUtil folder;
         Tree authTree = root.getTree(authRoot);
         if (authTree == null) {
-            folder = new NodeUtil(valueFactory, nameMapper, root.getTree(""));
+            folder = new NodeUtil(root.getTree(""), contentSession);
             for (String name : Text.explode(authRoot, '/', false)) {
                 folder = folder.getOrAddChild(name, UserConstants.NT_REP_AUTHORIZABLE_FOLDER);
             }
         }  else {
-            folder = new NodeUtil(valueFactory, nameMapper, authTree);
+            folder = new NodeUtil(authTree, contentSession);
         }
         String folderPath = getFolderPath(authorizableId, intermediatePath);
         String[] segmts = Text.explode(folderPath, '/', false);

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerImpl.java?rev=1372796&r1=1372795&r2=1372796&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerImpl.java
Tue Aug 14 09:22:42 2012
@@ -69,7 +69,7 @@ public class UserManagerImpl implements 
     public UserManagerImpl(SessionDelegate sessionDelegate, Root root, UserManagerConfig
config) {
         this.sessionDelegate = sessionDelegate;
         this.config = (config == null) ? new UserManagerConfig("admin") : config;
-        userProvider = new UserProviderImpl(root, sessionDelegate.getContentSession().getCoreValueFactory(),
sessionDelegate.getNamePathMapper(), this.config);
+        userProvider = new UserProviderImpl(sessionDelegate.getContentSession(), root, this.config);
 
         // FIXME: remove again. only tmp workaround
         this.util = new NodeTreeUtil(sessionDelegate.getSession(), root, sessionDelegate.getNamePathMapper());



Mime
View raw message