jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r161470 [2/2] - in incubator/jackrabbit/trunk/contrib/jcr-rmi/src: java/org/apache/jackrabbit/rmi/client/ java/org/apache/jackrabbit/rmi/iterator/ java/org/apache/jackrabbit/rmi/remote/ java/org/apache/jackrabbit/rmi/server/ java/org/apache/jackrabbit/rmi/xml/ test/org/apache/jackrabbit/test/rmi/
Date Fri, 15 Apr 2005 14:33:20 GMT
Added: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java?view=auto&rev=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java
(added)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java
Fri Apr 15 07:33:13 2005
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed 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.server;
+
+import java.rmi.RemoteException;
+
+import javax.jcr.nodetype.ItemDefinition;
+
+import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition;
+import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
+
+/**
+ * Remote adapter for the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDefinition}
+ * interface. This class makes a local item definition available as an
+ * RMI service using the
+ * {@link org.apache.jackrabbit.rmi.remote.RemoteItemDefinition RemoteItemDefinition}
+ * interface. Used mainly as the base class for the
+ * {@link org.apache.jackrabbit.rmi.server.ServerPropertyDefinition ServerPropertyDefinition}
+ * and
+ * {@link org.apache.jackrabbit.rmi.server.ServerNodeDefinition ServerNodeDefinition}
+ * adapters.
+ *
+ * @author Jukka Zitting
+ * @see javax.jcr.nodetype.ItemDefinition
+ * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition
+ */
+public class ServerItemDefinition extends ServerObject implements RemoteItemDefinition {
+
+    /** The adapted local item definition. */
+    private ItemDefinition def;
+
+    /**
+     * Creates a remote adapter for the given local item definition.
+     *
+     * @param def local item definition
+     * @param factory remote adapter factory
+     * @throws RemoteException on RMI errors
+     */
+    public ServerItemDefinition(ItemDefinition def, RemoteAdapterFactory factory)
+            throws RemoteException {
+        super(factory);
+        this.def = def;
+    }
+
+    /** {@inheritDoc} */
+    public RemoteNodeType getDeclaringNodeType() throws RemoteException {
+        return getFactory().getRemoteNodeType(def.getDeclaringNodeType());
+    }
+
+    /** {@inheritDoc} */
+    public String getName() throws RemoteException {
+        return def.getName();
+    }
+
+    /** {@inheritDoc} */
+    public boolean isAutoCreated() throws RemoteException {
+        return def.isAutoCreated();
+    }
+
+    /** {@inheritDoc} */
+    public boolean isMandatory() throws RemoteException {
+        return def.isMandatory();
+    }
+
+    /** {@inheritDoc} */
+    public int getOnParentVersion() throws RemoteException {
+        return def.getOnParentVersion();
+    }
+
+    /** {@inheritDoc} */
+    public boolean isProtected() throws RemoteException {
+        return def.isProtected();
+    }
+
+}

Propchange: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java
------------------------------------------------------------------------------
    svn = 

Propchange: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerLock.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerLock.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerLock.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerLock.java
Fri Apr 15 07:33:13 2005
@@ -65,7 +65,7 @@
     }
 
     /** {@inheritDoc} */
-    public boolean isLive() throws RemoteException {
+    public boolean isLive() throws RepositoryException, RemoteException {
         return lock.isLive();
     }
 
@@ -74,4 +74,7 @@
         lock.refresh();
     }
 
+    public boolean isSessionScoped() throws RemoteException {
+        return lock.isSessionScoped();
+    }
 }

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNode.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNode.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNode.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNode.java
Fri Apr 15 07:33:13 2005
@@ -29,7 +29,7 @@
 import org.apache.jackrabbit.rmi.remote.RemoteItem;
 import org.apache.jackrabbit.rmi.remote.RemoteLock;
 import org.apache.jackrabbit.rmi.remote.RemoteNode;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeDef;
+import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition;
 import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
 import org.apache.jackrabbit.rmi.remote.RemoteProperty;
 import org.apache.jackrabbit.rmi.remote.RemoteVersion;
@@ -250,6 +250,16 @@
     }
 
     /** {@inheritDoc} */
+    public RemoteProperty setProperty(String name, Value value, int type)
+            throws RepositoryException, RemoteException {
+        try {
+            return getFactory().getRemoteProperty(node.setProperty(name, value, type));
+        } catch (RepositoryException ex) {
+            throw getRepositoryException(ex);
+        }
+    }
+
+    /** {@inheritDoc} */
     public void addMixin(String name)
             throws RepositoryException, RemoteException {
         try {
@@ -301,10 +311,10 @@
     }
 
     /** {@inheritDoc} */
-    public RemoteNodeDef getDefinition()
+    public RemoteNodeDefinition getDefinition()
             throws RepositoryException, RemoteException {
         try {
-            return getFactory().getRemoteNodeDef(node.getDefinition());
+            return getFactory().getRemoteNodeDefinition(node.getDefinition());
         } catch (RepositoryException ex) {
             throw getRepositoryException(ex);
         }
@@ -348,10 +358,10 @@
     }
 
     /** {@inheritDoc} */
-    public void merge(String workspace, boolean bestEffort)
+    public RemoteNode[] merge(String workspace, boolean bestEffort)
             throws RepositoryException, RemoteException {
         try {
-            node.merge(workspace, bestEffort);
+            return getRemoteNodeArray(node.merge(workspace, bestEffort));
         } catch (RepositoryException ex) {
             throw getRepositoryException(ex);
         }

Added: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java?view=auto&rev=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java
(added)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java
Fri Apr 15 07:33:13 2005
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed 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.server;
+
+import java.rmi.RemoteException;
+
+import javax.jcr.nodetype.NodeDefinition;
+
+import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition;
+import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
+
+/**
+ * Remote adapter for the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDefinition}
+ * interface. This class makes a local node definition available as an
+ * RMI service using the
+ * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition RemoteNodeDefinition}
+ * interface.
+ *
+ * @author Jukka Zitting
+ * @see javax.jcr.nodetype.NodeDefinition
+ * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition
+ */
+public class ServerNodeDefinition extends ServerItemDefinition implements RemoteNodeDefinition
{
+
+    /** The adapted node definition. */
+    private NodeDefinition def;
+
+    /**
+     * Creates a remote adapter for the given local node definition.
+     *
+     * @param def local node definition
+     * @param factory remote adapter factory
+     * @throws RemoteException on RMI errors
+     */
+    public ServerNodeDefinition(NodeDefinition def, RemoteAdapterFactory factory)
+            throws RemoteException {
+        super(def, factory);
+        this.def = def;
+    }
+
+    /** {@inheritDoc} */
+    public RemoteNodeType[] getRequiredPrimaryTypes() throws RemoteException {
+        return getRemoteNodeTypeArray(def.getRequiredPrimaryTypes());
+    }
+
+    /** {@inheritDoc} */
+    public RemoteNodeType getDefaultPrimaryType() throws RemoteException {
+        return getFactory().getRemoteNodeType(def.getDefaultPrimaryType());
+    }
+
+    /** {@inheritDoc} */
+    public boolean allowsSameNameSiblings() throws RemoteException {
+        return def.allowsSameNameSiblings();
+    }
+
+}

Propchange: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java
------------------------------------------------------------------------------
    svn = 

Propchange: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java
Fri Apr 15 07:33:13 2005
@@ -20,11 +20,11 @@
 
 import javax.jcr.Value;
 import javax.jcr.nodetype.NodeType;
-import javax.jcr.nodetype.PropertyDef;
+import javax.jcr.nodetype.PropertyDefinition;
 
-import org.apache.jackrabbit.rmi.remote.RemoteNodeDef;
+import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition;
 import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
-import org.apache.jackrabbit.rmi.remote.RemotePropertyDef;
+import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition;
 
 /**
  * Remote adapter for the JCR {@link javax.jcr.nodetype.NodeType NodeType}
@@ -86,26 +86,26 @@
     }
 
     /** {@inheritDoc} */
-    public RemotePropertyDef[] getPropertyDefs() throws RemoteException {
-        PropertyDef[] defs = type.getPropertyDefs();
+    public RemotePropertyDefinition[] getPropertyDefs() throws RemoteException {
+        PropertyDefinition[] defs = type.getPropertyDefinitions();
         return getRemotePropertyDefArray(defs);
     }
 
     /** {@inheritDoc} */
-    public RemotePropertyDef[] getDeclaredPropertyDefs()
+    public RemotePropertyDefinition[] getDeclaredPropertyDefs()
             throws RemoteException {
-        PropertyDef[] defs = type.getDeclaredPropertyDefs();
+        PropertyDefinition[] defs = type.getDeclaredPropertyDefinitions();
         return getRemotePropertyDefArray(defs);
     }
 
     /** {@inheritDoc} */
-    public RemoteNodeDef[] getChildNodeDefs() throws RemoteException {
-        return getRemoteNodeDefArray(type.getChildNodeDefs());
+    public RemoteNodeDefinition[] getChildNodeDefs() throws RemoteException {
+        return getRemoteNodeDefArray(type.getChildNodeDefinitions());
     }
 
     /** {@inheritDoc} */
-    public RemoteNodeDef[] getDeclaredChildNodeDefs() throws RemoteException {
-        return getRemoteNodeDefArray(type.getDeclaredChildNodeDefs());
+    public RemoteNodeDefinition[] getDeclaredChildNodeDefs() throws RemoteException {
+        return getRemoteNodeDefArray(type.getDeclaredChildNodeDefinitions());
     }
 
     /** {@inheritDoc} */

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerObject.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerObject.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerObject.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerObject.java
Fri Apr 15 07:33:13 2005
@@ -41,10 +41,10 @@
 import javax.jcr.lock.LockException;
 import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.nodetype.NodeDef;
 import javax.jcr.nodetype.NodeType;
 import javax.jcr.nodetype.NodeTypeIterator;
-import javax.jcr.nodetype.PropertyDef;
+import javax.jcr.nodetype.PropertyDefinition;
+import javax.jcr.nodetype.NodeDefinition;
 import javax.jcr.query.InvalidQueryException;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionException;
@@ -53,10 +53,10 @@
 
 import org.apache.jackrabbit.rmi.remote.RemoteItem;
 import org.apache.jackrabbit.rmi.remote.RemoteNode;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeDef;
+import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition;
 import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
 import org.apache.jackrabbit.rmi.remote.RemoteProperty;
-import org.apache.jackrabbit.rmi.remote.RemotePropertyDef;
+import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition;
 import org.apache.jackrabbit.rmi.remote.RemoteVersion;
 
 /**
@@ -350,16 +350,16 @@
      * @return remote node definition array
      * @throws RemoteException on RMI errors
      */
-    protected RemoteNodeDef[] getRemoteNodeDefArray(NodeDef[] defs)
+    protected RemoteNodeDefinition[] getRemoteNodeDefArray(NodeDefinition[] defs)
             throws RemoteException {
         if (defs != null) {
-            RemoteNodeDef[] remotes = new RemoteNodeDef[defs.length];
+            RemoteNodeDefinition[] remotes = new RemoteNodeDefinition[defs.length];
             for (int i = 0; i < defs.length; i++) {
-                remotes[i] = factory.getRemoteNodeDef(defs[i]);
+                remotes[i] = factory.getRemoteNodeDefinition(defs[i]);
             }
             return remotes;
         } else {
-            return new RemoteNodeDef[0]; // for safety
+            return new RemoteNodeDefinition[0]; // for safety
         }
     }
 
@@ -374,16 +374,16 @@
      * @return remote property definition array
      * @throws RemoteException on RMI errors
      */
-    protected RemotePropertyDef[] getRemotePropertyDefArray(PropertyDef[] defs)
+    protected RemotePropertyDefinition[] getRemotePropertyDefArray(PropertyDefinition[] defs)
             throws RemoteException {
         if (defs != null) {
-            RemotePropertyDef[] remotes = new RemotePropertyDef[defs.length];
+            RemotePropertyDefinition[] remotes = new RemotePropertyDefinition[defs.length];
             for (int i = 0; i < defs.length; i++) {
-                remotes[i] = factory.getRemotePropertyDef(defs[i]);
+                remotes[i] = factory.getRemotePropertyDefinition(defs[i]);
             }
             return remotes;
         } else {
-            return new RemotePropertyDef[0]; // for safety
+            return new RemotePropertyDefinition[0]; // for safety
         }
     }
 

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerProperty.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerProperty.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerProperty.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerProperty.java
Fri Apr 15 07:33:13 2005
@@ -23,7 +23,7 @@
 import javax.jcr.Value;
 
 import org.apache.jackrabbit.rmi.remote.RemoteProperty;
-import org.apache.jackrabbit.rmi.remote.RemotePropertyDef;
+import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition;
 import org.apache.jackrabbit.rmi.remote.SerialValue;
 
 /**
@@ -112,10 +112,10 @@
     }
 
     /** {@inheritDoc} */
-    public RemotePropertyDef getDefinition()
+    public RemotePropertyDefinition getDefinition()
             throws RepositoryException, RemoteException {
         try {
-            return getFactory().getRemotePropertyDef(property.getDefinition());
+            return getFactory().getRemotePropertyDefinition(property.getDefinition());
         } catch (RepositoryException ex) {
             throw getRepositoryException(ex);
         }

Added: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java?view=auto&rev=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java
(added)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java
Fri Apr 15 07:33:13 2005
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed 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.server;
+
+import java.rmi.RemoteException;
+
+import javax.jcr.Value;
+import javax.jcr.nodetype.PropertyDefinition;
+
+import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition;
+import org.apache.jackrabbit.rmi.remote.SerialValue;
+
+/**
+ * Remote adapter for the JCR
+ * {@link javax.jcr.nodetype.PropertyDefinition PropertyDefinition} interface. This
+ * class makes a local property definition available as an RMI service
+ * using the
+ * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition}
+ * interface.
+ *
+ * @author Jukka Zitting
+ * @see javax.jcr.nodetype.PropertyDefinition
+ * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition
+ */
+public class ServerPropertyDefinition extends ServerItemDefinition
+        implements RemotePropertyDefinition {
+
+    /** The adapted local property definition. */
+    private PropertyDefinition def;
+
+    /**
+     * Creates a remote adapter for the given local property definition.
+     *
+     * @param def local property definition
+     * @param factory remote adapter factory
+     * @throws RemoteException on RMI errors
+     */
+    public ServerPropertyDefinition(PropertyDefinition def, RemoteAdapterFactory factory)
+            throws RemoteException {
+        super(def, factory);
+        this.def = def;
+    }
+
+    /** {@inheritDoc} */
+    public int getRequiredType() throws RemoteException {
+        return def.getRequiredType();
+    }
+
+    /** {@inheritDoc} */
+    public String[] getValueConstraints() throws RemoteException {
+        return def.getValueConstraints();
+    }
+
+    /** {@inheritDoc} */
+    public Value[] getDefaultValues() throws RemoteException {
+        return SerialValue.makeSerialValueArray(def.getDefaultValues());
+    }
+
+    /** {@inheritDoc} */
+    public boolean isMultiple() throws RemoteException {
+        return def.isMultiple();
+    }
+
+}

Propchange: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java
------------------------------------------------------------------------------
    svn = 

Propchange: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQuery.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQuery.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQuery.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQuery.java
Fri Apr 15 07:33:13 2005
@@ -23,6 +23,7 @@
 
 import org.apache.jackrabbit.rmi.remote.RemoteQuery;
 import org.apache.jackrabbit.rmi.remote.RemoteQueryResult;
+import org.apache.jackrabbit.rmi.remote.RemoteNode;
 
 /**
  * Remote adapter for the JCR {@link javax.jcr.query.Query Query} interface.
@@ -69,14 +70,15 @@
     }
 
     /** {@inheritDoc} */
-    public String getPersistentQueryPath()
+    public String getStoredQueryPath()
             throws RepositoryException, RemoteException {
-        return query.getPersistentQueryPath();
+        return query.getStoredQueryPath();
     }
 
     /** {@inheritDoc} */
-    public void save(String absPath)
+    public RemoteNode storeAsNode(String absPath)
             throws RepositoryException, RemoteException {
-        query.save(absPath);
+        return getRemoteNode(query.storeAsNode(absPath));
     }
+
 }

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java
Fri Apr 15 07:33:13 2005
@@ -57,9 +57,9 @@
     }
 
     /** {@inheritDoc} */
-    public String[] getPropertyNames()
+    public String[] getColumnNames()
             throws RepositoryException, RemoteException {
-        return result.getPropertyNames();
+        return result.getColumnNames();
     }
 
     /** {@inheritDoc} */

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerSession.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerSession.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerSession.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerSession.java
Fri Apr 15 07:33:13 2005
@@ -60,8 +60,8 @@
     }
 
     /** {@inheritDoc} */
-    public String getUserId() throws RemoteException {
-        return session.getUserId();
+    public String getUserID() throws RemoteException {
+        return session.getUserID();
     }
 
     /** {@inheritDoc} */
@@ -92,7 +92,7 @@
 
     /** {@inheritDoc} */
     public void checkPermission(String path, String actions)
-            throws AccessControlException, RemoteException {
+            throws AccessControlException, RepositoryException, RemoteException {
         session.checkPermission(path, actions);
     }
 
@@ -137,7 +137,7 @@
     }
 
     /** {@inheritDoc} */
-    public boolean itemExists(String path) throws RemoteException {
+    public boolean itemExists(String path) throws RepositoryException, RemoteException {
         return session.itemExists(path);
     }
 
@@ -216,10 +216,15 @@
     }
 
     /** {@inheritDoc} */
-    public void importXML(String path, byte[] xml)
+    public boolean isLive() throws RemoteException {
+        return session.isLive();
+    }
+
+    /** {@inheritDoc} */
+    public void importXML(String path, byte[] xml, int mode)
             throws IOException, RepositoryException, RemoteException {
         try {
-            session.importXML(path, new ByteArrayInputStream(xml));
+            session.importXML(path, new ByteArrayInputStream(xml), mode);
         } catch (RepositoryException ex) {
             throw getRepositoryException(ex);
         }
@@ -241,12 +246,12 @@
     }
 
     /** {@inheritDoc} */
-    public byte[] exportDocView(
+    public byte[] exportDocumentView(
             String path, boolean binaryAsLink, boolean noRecurse)
             throws IOException, RepositoryException, RemoteException {
         try {
             ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-            session.exportDocView(path, buffer, binaryAsLink, noRecurse);
+            session.exportDocumentView(path, buffer, binaryAsLink, noRecurse);
             return buffer.toByteArray();
         } catch (RepositoryException ex) {
             throw getRepositoryException(ex);
@@ -254,12 +259,12 @@
     }
 
     /** {@inheritDoc} */
-    public byte[] exportSysView(
+    public byte[] exportSystemView(
             String path, boolean binaryAsLink, boolean noRecurse)
             throws IOException, RepositoryException, RemoteException {
         try {
             ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-            session.exportSysView(path, buffer, binaryAsLink, noRecurse);
+            session.exportSystemView(path, buffer, binaryAsLink, noRecurse);
             return buffer.toByteArray();
         } catch (RepositoryException ex) {
             throw getRepositoryException(ex);

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerVersion.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerVersion.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerVersion.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerVersion.java
Fri Apr 15 07:33:13 2005
@@ -23,6 +23,7 @@
 import javax.jcr.version.Version;
 
 import org.apache.jackrabbit.rmi.remote.RemoteVersion;
+import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory;
 
 /**
  * Remote adapter for the JCR {@link javax.jcr.version.Version Version} interface.
@@ -84,6 +85,15 @@
     public RemoteVersion[] getPredecessors() throws RepositoryException, RemoteException
{
         try {
             return getRemoteVersionArray(version.getPredecessors());
+        } catch (RepositoryException ex) {
+            throw getRepositoryException(ex);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public RemoteVersionHistory getContainingHistory() throws RepositoryException, RemoteException
{
+        try {
+            return getFactory().getRemoteVersionHistory(version.getContainingHistory());
         } catch (RepositoryException ex) {
             throw getRepositoryException(ex);
         }

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java
Fri Apr 15 07:33:13 2005
@@ -128,7 +128,7 @@
     }
 
     /** {@inheritDoc} */
-    public boolean hasVersionLabel(String label) throws RemoteException {
+    public boolean hasVersionLabel(String label) throws RepositoryException, RemoteException
{
         return versionHistory.hasVersionLabel(label);
     }
 
@@ -144,7 +144,7 @@
     }
 
     /** {@inheritDoc} */
-    public String[] getVersionLabels() throws RemoteException {
+    public String[] getVersionLabels() throws RepositoryException, RemoteException {
         return versionHistory.getVersionLabels();
     }
 
@@ -170,5 +170,10 @@
         } catch (RepositoryException ex) {
             throw getRepositoryException(ex);
         }
+    }
+
+    /** {@inheritDoc} */
+    public String getVersionableUUID() throws RepositoryException, RemoteException {
+        return versionHistory.getVersionableUUID();
     }
 }

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/xml/SessionImportContentHandler.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/xml/SessionImportContentHandler.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/xml/SessionImportContentHandler.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/xml/SessionImportContentHandler.java
Fri Apr 15 07:33:13 2005
@@ -24,9 +24,9 @@
 /**
  * SAX content handler for importing XML data to a JCR {@link Session Session}.
  * This utility class can be used to implement the
- * {@link Session#getImportContentHandler(String) Session.getImportContentHandler(String)}
+ * {@link Session#getImportContentHandler(String, int) Session.getImportContentHandler(String,
int)}
  * method in terms of the
- * {@link Session#importXML(String, java.io.InputStream) Session.importXML(String, InputStream)}
+ * {@link Session#importXML(String, java.io.InputStream, int) Session.importXML(String, InputStream,
int)}
  * method.
  *
  * @author Jukka Zitting
@@ -39,6 +39,9 @@
     /** The import content path. */
     private String path;
 
+    /** The uuid behaviour mode */
+    private int mode;
+
     /**
      * Creates a SAX content handler for importing XML data to the given
      * session and path.
@@ -46,20 +49,21 @@
      * @param session repository session
      * @param path import content path
      */
-    public SessionImportContentHandler(Session session, String path) {
+    public SessionImportContentHandler(Session session, String path, int mode) {
         this.session = session;
         this.path = path;
+        this.mode = mode;
     }
 
     /**
      * Imports the serialized XML stream using the standard
-     * {@link Session#importXML(String, java.io.InputStream) Session.importXML(String, InputStream)}
+     * {@link Session#importXML(String, java.io.InputStream, int) Session.importXML(String,
InputStream, int)}
      * method.
      *
      * {@inheritDoc}
      */
     protected void importXML(byte[] xml) throws Exception {
-        session.importXML(path, new ByteArrayInputStream(xml));
+        session.importXML(path, new ByteArrayInputStream(xml), mode);
     }
 
 }

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/test/org/apache/jackrabbit/test/rmi/RemoteAdapterTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/test/org/apache/jackrabbit/test/rmi/RemoteAdapterTest.java?view=diff&r1=161469&r2=161470
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/test/org/apache/jackrabbit/test/rmi/RemoteAdapterTest.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/test/org/apache/jackrabbit/test/rmi/RemoteAdapterTest.java
Fri Apr 15 07:33:13 2005
@@ -29,11 +29,11 @@
 import javax.jcr.Session;
 import javax.jcr.Workspace;
 import javax.jcr.lock.Lock;
-import javax.jcr.nodetype.ItemDef;
-import javax.jcr.nodetype.NodeDef;
 import javax.jcr.nodetype.NodeType;
 import javax.jcr.nodetype.NodeTypeManager;
-import javax.jcr.nodetype.PropertyDef;
+import javax.jcr.nodetype.ItemDefinition;
+import javax.jcr.nodetype.NodeDefinition;
+import javax.jcr.nodetype.PropertyDefinition;
 import javax.jcr.query.Query;
 import javax.jcr.query.QueryManager;
 import javax.jcr.query.QueryResult;
@@ -46,15 +46,15 @@
 import org.apache.jackrabbit.rmi.client.ClientAdapterFactory;
 import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
 import org.apache.jackrabbit.rmi.remote.RemoteItem;
-import org.apache.jackrabbit.rmi.remote.RemoteItemDef;
+import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition;
 import org.apache.jackrabbit.rmi.remote.RemoteLock;
 import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry;
 import org.apache.jackrabbit.rmi.remote.RemoteNode;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeDef;
+import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition;
 import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
 import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager;
 import org.apache.jackrabbit.rmi.remote.RemoteProperty;
-import org.apache.jackrabbit.rmi.remote.RemotePropertyDef;
+import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition;
 import org.apache.jackrabbit.rmi.remote.RemoteQuery;
 import org.apache.jackrabbit.rmi.remote.RemoteQueryManager;
 import org.apache.jackrabbit.rmi.remote.RemoteQueryResult;
@@ -380,11 +380,11 @@
      * @throws Exception on errors
      */
     public void testItemDef() throws Exception {
-        prepareTests(ItemDef.class);
+        prepareTests(ItemDefinition.class);
 
-        ItemDef def = (ItemDef) mock;
-        RemoteItemDef remote = remoteFactory.getRemoteItemDef(def);
-        ItemDef local = localFactory.getItemDef(remote);
+        ItemDefinition def = (ItemDefinition) mock;
+        RemoteItemDefinition remote = remoteFactory.getRemoteItemDefinition(def);
+        ItemDefinition local = localFactory.getItemDef(remote);
 
         runTests(local);
     }
@@ -395,11 +395,11 @@
      * @throws Exception on errors
      */
     public void testNodeDef() throws Exception {
-        prepareTests(NodeDef.class);
+        prepareTests(NodeDefinition.class);
 
-        NodeDef def = (NodeDef) mock;
-        RemoteNodeDef remote = remoteFactory.getRemoteNodeDef(def);
-        NodeDef local = localFactory.getNodeDef(remote);
+        NodeDefinition def = (NodeDefinition) mock;
+        RemoteNodeDefinition remote = remoteFactory.getRemoteNodeDefinition(def);
+        NodeDefinition local = localFactory.getNodeDef(remote);
 
         runTests(local);
     }
@@ -410,11 +410,11 @@
      * @throws Exception on errors
      */
     public void testPropertyDef() throws Exception {
-        prepareTests(PropertyDef.class);
+        prepareTests(PropertyDefinition.class);
 
-        PropertyDef def = (PropertyDef) mock;
-        RemotePropertyDef remote = remoteFactory.getRemotePropertyDef(def);
-        PropertyDef local = localFactory.getPropertyDef(remote);
+        PropertyDefinition def = (PropertyDefinition) mock;
+        RemotePropertyDefinition remote = remoteFactory.getRemotePropertyDefinition(def);
+        PropertyDefinition local = localFactory.getPropertyDef(remote);
 
         runTests(local);
     }



Mime
View raw message