jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1374282 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserValidatorProvider.java
Date Fri, 17 Aug 2012 14:24:47 GMT
Author: angela
Date: Fri Aug 17 14:24:47 2012
New Revision: 1374282

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

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserValidatorProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserValidatorProvider.java?rev=1374282&r1=1374281&r2=1374282&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserValidatorProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserValidatorProvider.java
Fri Aug 17 14:24:47 2012
@@ -18,9 +18,9 @@ package org.apache.jackrabbit.oak.securi
 
 import javax.annotation.Nonnull;
 
-import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.core.ReadOnlyTree;
+import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.spi.commit.Validator;
 import org.apache.jackrabbit.oak.spi.commit.ValidatorProvider;
 import org.apache.jackrabbit.oak.spi.security.user.UserManagerConfig;
@@ -32,14 +32,14 @@ import org.apache.jackrabbit.oak.util.No
  */
 public class UserValidatorProvider implements ValidatorProvider {
 
-    private final ContentSession contentSession;
+    private final CoreValueFactory valueFactory;
     private final UserManagerConfig config;
 
-    public UserValidatorProvider(ContentSession contentSession, UserManagerConfig config)
{
-        assert contentSession != null;
+    public UserValidatorProvider(CoreValueFactory valueFactory, UserManagerConfig config)
{
+        assert valueFactory != null;
         assert config != null;
 
-        this.contentSession = contentSession;
+        this.valueFactory = valueFactory;
         this.config = config;
     }
     //--------------------------------------------------< ValidatorProvider >---
@@ -47,8 +47,8 @@ public class UserValidatorProvider imple
     @Override
     public Validator getRootValidator(NodeState before, NodeState after) {
 
-        NodeUtil rootBefore = new NodeUtil(new ReadOnlyTree(before), contentSession);
-        NodeUtil rootAfter = new NodeUtil(new ReadOnlyTree(after), contentSession);
+        NodeUtil rootBefore = new NodeUtil(new ReadOnlyTree(before), valueFactory, NamePathMapper.DEFAULT);
+        NodeUtil rootAfter = new NodeUtil(new ReadOnlyTree(after), valueFactory, NamePathMapper.DEFAULT);
 
         return new UserValidator(rootBefore, rootAfter, this);
     }
@@ -61,11 +61,6 @@ public class UserValidatorProvider imple
 
     @Nonnull
     CoreValueFactory getValueFactory() {
-        return contentSession.getCoreValueFactory();
-    }
-
-    @Nonnull
-    ContentSession getContentSession() {
-        return contentSession;
+        return valueFactory;
     }
 }
\ No newline at end of file



Mime
View raw message