jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r925218 [1/2] - in /jackrabbit/commons/jcr-rmi/trunk: ./ src/main/java/org/apache/jackrabbit/rmi/client/ src/main/java/org/apache/jackrabbit/rmi/client/principal/ src/main/java/org/apache/jackrabbit/rmi/client/security/ src/main/java/org/ap...
Date Fri, 19 Mar 2010 13:55:07 GMT
Author: fmeschbe
Date: Fri Mar 19 13:55:06 2010
New Revision: 925218

URL: http://svn.apache.org/viewvc?rev=925218&view=rev
Log:
JCRRMI-27 Provide implementation for remote AccessControlManager and helpers

Added:
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/principal/
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/security/
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java   (with props)
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java   (with props)
Modified:
    jackrabbit/commons/jcr-rmi/trunk/pom.xml
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java
    jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java

Modified: jackrabbit/commons/jcr-rmi/trunk/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/pom.xml?rev=925218&r1=925217&r2=925218&view=diff
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/pom.xml (original)
+++ jackrabbit/commons/jcr-rmi/trunk/pom.xml Fri Mar 19 13:55:06 2010
@@ -999,6 +999,10 @@
             <Import-Package>
               javax.transaction.xa;resolution:=optional,*
             </Import-Package>
+            <!-- inline RangeIterator adapt to not add library dependency -->
+            <Embed-Dependency>
+              jackrabbit-jcr-commons;inline=org/apache/jackrabbit/commons/iterator/RangeIteratorAdapter*
+            </Embed-Dependency>
           </instructions>
         </configuration>
       </plugin>
@@ -1057,6 +1061,25 @@
       <artifactId>slf4j-api</artifactId>
       <version>1.5.8</version>
     </dependency>
+    <!--
+      We use the RangeIteratorAdapter but include it in the library thus
+      users of the jackrabbit-jcr-rmi library do not need to get the
+      jackrabbit-jcr-commons library
+    -->
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-jcr-commons</artifactId>
+      <version>2.0.0</version>
+      <scope>provided</scope>
+    </dependency>
+    
+    <!-- Jackrabbit API extensions -->
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-api</artifactId>
+      <version>2.0.0</version>
+      <scope>provided</scope>
+    </dependency>
 
     <!-- Test dependencies -->
     <dependency>
@@ -1068,13 +1091,13 @@
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-core</artifactId>
-      <version>2.0-beta6</version>
+      <version>2.0.0</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-jcr-tests</artifactId>
-      <version>2.0-beta6</version>
+      <version>2.0.0</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Modified: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java?rev=925218&r1=925217&r2=925218&view=diff
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java (original)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java Fri Mar 19 13:55:06 2010
@@ -16,6 +16,9 @@
  */
 package org.apache.jackrabbit.rmi.client;
 
+import java.security.Principal;
+import java.util.Iterator;
+
 import javax.jcr.Item;
 import javax.jcr.NamespaceRegistry;
 import javax.jcr.Node;
@@ -26,11 +29,11 @@ import javax.jcr.Repository;
 import javax.jcr.Session;
 import javax.jcr.Workspace;
 import javax.jcr.lock.Lock;
+import javax.jcr.nodetype.ItemDefinition;
+import javax.jcr.nodetype.NodeDefinition;
 import javax.jcr.nodetype.NodeType;
 import javax.jcr.nodetype.NodeTypeIterator;
 import javax.jcr.nodetype.NodeTypeManager;
-import javax.jcr.nodetype.ItemDefinition;
-import javax.jcr.nodetype.NodeDefinition;
 import javax.jcr.nodetype.PropertyDefinition;
 import javax.jcr.observation.ObservationManager;
 import javax.jcr.query.Query;
@@ -38,6 +41,11 @@ import javax.jcr.query.QueryManager;
 import javax.jcr.query.QueryResult;
 import javax.jcr.query.Row;
 import javax.jcr.query.RowIterator;
+import javax.jcr.security.AccessControlEntry;
+import javax.jcr.security.AccessControlManager;
+import javax.jcr.security.AccessControlPolicy;
+import javax.jcr.security.AccessControlPolicyIterator;
+import javax.jcr.security.Privilege;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionHistory;
 import javax.jcr.version.VersionIterator;
@@ -47,6 +55,15 @@ import org.apache.jackrabbit.rmi.client.
 import org.apache.jackrabbit.rmi.client.iterator.ClientPropertyIterator;
 import org.apache.jackrabbit.rmi.client.iterator.ClientRowIterator;
 import org.apache.jackrabbit.rmi.client.iterator.ClientVersionIterator;
+import org.apache.jackrabbit.rmi.client.principal.ClientGroup;
+import org.apache.jackrabbit.rmi.client.principal.ClientPrincipal;
+import org.apache.jackrabbit.rmi.client.principal.ClientPrincipalIterator;
+import org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry;
+import org.apache.jackrabbit.rmi.client.security.ClientAccessControlList;
+import org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager;
+import org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy;
+import org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicyIterator;
+import org.apache.jackrabbit.rmi.client.security.ClientPrivilege;
 import org.apache.jackrabbit.rmi.remote.RemoteItem;
 import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition;
 import org.apache.jackrabbit.rmi.remote.RemoteIterator;
@@ -69,6 +86,13 @@ import org.apache.jackrabbit.rmi.remote.
 import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory;
 import org.apache.jackrabbit.rmi.remote.RemoteWorkspace;
 import org.apache.jackrabbit.rmi.remote.RemoteXASession;
+import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup;
+import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy;
+import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege;
 
 /**
  * Default implementation of the
@@ -320,4 +344,99 @@ public class ClientAdapterFactory implem
         return new ClientRowIterator(remote, this);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    public AccessControlManager getAccessControlManager(
+            RemoteAccessControlManager remote) {
+        return new ClientAccessControlManager(remote, this);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public AccessControlPolicy getAccessControlPolicy(
+            RemoteAccessControlPolicy remote) {
+        if (remote instanceof RemoteAccessControlList) {
+            return new ClientAccessControlList(
+                (RemoteAccessControlList) remote, this);
+        }
+        return new ClientAccessControlPolicy(remote, this);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public AccessControlPolicy[] getAccessControlPolicy(
+            RemoteAccessControlPolicy[] remote) {
+        final AccessControlPolicy[] local = new AccessControlPolicy[remote.length];
+        for (int i = 0; i < local.length; i++) {
+            local[i] = getAccessControlPolicy(remote[i]);
+        }
+        return local;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public AccessControlPolicyIterator getAccessControlPolicyIterator(
+            RemoteIterator remote) {
+        return new ClientAccessControlPolicyIterator(remote, this);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public AccessControlEntry getAccessControlEntry(
+            RemoteAccessControlEntry remote) {
+        return new ClientAccessControlEntry(remote, this);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public AccessControlEntry[] getAccessControlEntry(
+            RemoteAccessControlEntry[] remote) {
+        final AccessControlEntry[] local = new AccessControlEntry[remote.length];
+        for (int i = 0; i < local.length; i++) {
+            local[i] = getAccessControlEntry(remote[i]);
+        }
+        return local;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Principal getPrincipal(RemotePrincipal remote) {
+        if (remote instanceof RemoteGroup) {
+            return new ClientGroup(remote, this);
+        }
+        return new ClientPrincipal(remote);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @SuppressWarnings("unchecked")
+    public Iterator<Principal> getPrincipalIterator(RemoteIterator remote) {
+        return new ClientPrincipalIterator(remote, this);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Privilege getPrivilege(RemotePrivilege remote) {
+        return new ClientPrivilege(remote, this);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Privilege[] getPrivilege(RemotePrivilege[] remote) {
+        final Privilege[] local = new Privilege[remote.length];
+        for (int i = 0; i < local.length; i++) {
+            local[i] = getPrivilege(remote[i]);
+        }
+        return local;
+    }
 }

Modified: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java?rev=925218&r1=925217&r2=925218&view=diff
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java (original)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java Fri Mar 19 13:55:06 2010
@@ -70,7 +70,7 @@ public class ClientSession extends Clien
         LoggerFactory.getLogger(ClientSession.class);
 
     /** The current repository. */
-    private Repository repository;
+    private final Repository repository;
 
     /**
      * Flag indicating whether the session is to be considered live of not.
@@ -81,7 +81,7 @@ public class ClientSession extends Clien
     private boolean live = true;
 
     /** The adapted remote session. */
-    private RemoteSession remote;
+    protected final RemoteSession remote;
 
     /**
      * The adapted workspace of this session. This field is set on the first
@@ -561,8 +561,13 @@ public class ClientSession extends Clien
     }
 
     public AccessControlManager getAccessControlManager()
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCRRMI-26");
+            throws UnsupportedRepositoryOperationException, RepositoryException {
+        try {
+            return getFactory().getAccessControlManager(
+                remote.getAccessControlManager());
+        } catch (RemoteException ex) {
+            throw new RemoteRepositoryException(ex);
+        }
     }
 
     public RetentionManager getRetentionManager()

Modified: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java?rev=925218&r1=925217&r2=925218&view=diff
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java (original)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java Fri Mar 19 13:55:06 2010
@@ -16,6 +16,9 @@
  */
 package org.apache.jackrabbit.rmi.client;
 
+import java.security.Principal;
+import java.util.Iterator;
+
 import javax.jcr.Item;
 import javax.jcr.NamespaceRegistry;
 import javax.jcr.Node;
@@ -38,6 +41,11 @@ import javax.jcr.query.QueryManager;
 import javax.jcr.query.QueryResult;
 import javax.jcr.query.Row;
 import javax.jcr.query.RowIterator;
+import javax.jcr.security.AccessControlEntry;
+import javax.jcr.security.AccessControlManager;
+import javax.jcr.security.AccessControlPolicy;
+import javax.jcr.security.AccessControlPolicyIterator;
+import javax.jcr.security.Privilege;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionHistory;
 import javax.jcr.version.VersionIterator;
@@ -63,6 +71,11 @@ import org.apache.jackrabbit.rmi.remote.
 import org.apache.jackrabbit.rmi.remote.RemoteVersion;
 import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory;
 import org.apache.jackrabbit.rmi.remote.RemoteWorkspace;
+import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy;
+import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege;
 
 /**
  * Factory interface for creating local adapters for remote references.
@@ -318,4 +331,104 @@ public interface LocalAdapterFactory {
      */
     RowIterator getRowIterator(RemoteIterator remote);
 
+    /**
+     * Factory method for creating a local adapter for a remote access control
+     * manager
+     *
+     * @param remote remote access control manager
+     * @return local access control manager
+     */
+    AccessControlManager getAccessControlManager(
+            RemoteAccessControlManager remote);
+
+    /**
+     * Factory method for creating a local adapter for a remote access control
+     * policy
+     *
+     * @param remote remote access control policy
+     * @return local access control policy
+     */
+    AccessControlPolicy getAccessControlPolicy(RemoteAccessControlPolicy remote);
+
+    /**
+     * Factory method for creating an array of local adapter for an array of
+     * remote access control policies
+     *
+     * @param remote array of remote access control policies
+     * @return array of local access control policies
+     */
+    AccessControlPolicy[] getAccessControlPolicy(
+            RemoteAccessControlPolicy[] remote);
+
+    /**
+     * Factory method for creating a local adapter for a remote access control
+     * policy iterator
+     *
+     * @param remote access control policy iterator
+     * @return local access control policy iterator
+     */
+    AccessControlPolicyIterator getAccessControlPolicyIterator(
+            RemoteIterator remote);
+
+    /**
+     * Factory method for creating a local adapter for a remote access control
+     * entry
+     *
+     * @param remote remote access control entry
+     * @return local access control entry
+     */
+    AccessControlEntry getAccessControlEntry(RemoteAccessControlEntry remote);
+
+    /**
+     * Factory method for creating an array of local adapter for an array of
+     * remote access control entry
+     *
+     * @param remote array of remote access control entry
+     * @return local array of access control entry
+     */
+    AccessControlEntry[] getAccessControlEntry(RemoteAccessControlEntry[] remote);
+
+    /**
+     * Factory method for creating a local adapter for a remote principal.
+     * <p>
+     * If <code>remote</code> is a
+     * {@link org.apache.jackrabbit.rmi.remote.security.RemoteGroup} the
+     * prinicipal returned implements the <code>java.security.acl.Group</code>
+     * interface.
+     *
+     * @param remote principal
+     * @return local principal
+     */
+    Principal getPrincipal(RemotePrincipal remote);
+
+    /**
+     * Factory method for creating a local adapter for a remote principal
+     * iterator.
+     * <p>
+     * Each entry in the <code>remote</code> iterator which is a
+     * {@link org.apache.jackrabbit.rmi.remote.security.RemoteGroup} will be
+     * provided as a principal implementing the
+     * <code>java.security.acl.Group</code> interface.
+     *
+     * @param remote remote principal iterator
+     * @return local principal iterator
+     */
+    Iterator<Principal> getPrincipalIterator(RemoteIterator remote);
+
+    /**
+     * Factory method for creating a local adapter for a remote privilege
+     *
+     * @param remote remote privilege
+     * @return local privilege
+     */
+    Privilege getPrivilege(RemotePrivilege remote);
+
+    /**
+     * Factory method for creating an array of local adapter for an array of
+     * remote privilege
+     *
+     * @param remote array of remote privilege
+     * @return array of local privilege
+     */
+    Privilege[] getPrivilege(RemotePrivilege[] remote);
 }

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.rmi.client.principal;
+
+import java.rmi.RemoteException;
+import java.security.Principal;
+import java.security.acl.Group;
+import java.util.Enumeration;
+import java.util.Iterator;
+
+import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
+import org.apache.jackrabbit.rmi.client.RemoteRuntimeException;
+import org.apache.jackrabbit.rmi.remote.RemoteIterator;
+import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup;
+import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal;
+
+/**
+ * Local adapter for the JCR-RMI {@link RemoteGroup RemoteGroup} interface. This
+ * class makes a remote group locally available using the Java {@link Group}
+ * interface.
+ *
+ * @see Group
+ * @see RemoteGroup
+ */
+public class ClientGroup extends ClientPrincipal implements Group {
+
+    private final LocalAdapterFactory factory;
+
+    public ClientGroup(final RemotePrincipal p,
+            final LocalAdapterFactory factory) {
+        super(p);
+        this.factory = factory;
+    }
+
+    /**
+     * @throws UnsupportedRepositoryOperationException This method is not
+     *             implemented yet
+     */
+    public boolean addMember(Principal user) {
+        // no support for adding member here
+        return false;
+    }
+
+    /**
+     * @throws UnsupportedRepositoryOperationException This method is not
+     *             implemented yet
+     */
+    public boolean isMember(Principal member) {
+        try {
+            return ((RemoteGroup) getRemotePrincipal()).isMember(member.getName());
+        } catch (RemoteException re) {
+            throw new RemoteRuntimeException(re);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public Enumeration<? extends Principal> members() {
+        try {
+            final RemoteIterator remote = ((RemoteGroup) getRemotePrincipal()).members();
+            final Iterator<Principal> pi = factory.getPrincipalIterator(remote);
+            return new Enumeration<Principal>() {
+                public boolean hasMoreElements() {
+                    return pi.hasNext();
+                }
+
+                public Principal nextElement() {
+                    return pi.next();
+                }
+            };
+        } catch (RemoteException re) {
+            throw new RemoteRuntimeException(re);
+        }
+    }
+
+    /**
+     * @throws UnsupportedRepositoryOperationException This method is not
+     *             implemented yet
+     */
+    public boolean removeMember(Principal user) {
+        // no support for removing member here
+        return false;
+    }
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.rmi.client.principal;
+
+import java.rmi.RemoteException;
+import java.security.Principal;
+
+import org.apache.jackrabbit.rmi.client.RemoteRuntimeException;
+import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal;
+
+/**
+ * Local adapter for the JCR-RMI {@link RemotePrincipal RemotePrincipal}
+ * interface. This class makes a remote principal locally available using the
+ * Java {@link Principal} interface.
+ *
+ * @see Principal
+ * @see RemotePrincipal
+ */
+public class ClientPrincipal implements Principal {
+
+    private final RemotePrincipal p;
+
+    public ClientPrincipal(final RemotePrincipal p) {
+        this.p = p;
+    }
+
+    /** {@inheritDoc} */
+    public String getName() {
+        try {
+            return p.getName();
+        } catch (RemoteException re) {
+            throw new RemoteRuntimeException(re);
+        }
+    }
+
+    /**
+     * Returns the {@link RemotePrincipal} encapsulated in this instance.
+     * <p>
+     * NOTE: This method is intended to only be used in the JCR RMI
+     * implementation to be able to "send back" remote principals to the server
+     * for implementation of the remote JCR API.
+     *
+     * @return the {@link RemotePrincipal} encapsulated in this instance.
+     */
+    public final RemotePrincipal getRemotePrincipal() {
+        return p;
+    }
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.rmi.client.principal;
+
+import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
+import org.apache.jackrabbit.rmi.client.iterator.ClientIterator;
+import org.apache.jackrabbit.rmi.remote.RemoteIterator;
+import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal;
+
+/**
+ * A ClientIterator for iterating remote principals
+ */
+public class ClientPrincipalIterator extends ClientIterator {
+
+    public ClientPrincipalIterator(final RemoteIterator iterator,
+            final LocalAdapterFactory factory) {
+        super(iterator, factory);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected Object getObject(Object remote) {
+        return getFactory().getPrincipal((RemotePrincipal) remote);
+    }
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.rmi.client.security;
+
+import java.rmi.RemoteException;
+import java.security.Principal;
+
+import javax.jcr.security.AccessControlEntry;
+import javax.jcr.security.Privilege;
+
+import org.apache.jackrabbit.rmi.client.ClientObject;
+import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
+import org.apache.jackrabbit.rmi.client.RemoteRuntimeException;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry;
+
+/**
+ * Local adapter for the JCR-RMI {@link RemoteAccessControlEntry
+ * RemoteAccessControlEntry} interface. This class makes a remote
+ * AccessControlEntry locally available using the JCR {@link AccessControlEntry
+ * AccessControlEntry} interface.
+ *
+ * @see javax.jcr.security.AccessControlEntry
+ * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry
+ */
+public class ClientAccessControlEntry extends ClientObject implements
+        AccessControlEntry {
+
+    private final RemoteAccessControlEntry race;
+
+    public ClientAccessControlEntry(final RemoteAccessControlEntry race,
+            final LocalAdapterFactory factory) {
+        super(factory);
+        this.race = race;
+    }
+
+    /** {@inheritDoc} */
+    public Principal getPrincipal() {
+        try {
+            return getFactory().getPrincipal(race.getPrincipal());
+        } catch (RemoteException re) {
+            throw new RemoteRuntimeException(re);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public Privilege[] getPrivileges() {
+        try {
+            return getFactory().getPrivilege(race.getPrivileges());
+        } catch (RemoteException re) {
+            throw new RemoteRuntimeException(re);
+        }
+    }
+
+    RemoteAccessControlEntry getRemoteAccessControlEntry() {
+        return race;
+    }
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.rmi.client.security;
+
+import java.rmi.RemoteException;
+import java.security.Principal;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.security.AccessControlEntry;
+import javax.jcr.security.AccessControlList;
+import javax.jcr.security.Privilege;
+
+import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
+import org.apache.jackrabbit.rmi.client.RemoteRepositoryException;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList;
+
+/**
+ * Local adapter for the JCR-RMI {@link RemoteAccessControlList
+ * RemoteAccessControlList} interface. This class makes a remote
+ * AccessControlList locally available using the JCR {@link AccessControlList
+ * AccessControlList} interface.
+ *
+ * @see javax.jcr.security.AccessControlList
+ * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList
+ */
+public class ClientAccessControlList extends ClientAccessControlPolicy
+        implements AccessControlList {
+
+    public ClientAccessControlList(final RemoteAccessControlList racl,
+            final LocalAdapterFactory factory) {
+        super(racl, factory);
+    }
+
+    /**
+     * @throws UnsupportedRepositoryOperationException This method is not
+     *             implemented yet
+     */
+    public boolean addAccessControlEntry(Principal principal,
+            Privilege[] privileges)
+            throws UnsupportedRepositoryOperationException {
+        // TODO: implement client side of the story
+        throw new UnsupportedRepositoryOperationException(
+            "addAccessControlEntry");
+    }
+
+    /** {@inheritDoc} */
+    public AccessControlEntry[] getAccessControlEntries()
+            throws RepositoryException {
+        try {
+            return getFactory().getAccessControlEntry(
+                ((RemoteAccessControlList) getRemoteAccessControlPolicy()).getAccessControlEntries());
+        } catch (RemoteException re) {
+            throw new RemoteRepositoryException(re);
+        }
+    }
+
+    /**
+     * @throws UnsupportedRepositoryOperationException This method is not
+     *             implemented yet
+     */
+    public void removeAccessControlEntry(AccessControlEntry ace)
+            throws UnsupportedRepositoryOperationException {
+        // TODO: implement client side of the story
+        throw new UnsupportedRepositoryOperationException(
+            "removeAccessControlEntry");
+    }
+
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.rmi.client.security;
+
+import java.rmi.RemoteException;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.security.AccessControlException;
+import javax.jcr.security.AccessControlManager;
+import javax.jcr.security.AccessControlPolicy;
+import javax.jcr.security.AccessControlPolicyIterator;
+import javax.jcr.security.Privilege;
+import org.apache.jackrabbit.rmi.client.ClientObject;
+import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
+import org.apache.jackrabbit.rmi.client.RemoteRepositoryException;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager;
+
+/**
+ * Local adapter for the JCR-RMI {@link RemoteAccessControlManager
+ * RemoteAccessControlManager} interface. This class makes a remote
+ * AccessControlManager locally available using the JCR
+ * {@link AccessControlManager AccessControlManager} interface.
+ *
+ * @see javax.jcr.security.AccessControlManager
+ * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager
+ */
+public class ClientAccessControlManager extends ClientObject implements
+        AccessControlManager {
+
+    private final RemoteAccessControlManager racm;
+
+    public ClientAccessControlManager(final RemoteAccessControlManager racm,
+            final LocalAdapterFactory factory) {
+        super(factory);
+        this.racm = racm;
+    }
+
+    /** {@inheritDoc} */
+    public AccessControlPolicyIterator getApplicablePolicies(String absPath)
+            throws RepositoryException {
+        try {
+            return getFactory().getAccessControlPolicyIterator(
+                racm.getApplicablePolicies(absPath));
+        } catch (RemoteException re) {
+            throw new RemoteRepositoryException(re);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public AccessControlPolicy[] getEffectivePolicies(String absPath)
+            throws PathNotFoundException, AccessDeniedException,
+            RepositoryException {
+        try {
+            return getFactory().getAccessControlPolicy(
+                racm.getEffectivePolicies(absPath));
+        } catch (RemoteException ex) {
+            throw new RemoteRepositoryException(ex);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public AccessControlPolicy[] getPolicies(String absPath)
+            throws PathNotFoundException, AccessDeniedException,
+            RepositoryException {
+        try {
+            return getFactory().getAccessControlPolicy(
+                racm.getPolicies(absPath));
+        } catch (RemoteException ex) {
+            throw new RemoteRepositoryException(ex);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public Privilege[] getPrivileges(String absPath)
+            throws PathNotFoundException, RepositoryException {
+        try {
+            return getFactory().getPrivilege(racm.getPrivileges(absPath));
+        } catch (RemoteException ex) {
+            throw new RemoteRepositoryException(ex);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public Privilege[] getSupportedPrivileges(String absPath)
+            throws PathNotFoundException, RepositoryException {
+        try {
+            return getFactory().getPrivilege(
+                racm.getSupportedPrivileges(absPath));
+        } catch (RemoteException ex) {
+            throw new RemoteRepositoryException(ex);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public boolean hasPrivileges(String absPath, Privilege[] privileges)
+            throws PathNotFoundException, RepositoryException {
+        String[] privNames = new String[privileges.length];
+        for (int i = 0; i < privNames.length; i++) {
+            privNames[i] = privileges[i].getName();
+        }
+
+        try {
+            return racm.hasPrivileges(absPath, privNames);
+        } catch (RemoteException ex) {
+            throw new RemoteRepositoryException(ex);
+        }
+
+    }
+
+    /** {@inheritDoc} */
+    public Privilege privilegeFromName(String privilegeName)
+            throws AccessControlException, RepositoryException {
+        try {
+            return getFactory().getPrivilege(
+                racm.privilegeFromName(privilegeName));
+        } catch (RemoteException ex) {
+            throw new RemoteRepositoryException(ex);
+        }
+    }
+
+    /**
+     * @throws UnsupportedRepositoryOperationException This method is not
+     *             implemented yet
+     */
+    public void removePolicy(String absPath, AccessControlPolicy policy)
+            throws UnsupportedRepositoryOperationException {
+        // TODO: implement client side of the story
+        throw new UnsupportedRepositoryOperationException("removePolicy");
+    }
+
+    /**
+     * @throws UnsupportedRepositoryOperationException This method is not
+     *             implemented yet
+     */
+    public void setPolicy(String absPath, AccessControlPolicy policy)
+            throws UnsupportedRepositoryOperationException {
+        // TODO: implement client side of the story
+        throw new UnsupportedRepositoryOperationException("setPolicy");
+    }
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.rmi.client.security;
+
+import javax.jcr.security.AccessControlPolicy;
+import org.apache.jackrabbit.rmi.client.ClientObject;
+import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy;
+
+/**
+ * Local adapter for the JCR-RMI {@link RemoteAccessControlPolicy
+ * RemoteAccessControlPolicy} interface. This class makes a remote
+ * AccessControlPolicy locally available using the JCR
+ * {@link AccessControlPolicy AccessControlPolicy} interface.
+ *
+ * @see javax.jcr.security.AccessControlPolicy
+ * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy
+ */
+public class ClientAccessControlPolicy extends ClientObject implements
+        AccessControlPolicy {
+
+    private final RemoteAccessControlPolicy racp;
+
+    public ClientAccessControlPolicy(final RemoteAccessControlPolicy racp,
+            final LocalAdapterFactory factory) {
+        super(factory);
+        this.racp = racp;
+    }
+
+    RemoteAccessControlPolicy getRemoteAccessControlPolicy() {
+        return racp;
+    }
+
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.rmi.client.security;
+
+import javax.jcr.security.AccessControlPolicy;
+import javax.jcr.security.AccessControlPolicyIterator;
+
+import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
+import org.apache.jackrabbit.rmi.client.iterator.ClientIterator;
+import org.apache.jackrabbit.rmi.remote.RemoteIterator;
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList;
+
+/**
+ * A ClientIterator for iterating remote access control policies.
+ */
+public class ClientAccessControlPolicyIterator extends ClientIterator implements
+        AccessControlPolicyIterator {
+
+    public ClientAccessControlPolicyIterator(RemoteIterator iterator,
+            LocalAdapterFactory factory) {
+        super(iterator, factory);
+    }
+
+    /** {@inheritDoc} */
+    protected Object getObject(Object remote) {
+        return getFactory().getAccessControlPolicy(
+            (RemoteAccessControlList) remote);
+    }
+
+    /** {@inheritDoc} */
+    public AccessControlPolicy nextAccessControlPolicy() {
+        return (AccessControlPolicy) next();
+    }
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.rmi.client.security;
+
+import java.rmi.RemoteException;
+
+import javax.jcr.security.Privilege;
+
+import org.apache.jackrabbit.rmi.client.ClientObject;
+import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
+import org.apache.jackrabbit.rmi.client.RemoteRuntimeException;
+import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege;
+
+/**
+ * Local adapter for the JCR-RMI {@link RemotePrivilege RemotePrivilege}
+ * interface. This class makes a remote Privilege locally available using the
+ * JCR {@link Privilege Privilege} interface.
+ *
+ * @see javax.jcr.security.Privilege
+ * @see org.apache.jackrabbit.rmi.remote.security.RemotePrivilege
+ */
+public class ClientPrivilege extends ClientObject implements Privilege {
+
+    private final RemotePrivilege rp;
+
+    public ClientPrivilege(final RemotePrivilege rp,
+            final LocalAdapterFactory factory) {
+        super(factory);
+        this.rp = rp;
+    }
+
+    /** {@inheritDoc} */
+    public Privilege[] getAggregatePrivileges() {
+        try {
+            return getFactory().getPrivilege(rp.getAggregatePrivileges());
+        } catch (RemoteException re) {
+            throw new RemoteRuntimeException(re);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public Privilege[] getDeclaredAggregatePrivileges() {
+        try {
+            return getFactory().getPrivilege(
+                rp.getDeclaredAggregatePrivileges());
+        } catch (RemoteException re) {
+            throw new RemoteRuntimeException(re);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public String getName() {
+        try {
+            return rp.getName();
+        } catch (RemoteException re) {
+            throw new RemoteRuntimeException(re);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public boolean isAbstract() {
+        try {
+            return rp.isAbstract();
+        } catch (RemoteException re) {
+            throw new RemoteRuntimeException(re);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public boolean isAggregate() {
+        try {
+            return rp.isAggregate();
+        } catch (RemoteException re) {
+            throw new RemoteRuntimeException(re);
+        }
+    }
+
+    public boolean equals(Object obj) {
+        if (obj == this) {
+            return true;
+        } else if (obj == null) {
+            return false;
+        }
+
+        if (obj instanceof Privilege) {
+            return getName().equals(((Privilege) obj).getName());
+        }
+
+        return false;
+    }
+
+    public int hashCode() {
+        return getName().hashCode();
+    }
+
+    RemotePrivilege getRemotePrivilege() {
+        return rp;
+    }
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Modified: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java?rev=925218&r1=925217&r2=925218&view=diff
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java (original)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java Fri Mar 19 13:55:06 2010
@@ -19,10 +19,11 @@ package org.apache.jackrabbit.rmi.remote
 import java.io.IOException;
 import java.rmi.Remote;
 import java.rmi.RemoteException;
-import java.security.AccessControlException;
-
 import javax.jcr.Credentials;
 import javax.jcr.RepositoryException;
+import javax.jcr.UnsupportedRepositoryOperationException;
+
+import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager;
 
 /**
  * Remote version of the JCR {@link javax.jcr.Session Session} interface.
@@ -445,4 +446,17 @@ public interface RemoteSession extends R
     byte[] exportDocumentView(String path, boolean skipBinary, boolean noRecurse)
         throws IOException, RepositoryException, RemoteException;
 
+    /**
+     * Remote version of the {@link javax.jcr.Session#getAccessControlManager()
+     * Session.getAccessControlManager()} method.
+     *
+     * @throws UnsupportedRepositoryOperationException if the remote session
+     *             does not support this method
+     * @throws RepositoryException if an error occurred getting the access
+     *             control manager
+     * @throws RemoteException on RMI errors
+     */
+    RemoteAccessControlManager getAccessControlManager()
+            throws UnsupportedRepositoryOperationException,
+            RepositoryException, RemoteException;
 }

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.rmi.remote.principal;
+
+import java.rmi.RemoteException;
+import org.apache.jackrabbit.rmi.remote.RemoteIterator;
+
+/**
+ * Remote version of the JCR {@link java.security.acl.Group Group} interface.
+ * Used by the {@link org.apache.jackrabbit.rmi.server.principal.ServerGroup
+ * ServerGroup} and
+ * {@link org.apache.jackrabbit.rmi.client.principal.ClientGroup ClientGroup}
+ * adapter base classes to provide transparent RMI access to remote item
+ * definitions.
+ * <p>
+ * The methods in this interface are documented only with a reference to a
+ * corresponding Group method. The remote object will simply forward the method
+ * call to the underlying Group instance. Argument and return values, as well as
+ * possible exceptions, are copied over the network. Complex return values are
+ * returned as remote references to the corresponding remote interface. RMI
+ * errors are signaled with RemoteExceptions.
+ *
+ * @see java.security.acl.Group
+ * @see org.apache.jackrabbit.rmi.client.principal.ClientGroup
+ * @see org.apache.jackrabbit.rmi.server.principal.ServerGroup
+ */
+public interface RemoteGroup extends RemotePrincipal {
+
+    /**
+     * @see java.security.acl.Group#isMember(java.security.Principal)
+     */
+    boolean isMember(String member) throws RemoteException;
+
+    /**
+     * @see java.security.acl.Group#members()
+     */
+    RemoteIterator members() throws RemoteException;
+
+}
\ No newline at end of file

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.rmi.remote.principal;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * Remote version of the JCR {@link java.security.Principal Principal}
+ * interface. Used by the
+ * {@link org.apache.jackrabbit.rmi.server.principal.ServerPrincipal
+ * ServerPrincipal} and
+ * {@link org.apache.jackrabbit.rmi.client.principal.ClientPrincipal
+ * ClientPrincipal} adapter base classes to provide transparent RMI access to
+ * remote item definitions.
+ * <p>
+ * The methods in this interface are documented only with a reference to a
+ * corresponding Principal method. The remote object will simply forward the
+ * method call to the underlying Principal instance. Argument and return values,
+ * as well as possible exceptions, are copied over the network. Complex return
+ * values are returned as remote references to the corresponding remote
+ * interface. RMI errors are signaled with RemoteExceptions.
+ *
+ * @see java.security.Principal
+ * @see org.apache.jackrabbit.rmi.client.principal.ClientPrincipal
+ * @see org.apache.jackrabbit.rmi.server.principal.ServerPrincipal
+ */
+public interface RemotePrincipal extends Remote {
+
+    /**
+     * @see java.security.Principal#getName()
+     */
+    public String getName() throws RemoteException;
+
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.rmi.remote.security;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal;
+
+/**
+ * Remote version of the JCR {@link javax.jcr.security.AccessControlEntry
+ * AccessControlEntry} interface. Used by the
+ * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry
+ * ServerAccessControlEntry} and
+ * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry
+ * ClientAccessControlEntry} adapter base classes to provide transparent RMI
+ * access to remote item definitions.
+ * <p>
+ * The methods in this interface are documented only with a reference to a
+ * corresponding AccessControlEntry method. The remote object will simply
+ * forward the method call to the underlying AccessControlEntry instance.
+ * Argument and return values, as well as possible exceptions, are copied over
+ * the network. Complex return values are returned as remote references to the
+ * corresponding remote interface. RMI errors are signaled with
+ * RemoteExceptions.
+ *
+ * @see javax.jcr.security.AccessControlEntry
+ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry
+ * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry
+ */
+public interface RemoteAccessControlEntry extends Remote {
+
+    /**
+     * @see javax.jcr.security.AccessControlEntry#getPrincipal()
+     */
+    public RemotePrincipal getPrincipal() throws RemoteException;
+
+    /**
+     * @see javax.jcr.security.AccessControlEntry#getPrivileges()
+     */
+    public RemotePrivilege[] getPrivileges() throws RemoteException;
+
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.rmi.remote.security;
+
+import java.rmi.RemoteException;
+
+import javax.jcr.RepositoryException;
+
+/**
+ * Remote version of the JCR {@link javax.jcr.security.AccessControlList
+ * AccessControlList} interface. Used by the
+ * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlList
+ * ServerAccessControlList} and
+ * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlList
+ * ClientAccessControlList} adapter base classes to provide transparent RMI
+ * access to remote item definitions.
+ * <p>
+ * The methods in this interface are documented only with a reference to a
+ * corresponding AccessControlList method. The remote object will simply forward
+ * the method call to the underlying AccessControlList instance. Argument and
+ * return values, as well as possible exceptions, are copied over the network.
+ * Complex return values are returned as remote references to the corresponding
+ * remote interface. RMI errors are signaled with RemoteExceptions.
+ *
+ * @see javax.jcr.security.AccessControlList
+ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlList
+ * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlList
+ */
+public interface RemoteAccessControlList extends RemoteAccessControlPolicy {
+
+    /**
+     * @see javax.jcr.security.AccessControlList#getAccessControlEntries()
+     */
+    public RemoteAccessControlEntry[] getAccessControlEntries()
+            throws RepositoryException, RemoteException;
+
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.rmi.remote.security;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import javax.jcr.RepositoryException;
+import org.apache.jackrabbit.rmi.remote.RemoteIterator;
+
+/**
+ * Remote version of the JCR {@link javax.jcr.security.AccessControlManager
+ * AccessControlManager} interface. Used by the
+ * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager
+ * ServerAccessControlManager} and
+ * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager
+ * ClientAccessControlManager} adapter base classes to provide transparent RMI
+ * access to remote item definitions.
+ * <p>
+ * The methods in this interface are documented only with a reference to a
+ * corresponding AccessControlManager method. The remote object will simply
+ * forward the method call to the underlying AccessControlManager instance.
+ * Argument and return values, as well as possible exceptions, are copied over
+ * the network. Complex return values are returned as remote references to the
+ * corresponding remote interface. RMI errors are signaled with
+ * RemoteExceptions.
+ *
+ * @see javax.jcr.security.AccessControlManager
+ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager
+ * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager
+ */
+public interface RemoteAccessControlManager extends Remote {
+
+    /**
+     * @see javax.jcr.security.AccessControlManager#getApplicablePolicies(String)
+     */
+    public RemoteIterator getApplicablePolicies(String absPath)
+            throws RepositoryException, RemoteException;
+
+    /**
+     * @see javax.jcr.security.AccessControlManager#getEffectivePolicies(String)
+     */
+    public RemoteAccessControlPolicy[] getEffectivePolicies(String absPath)
+            throws RepositoryException, RemoteException;
+
+    /**
+     * @see javax.jcr.security.AccessControlManager#getPolicies(String)
+     */
+    public RemoteAccessControlPolicy[] getPolicies(String absPath)
+            throws RepositoryException, RemoteException;
+
+    /**
+     * @see javax.jcr.security.AccessControlManager#getPrivileges(String)
+     */
+    public RemotePrivilege[] getPrivileges(String absPath)
+            throws RepositoryException, RemoteException;
+
+    /**
+     * @see javax.jcr.security.AccessControlManager#getSupportedPrivileges(String)
+     */
+    public RemotePrivilege[] getSupportedPrivileges(String absPath)
+            throws RepositoryException, RemoteException;
+
+    /**
+     * @see javax.jcr.security.AccessControlManager#privilegeFromName(String)
+     */
+    public RemotePrivilege privilegeFromName(String privilegeName)
+            throws RepositoryException, RemoteException;
+
+    /**
+     * @see javax.jcr.security.AccessControlManager#hasPrivileges(String,
+     *      javax.jcr.security.Privilege[])
+     */
+    public boolean hasPrivileges(String absPath, String[] privileges)
+            throws RepositoryException, RemoteException;
+
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.rmi.remote.security;
+
+import java.rmi.Remote;
+
+/**
+ * Remote version of the JCR {@link javax.jcr.security.AccessControlPolicy
+ * AccessControlPolicy} interface. Used by the
+ * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy
+ * ServerAccessControlPolicy} and
+ * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy
+ * ClientAccessControlPolicy} adapter base classes to provide transparent RMI
+ * access to remote item definitions.
+ * <p>
+ * The methods in this interface are documented only with a reference to a
+ * corresponding AccessControlPolicy method. The remote object will simply
+ * forward the method call to the underlying AccessControlPolicy instance.
+ * Argument and return values, as well as possible exceptions, are copied over
+ * the network. Complex return values are returned as remote references to the
+ * corresponding remote interface. RMI errors are signaled with
+ * RemoteExceptions.
+ *
+ * @see javax.jcr.security.AccessControlPolicy
+ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy
+ * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy
+ */
+public interface RemoteAccessControlPolicy extends Remote {
+
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java?rev=925218&view=auto
==============================================================================
--- jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java (added)
+++ jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java Fri Mar 19 13:55:06 2010
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.rmi.remote.security;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * Remote version of the JCR {@link javax.jcr.security.Privilege Privilege}
+ * interface. Used by the
+ * {@link org.apache.jackrabbit.rmi.server.security.ServerPrivilege
+ * ServerPrivilege} and
+ * {@link org.apache.jackrabbit.rmi.client.security.ClientPrivilege
+ * ClientPrivilege} adapter base classes to provide transparent RMI access to
+ * remote item definitions.
+ * <p>
+ * The methods in this interface are documented only with a reference to a
+ * corresponding Privilege method. The remote object will simply forward the
+ * method call to the underlying Privilege instance. Argument and return values,
+ * as well as possible exceptions, are copied over the network. Complex return
+ * values are returned as remote references to the corresponding remote
+ * interface. RMI errors are signaled with RemoteExceptions.
+ *
+ * @see javax.jcr.security.Privilege
+ * @see org.apache.jackrabbit.rmi.client.security.ClientPrivilege
+ * @see org.apache.jackrabbit.rmi.server.security.ServerPrivilege
+ */
+public interface RemotePrivilege extends Remote {
+
+    /**
+     * @see javax.jcr.security.Privilege#getAggregatePrivileges()
+     */
+    public RemotePrivilege[] getAggregatePrivileges() throws RemoteException;
+
+    /**
+     * @see javax.jcr.security.Privilege#getDeclaredAggregatePrivileges()
+     */
+    public RemotePrivilege[] getDeclaredAggregatePrivileges()
+            throws RemoteException;
+
+    /**
+     * @see javax.jcr.security.Privilege#getName()
+     */
+    public String getName() throws RemoteException;
+
+    /**
+     * @see javax.jcr.security.Privilege#isAbstract()
+     */
+    public boolean isAbstract() throws RemoteException;
+
+    /**
+     * @see javax.jcr.security.Privilege#isAggregate()
+     */
+    public boolean isAggregate() throws RemoteException;
+}

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/commons/jcr-rmi/trunk/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url



Mime
View raw message