jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1329094 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/WorkspaceImpl.java
Date Mon, 23 Apr 2012 06:59:10 GMT
Author: angela
Date: Mon Apr 23 06:59:10 2012
New Revision: 1329094

URL: http://svn.apache.org/viewvc?rev=1329094&view=rev
Log:
OAK-64 : Privilege Management (WIP)


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

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/WorkspaceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/WorkspaceImpl.java?rev=1329094&r1=1329093&r2=1329094&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/WorkspaceImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/WorkspaceImpl.java
Mon Apr 23 06:59:10 2012
@@ -16,21 +16,24 @@
  */
 package org.apache.jackrabbit.oak.jcr;
 
+import org.apache.jackrabbit.api.JackrabbitWorkspace;
+import org.apache.jackrabbit.api.security.authorization.PrivilegeManager;
 import org.apache.jackrabbit.oak.api.Branch;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.jcr.query.QueryManagerImpl;
+import org.apache.jackrabbit.oak.jcr.security.privileges.PrivilegeManagerImpl;
 import org.apache.jackrabbit.oak.namepath.Paths;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
 
 import javax.jcr.NamespaceRegistry;
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.Workspace;
 import javax.jcr.lock.LockManager;
 import javax.jcr.nodetype.NodeTypeManager;
 import javax.jcr.observation.ObservationManager;
@@ -43,7 +46,7 @@ import java.io.InputStream;
 /**
  * {@code WorkspaceImpl}...
  */
-public class WorkspaceImpl implements Workspace {
+public class WorkspaceImpl implements JackrabbitWorkspace {
 
     /**
      * logger instance
@@ -239,6 +242,25 @@ public class WorkspaceImpl implements Wo
         // TODO -> SPI
     }
 
+    //------------------------------------------------< JackrabbitWorkspace >---
+
+    @Override
+    public void createWorkspace(String workspaceName, InputSource workspaceTemplate) throws
RepositoryException {
+        ensureIsAlive();
+        ensureSupportedOption(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED);
+
+        // TODO -> SPI
+    }
+
+    /**
+     * @see org.apache.jackrabbit.api.JackrabbitWorkspace#getPrivilegeManager()
+     */
+    @Override
+    public PrivilegeManager getPrivilegeManager() throws RepositoryException {
+        return new PrivilegeManagerImpl(sessionContext);
+    }
+
+
     //------------------------------------------------------------< private >---
 
     private void ensureIsAlive() throws RepositoryException {



Mime
View raw message