jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1300836 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
Date Thu, 15 Mar 2012 08:09:26 GMT
Author: angela
Date: Thu Mar 15 08:09:26 2012
New Revision: 1300836

URL: http://svn.apache.org/viewvc?rev=1300836&view=rev
Log:
JCR-5: JCR bindings for Oak 

- implementation of some trivial parts and shortcuts

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java?rev=1300836&r1=1300835&r2=1300836&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
Thu Mar 15 08:09:26 2012
@@ -22,14 +22,17 @@ import org.slf4j.LoggerFactory;
 import org.xml.sax.ContentHandler;
 
 import javax.jcr.AccessDeniedException;
+import javax.jcr.Credentials;
 import javax.jcr.InvalidItemStateException;
 import javax.jcr.ItemExistsException;
 import javax.jcr.ItemNotFoundException;
+import javax.jcr.LoginException;
 import javax.jcr.Node;
 import javax.jcr.PathNotFoundException;
 import javax.jcr.ReferentialIntegrityException;
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.ValueFactory;
 import javax.jcr.Workspace;
@@ -51,7 +54,6 @@ public class SessionImpl extends Abstrac
      */
     private static final Logger log = LoggerFactory.getLogger(SessionImpl.class);
 
-    private final Repository repository = null;
     private final Workspace workspace = null;
     private final ValueFactory valueFactory = null;
 
@@ -60,7 +62,8 @@ public class SessionImpl extends Abstrac
     //------------------------------------------------------------< Session >---
     @Override
     public Repository getRepository() {
-        return repository;
+        // TODO
+        return null;
     }
 
     @Override
@@ -156,6 +159,9 @@ public class SessionImpl extends Abstrac
         return false;
     }
 
+    /**
+     * @see javax.jcr.Session#checkPermission(String, String)
+     */
     @Override
     public void checkPermission(String absPath, String actions) throws AccessControlException,
RepositoryException {
         if (!hasPermission(absPath, actions)) {
@@ -195,6 +201,17 @@ public class SessionImpl extends Abstrac
         // TODO
     }
 
+    /**
+     * @see javax.jcr.Session#impersonate(Credentials)
+     */
+    @Override
+    public Session impersonate(Credentials credentials) throws LoginException, RepositoryException
{
+        checkIsAlive();
+
+        // TODO
+        return null;
+    }
+
     @Override
     public void addLockToken(String lt) {
         try {
@@ -283,7 +300,7 @@ public class SessionImpl extends Abstrac
      * @return true if the repository supports the given option. False otherwise.
      */
     boolean isSupportedOption(String option) {
-        String desc = repository.getDescriptor(option);
+        String desc = getRepository().getDescriptor(option);
         // if the descriptors are not available return true. the missing
         // functionality of the given SPI impl will in this case be detected
         // upon the corresponding SPI call (see JCR-3143).



Mime
View raw message