jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r279600 - /incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/RepositoryDecorator.java
Date Thu, 08 Sep 2005 19:05:20 GMT
Author: jukka
Date: Thu Sep  8 12:05:06 2005
New Revision: 279600

URL: http://svn.apache.org/viewcvs?rev=279600&view=rev
Log:
JCR-212: Decorate all the login methods using the canonical login(Credentials, String) method.

Modified:
    incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/RepositoryDecorator.java

Modified: incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/RepositoryDecorator.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/RepositoryDecorator.java?rev=279600&r1=279599&r2=279600&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/RepositoryDecorator.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/decorator/RepositoryDecorator.java
Thu Sep  8 12:05:06 2005
@@ -24,7 +24,7 @@
 import javax.jcr.Session;
 
 /**
- * Simple {@link Repository Repository} decorator. This class 
+ * Simple {@link Repository Repository} decorator.
  */
 public class RepositoryDecorator implements Repository {
 
@@ -65,39 +65,36 @@
     }
 
     /**
-     * Forwards the method call to the underlying repository. The returned
-     * session is wrapped into a session decorator using the decorator factory.
+     * Calls <code>login(credentials, null)</code>.
      * 
      * @return decorated session
+     * @see #login(Credentials, String)
      */
     public Session login(Credentials credentials) throws LoginException,
             NoSuchWorkspaceException, RepositoryException {
-        Session session = repository.login(credentials);
-        return factory.getSessionDecorator(this, session); 
+        return login(credentials, null);
     }
 
     /**
-     * Forwards the method call to the underlying repository. The returned
-     * session is wrapped into a session decorator using the decorator factory.
+     * Calls <code>login(null, workspaceName)</code>.
      * 
      * @return decorated session
+     * @see #login(Credentials, String)
      */
     public Session login(String workspaceName) throws LoginException,
             NoSuchWorkspaceException, RepositoryException {
-        Session session = repository.login(workspaceName);
-        return factory.getSessionDecorator(this, session); 
+        return login(null, workspaceName);
     }
 
     /**
-     * Forwards the method call to the underlying repository. The returned
-     * session is wrapped into a session decorator using the decorator factory.
+     * Calls <code>login(null, null)</code>.
      * 
      * @return decorated session
+     * @see #login(Credentials, String)
      */
     public Session login() throws LoginException, NoSuchWorkspaceException,
             RepositoryException {
-        Session session = repository.login();
-        return factory.getSessionDecorator(this, session); 
+        return login(null, null);
     }
 
 }



Mime
View raw message