jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r902732 - in /jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: RepositoryImpl.java TransientRepository.java jndi/BindableRepository.java
Date Mon, 25 Jan 2010 08:52:55 GMT
Author: fmeschbe
Date: Mon Jan 25 08:52:55 2010
New Revision: 902732

URL: http://svn.apache.org/viewvc?rev=902732&view=rev
Log:
Implement added Jackrabbit API methods: getDefaultWorksacpe() and loginAdministrative(String)

Modified:
    jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
    jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java
    jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java

Modified: jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=902732&r1=902731&r2=902732&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Mon Jan 25 08:52:55 2010
@@ -80,7 +80,6 @@
 import org.apache.jackrabbit.core.fs.FileSystemException;
 import org.apache.jackrabbit.core.fs.FileSystemResource;
 import org.apache.jackrabbit.core.id.NodeId;
-import org.apache.jackrabbit.core.lock.LockManager;
 import org.apache.jackrabbit.core.lock.LockManagerImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
 import org.apache.jackrabbit.core.nodetype.virtual.VirtualNodeTypeStateManager;
@@ -1131,6 +1130,15 @@
         }
     }
 
+    public String getDefaultWorkspace() {
+        return repConfig.getDefaultWorkspaceName();
+    }
+
+    public Session loginAdministrative(String workspace) throws LoginException,
+            NoSuchWorkspaceException, RepositoryException {
+        throw new LoginException("Not Yet Implemented");
+    }
+
     /**
      * Protected method that performs the actual shutdown after the shutdown
      * lock has been acquired by the {@link #shutdown()} method.

Modified: jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java?rev=902732&r1=902731&r2=902732&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java
(original)
+++ jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java
Mon Jan 25 08:52:55 2010
@@ -25,6 +25,8 @@
 import java.util.Properties;
 
 import javax.jcr.Credentials;
+import javax.jcr.LoginException;
+import javax.jcr.NoSuchWorkspaceException;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.Value;
@@ -388,6 +390,22 @@
         }
     }
 
+    /**
+     * Delegated to the underlying repository instance.
+     */
+    public String getDefaultWorkspace() {
+        return repository.getDefaultWorkspace();
+    }
+
+    /**
+     * Delegated to the underlying repository instance.
+     */
+    public Session loginAdministrative(String workspace) throws LoginException,
+            NoSuchWorkspaceException, RepositoryException {
+        // FIXME: We should, but how -- in a very transparent way ??
+        throw new LoginException("Not Supported for transient repositories");
+    }
+
     //-------------------------------------------------------<SessionListener>
 
     /**

Modified: jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java?rev=902732&r1=902731&r2=902732&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java
(original)
+++ jackrabbit/sandbox/jackrabbit2-bundle/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java
Mon Jan 25 08:52:55 2010
@@ -262,4 +262,19 @@
             // ignore. exception is thrown when hook itself calls shutdown
         }
     }
+
+    /**
+     * Delegated to the underlying repository instance.
+     */
+    public String getDefaultWorkspace() {
+        return repository.getDefaultWorkspace();
+    }
+
+    /**
+     * Delegated to the underlying repository instance.
+     */
+    public Session loginAdministrative(String workspace) throws LoginException,
+            NoSuchWorkspaceException, RepositoryException {
+        return repository.loginAdministrative(workspace);
+    }
 }



Mime
View raw message