jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r452079 - /jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
Date Mon, 02 Oct 2006 15:37:20 GMT
Author: angela
Date: Mon Oct  2 08:37:20 2006
New Revision: 452079

URL: http://svn.apache.org/viewvc?view=rev&rev=452079
Log:
work in progress

- remove DIFF comment
- resolve TODO for switchWorkspace

Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java?view=diff&rev=452079&r1=452078&r2=452079
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
Mon Oct  2 08:37:20 2006
@@ -113,14 +113,14 @@
     private final Map listeners = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.WEAK);
 
     private final Repository repository;
+    private final RepositoryConfig config;
     private final WorkspaceImpl workspace;
 
-    private final String userId;
+    private final SessionInfo sessionInfo;
 
     private final LocalNamespaceMappings nsMappings;
     private final NodeTypeManagerImpl ntManager;
-    private final ValueFactory valueFactory;
-    
+
     private final SessionItemStateManager itemStateManager;
     private final ItemManager itemManager;
     private final ItemStateValidator validator;
@@ -130,10 +130,10 @@
 
         alive = true;
         this.repository = repository;
-        userId = sessionInfo.getUserID();
+        this.config = config;
+        this.sessionInfo = sessionInfo;
 
         workspace = createWorkspaceInstance(config.getRepositoryService(), sessionInfo);
-        valueFactory = config.getValueFactory();
 
         // build local name-mapping
         nsMappings = new LocalNamespaceMappings(workspace.getNamespaceRegistryImpl());
@@ -161,7 +161,7 @@
      * @see javax.jcr.Session#getUserID()
      */
     public String getUserID() {
-        return userId;
+        return sessionInfo.getUserID();
     }
 
     /**
@@ -363,7 +363,7 @@
         // must throw UnsupportedRepositoryOperationException if writing is
         // not supported
         checkSupportedOption(Repository.LEVEL_2_SUPPORTED);
-        return valueFactory;
+        return config.getValueFactory();
     }
 
     /**
@@ -758,8 +758,7 @@
     //--------------------------------------------------------------------------
     SessionImpl switchWorkspace(String workspaceName) throws AccessDeniedException,
         NoSuchWorkspaceException, RepositoryException {
-        Credentials creds = null; // TODO: missing impl.
-        return (SessionImpl) repository.login(creds, workspaceName);
+        return new SessionImpl(sessionInfo, repository, config);
     }
 
     /**



Mime
View raw message