jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r157770 - in incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit: core/JackrabbitRepositoryStub.java test/RepositoryHelper.java
Date Wed, 16 Mar 2005 16:43:05 GMT
Author: mreutegg
Date: Wed Mar 16 08:43:01 2005
New Revision: 157770

URL: http://svn.apache.org/viewcvs?view=rev&rev=157770
Log:
Provide readonly credentials for jackrabbit repository stub.

Modified:
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/RepositoryHelper.java

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java?view=diff&r1=157769&r2=157770
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java
Wed Mar 16 08:43:01 2005
@@ -21,6 +21,7 @@
 import org.apache.jackrabbit.test.RepositoryStubException;
 
 import javax.jcr.Repository;
+import javax.jcr.Credentials;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import java.util.Hashtable;
@@ -113,5 +114,13 @@
             }
         }
         return repository;
+    }
+
+    /**
+     * Returns <code>null</code> to indicate anonymous access.
+     * @return <code>null</code> to indicate anonymous access.
+     */
+    public Credentials getReadOnlyCredentials() {
+        return null;
     }
 }

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/RepositoryHelper.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/RepositoryHelper.java?view=diff&r1=157769&r2=157770
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/RepositoryHelper.java (original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/RepositoryHelper.java Wed
Mar 16 08:43:01 2005
@@ -19,6 +19,7 @@
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
+import javax.jcr.Credentials;
 import java.util.Map;
 import java.util.HashMap;
 
@@ -148,5 +149,41 @@
         // force assignment of repoStub
         getRepository();
         return repoStub.getProperty(name);
+    }
+
+    /**
+     * Returns the read-only credentials created from the username
+     * and password specified in the configuration properties.
+     * Configuration properties are defined in the file:
+     * <code>repositoryStubImpl.properties</code>.
+     *
+     * @return read-only <code>Credentials</code>
+     */
+    public Credentials getReadOnlyCredentials() {
+        return repoStub.getReadOnlyCredentials();
+    }
+
+    /**
+     * Returns the read-write credentials created from the username
+     * and password specified in the configuration properties.
+     * Configuration properties are defined in the file:
+     * <code>repositoryStubImpl.properties</code>.
+     *
+     * @return read-write <code>Credentials</code>
+     */
+    public Credentials getReadWriteCredentials() {
+        return repoStub.getReadWriteCredentials();
+    }
+
+    /**
+     * Returns the superuser credentials created from the username
+     * and password specified in the configuration properties.
+     * Configuration properties are defined in the file:
+     * <code>repositoryStubImpl.properties</code>.
+     *
+     * @return superuser <code>Credentials</code>
+     */
+    public Credentials getSuperuserCredentials() {
+        return repoStub.getSuperuserCredentials();
     }
 }



Mime
View raw message