jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r155801 [2/2] - in incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi: client/ server/
Date Tue, 01 Mar 2005 16:58:16 GMT
Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java?view=diff&r1=155800&r2=155801
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java
Tue Mar  1 08:58:09 2005
@@ -19,7 +19,6 @@
 import java.rmi.RemoteException;
 
 import javax.jcr.RepositoryException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
 import javax.jcr.nodetype.NodeTypeManager;
 
 import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
@@ -58,8 +57,8 @@
     }
 
     /** {@inheritDoc} */
-    public RemoteNodeType getNodeType(String name) throws
-            NoSuchNodeTypeException, RepositoryException, RemoteException {
+    public RemoteNodeType getNodeType(String name)
+            throws RepositoryException, RemoteException {
         try {
             return getFactory().getRemoteNodeType(manager.getNodeType(name));
         } catch (RepositoryException ex) {
@@ -68,8 +67,8 @@
     }
 
     /** {@inheritDoc} */
-    public RemoteNodeType[] getAllNodeTypes() throws RepositoryException,
-            RemoteException {
+    public RemoteNodeType[] getAllNodeTypes()
+            throws RepositoryException, RemoteException {
         try {
             return getRemoteNodeTypeArray(manager.getAllNodeTypes());
         } catch (RepositoryException ex) {
@@ -78,8 +77,8 @@
     }
 
     /** {@inheritDoc} */
-    public RemoteNodeType[] getPrimaryNodeTypes() throws RepositoryException,
-            RemoteException {
+    public RemoteNodeType[] getPrimaryNodeTypes()
+            throws RepositoryException, RemoteException {
         try {
             return getRemoteNodeTypeArray(manager.getPrimaryNodeTypes());
         } catch (RepositoryException ex) {
@@ -88,8 +87,8 @@
     }
 
     /** {@inheritDoc} */
-    public RemoteNodeType[] getMixinNodeTypes() throws RepositoryException,
-            RemoteException {
+    public RemoteNodeType[] getMixinNodeTypes()
+            throws RepositoryException, RemoteException {
         try {
             return getRemoteNodeTypeArray(manager.getMixinNodeTypes());
         } catch (RepositoryException ex) {

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=155800&r2=155801
==============================================================================
--- 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
Tue Mar  1 08:58:09 2005
@@ -203,15 +203,15 @@
      */
     protected RemoteNode[] getRemoteNodeArray(NodeIterator iterator)
             throws RemoteException {
-        if (iterator == null) {
+        if (iterator != null) {
+            RemoteNode[] remotes = new RemoteNode[(int) iterator.getSize()];
+            for (int i = 0; iterator.hasNext(); i++) {
+                remotes[i] = factory.getRemoteNode(iterator.nextNode());
+            }
+            return remotes;
+        } else {
             return new RemoteNode[0]; // for safety
         }
-
-        RemoteNode[] remotes = new RemoteNode[(int) iterator.getSize()];
-        for (int i = 0; iterator != null && iterator.hasNext(); i++) {
-            remotes[i] = factory.getRemoteNode(iterator.nextNode());
-        }
-        return remotes;
     }
 
     /**
@@ -227,15 +227,15 @@
      */
     protected RemoteNodeType[] getRemoteNodeTypeArray(NodeType[] types)
             throws RemoteException {
-        if (types == null) {
+        if (types != null) {
+            RemoteNodeType[] remotes = new RemoteNodeType[types.length];
+            for (int i = 0; i < types.length; i++) {
+                remotes[i] = factory.getRemoteNodeType(types[i]);
+            }
+            return remotes;
+        } else {
             return new RemoteNodeType[0]; // for safety
         }
-
-        RemoteNodeType[] remotes = new RemoteNodeType[types.length];
-        for (int i = 0; i < types.length; i++) {
-            remotes[i] = factory.getRemoteNodeType(types[i]);
-        }
-        return remotes;
     }
 
     /**
@@ -251,15 +251,16 @@
      */
     protected RemoteNodeType[] getRemoteNodeTypeArray(NodeTypeIterator iterator)
             throws RemoteException {
-        if (iterator == null) {
+        if (iterator != null) {
+            RemoteNodeType[] remotes =
+                new RemoteNodeType[(int) iterator.getSize()];
+            for (int i = 0; iterator.hasNext(); i++) {
+                remotes[i] = factory.getRemoteNodeType(iterator.nextNodeType());
+            }
+            return remotes;
+        } else {
             return new RemoteNodeType[0]; // for safety
         }
-
-        RemoteNodeType[] remotes = new RemoteNodeType[(int) iterator.getSize()];
-        for (int i = 0; iterator.hasNext(); i++) {
-            remotes[i] = factory.getRemoteNodeType(iterator.nextNodeType());
-        }
-        return remotes;
     }
 
     /**
@@ -275,15 +276,15 @@
      */
     protected RemoteNodeDef[] getRemoteNodeDefArray(NodeDef[] defs)
             throws RemoteException {
-        if (defs == null) {
+        if (defs != null) {
+            RemoteNodeDef[] remotes = new RemoteNodeDef[defs.length];
+            for (int i = 0; i < defs.length; i++) {
+                remotes[i] = factory.getRemoteNodeDef(defs[i]);
+            }
+            return remotes;
+        } else {
             return new RemoteNodeDef[0]; // for safety
         }
-
-        RemoteNodeDef[] remotes = new RemoteNodeDef[defs.length];
-        for (int i = 0; i < defs.length; i++) {
-            remotes[i] = factory.getRemoteNodeDef(defs[i]);
-        }
-        return remotes;
     }
 
     /**
@@ -299,15 +300,15 @@
      */
     protected RemotePropertyDef[] getRemotePropertyDefArray(PropertyDef[] defs)
             throws RemoteException {
-        if (defs == null) {
+        if (defs != null) {
+            RemotePropertyDef[] remotes = new RemotePropertyDef[defs.length];
+            for (int i = 0; i < defs.length; i++) {
+                remotes[i] = factory.getRemotePropertyDef(defs[i]);
+            }
+            return remotes;
+        } else {
             return new RemotePropertyDef[0]; // for safety
         }
-
-        RemotePropertyDef[] remotes = new RemotePropertyDef[defs.length];
-        for (int i = 0; i < defs.length; i++) {
-            remotes[i] = factory.getRemotePropertyDef(defs[i]);
-        }
-        return remotes;
     }
 
 }

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=155800&r2=155801
==============================================================================
--- 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
Tue Mar  1 08:58:09 2005
@@ -21,7 +21,6 @@
 import javax.jcr.Property;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
-import javax.jcr.ValueFormatException;
 
 import org.apache.jackrabbit.rmi.remote.RemoteProperty;
 import org.apache.jackrabbit.rmi.remote.RemotePropertyDef;
@@ -57,8 +56,7 @@
     }
 
     /** {@inheritDoc} */
-    public Value getValue() throws ValueFormatException, RepositoryException,
-            RemoteException {
+    public Value getValue() throws RepositoryException, RemoteException {
         try {
             return new SerialValue(property.getValue());
         } catch (RepositoryException ex) {
@@ -67,8 +65,7 @@
     }
 
     /** {@inheritDoc} */
-    public Value[] getValues() throws ValueFormatException,
-            RepositoryException, RemoteException {
+    public Value[] getValues() throws RepositoryException, RemoteException {
         try {
             return SerialValue.makeSerialValueArray(property.getValues());
         } catch (RepositoryException ex) {
@@ -77,8 +74,8 @@
     }
 
     /** {@inheritDoc} */
-    public void setValue(Value value) throws ValueFormatException,
-            RepositoryException, RemoteException {
+    public void setValue(Value value)
+            throws RepositoryException, RemoteException {
         try {
             property.setValue(value);
         } catch (RepositoryException ex) {
@@ -87,8 +84,8 @@
     }
 
     /** {@inheritDoc} */
-    public void setValue(Value[] values) throws ValueFormatException,
-            RepositoryException, RemoteException {
+    public void setValue(Value[] values)
+            throws RepositoryException, RemoteException {
         try {
             property.setValue(values);
         } catch (RepositoryException ex) {
@@ -97,8 +94,7 @@
     }
 
     /** {@inheritDoc} */
-    public long getLength() throws ValueFormatException, RepositoryException,
-            RemoteException {
+    public long getLength() throws RepositoryException, RemoteException {
         try {
             return property.getLength();
         } catch (RepositoryException ex) {
@@ -107,8 +103,7 @@
     }
 
     /** {@inheritDoc} */
-    public long[] getLengths() throws ValueFormatException,
-            RepositoryException, RemoteException {
+    public long[] getLengths() throws RepositoryException, RemoteException {
         try {
             return property.getLengths();
         } catch (RepositoryException ex) {
@@ -117,8 +112,8 @@
     }
 
     /** {@inheritDoc} */
-    public RemotePropertyDef getDefinition() throws RepositoryException,
-            RemoteException {
+    public RemotePropertyDef getDefinition()
+            throws RepositoryException, RemoteException {
         try {
             return getFactory().getRemotePropertyDef(property.getDefinition());
         } catch (RepositoryException ex) {

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=155800&r2=155801
==============================================================================
--- 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
Tue Mar  1 08:58:09 2005
@@ -18,15 +18,8 @@
 
 import java.rmi.RemoteException;
 
-import javax.jcr.ItemExistsException;
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.PathNotFoundException;
 import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.query.Query;
-import javax.jcr.version.VersionException;
 
 import org.apache.jackrabbit.rmi.remote.RemoteQuery;
 import org.apache.jackrabbit.rmi.remote.RemoteQueryResult;
@@ -53,13 +46,15 @@
      * @param factory remote adapter factory
      * @throws RemoteException on RMI errors
      */
-    public ServerQuery(Query query, RemoteAdapterFactory factory) throws RemoteException
{
+    public ServerQuery(Query query, RemoteAdapterFactory factory)
+            throws RemoteException {
         super(factory);
         this.query = query;
     }
 
     /** {@inheritDoc} */
-    public RemoteQueryResult execute() throws RepositoryException, RemoteException {
+    public RemoteQueryResult execute()
+            throws RepositoryException, RemoteException {
         return new ServerQueryResult(query.execute(), getFactory());
     }
 
@@ -74,12 +69,14 @@
     }
 
     /** {@inheritDoc} */
-    public String getPersistentQueryPath() throws ItemNotFoundException, RepositoryException,
RemoteException {
+    public String getPersistentQueryPath()
+            throws RepositoryException, RemoteException {
         return query.getPersistentQueryPath();
     }
 
     /** {@inheritDoc} */
-    public void save(String absPath) throws ItemExistsException, PathNotFoundException, VersionException,
ConstraintViolationException, LockException, UnsupportedRepositoryOperationException, RepositoryException,
RemoteException {
+    public void save(String absPath)
+            throws RepositoryException, RemoteException {
         query.save(absPath);
     }
 }

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java?view=diff&r1=155800&r2=155801
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java
Tue Mar  1 08:58:09 2005
@@ -20,7 +20,6 @@
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
-import javax.jcr.query.InvalidQueryException;
 import javax.jcr.query.Query;
 import javax.jcr.query.QueryManager;
 
@@ -60,7 +59,7 @@
 
     /** {@inheritDoc} */
     public RemoteQuery createQuery(String statement, String language)
-            throws InvalidQueryException, RepositoryException, RemoteException {
+            throws RepositoryException, RemoteException {
         try {
             Query query = manager.createQuery(statement, language);
             return getFactory().getRemoteQuery(query);
@@ -71,7 +70,7 @@
 
     /** {@inheritDoc} */
     public RemoteQuery getQuery(String absPath)
-            throws InvalidQueryException, RepositoryException, RemoteException {
+            throws RepositoryException, RemoteException {
         try {
             Node node = null; // TODO
             return getFactory().getRemoteQuery(manager.getQuery(node));

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=155800&r2=155801
==============================================================================
--- 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
Tue Mar  1 08:58:09 2005
@@ -37,7 +37,8 @@
  * @see javax.jcr.query.QueryResult
  * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult
  */
-public class ServerQueryResult extends ServerObject implements RemoteQueryResult {
+public class ServerQueryResult extends ServerObject
+        implements RemoteQueryResult {
 
     /** The adapted local query result. */
     private QueryResult result;
@@ -49,42 +50,44 @@
      * @param factory remote adapter factory
      * @throws RemoteException on RMI errors
      */
-    public ServerQueryResult(QueryResult result, RemoteAdapterFactory factory) throws RemoteException
{
+    public ServerQueryResult(QueryResult result, RemoteAdapterFactory factory)
+            throws RemoteException {
         super(factory);
         this.result = result;
     }
 
     /** {@inheritDoc} */
-    public String[] getPropertyNames() throws RepositoryException, RemoteException {
+    public String[] getPropertyNames()
+            throws RepositoryException, RemoteException {
         return result.getPropertyNames();
     }
 
     /** {@inheritDoc} */
     public RemoteRow[] getRows() throws RepositoryException, RemoteException {
         RowIterator iterator = result.getRows();
-        if (iterator == null) {
+        if (iterator != null) {
+            RemoteRow[] remotes = new RemoteRow[(int) iterator.getSize()];
+            for (int i = 0; iterator.hasNext(); i++) {
+                remotes[i] = getFactory().getRemoteRow(iterator.nextRow());
+            }
+            return remotes;
+        } else {
             return new RemoteRow[0]; // for safety
         }
-
-        RemoteRow[] remotes = new RemoteRow[(int) iterator.getSize()];
-        for (int i = 0; iterator != null && iterator.hasNext(); i++) {
-            remotes[i] = getFactory().getRemoteRow(iterator.nextRow());
-        }
-        return remotes;
-
     }
 
     /** {@inheritDoc} */
     public RemoteNode[] getNodes() throws RepositoryException, RemoteException {
         NodeIterator iterator = result.getNodes();
-        if (iterator == null) {
+        if (iterator != null) {
+            RemoteNode[] remotes = new RemoteNode[(int) iterator.getSize()];
+            for (int i = 0; iterator.hasNext(); i++) {
+                remotes[i] = getFactory().getRemoteNode(iterator.nextNode());
+            }
+            return remotes;
+        } else {
             return new RemoteNode[0]; // for safety
         }
-
-        RemoteNode[] remotes = new RemoteNode[(int) iterator.getSize()];
-        for (int i = 0; iterator != null && iterator.hasNext(); i++) {
-            remotes[i] = getFactory().getRemoteNode(iterator.nextNode());
-        }
-        return remotes;
     }
+
 }

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerRepository.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerRepository.java?view=diff&r1=155800&r2=155801
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerRepository.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerRepository.java
Tue Mar  1 08:58:09 2005
@@ -19,8 +19,6 @@
 import java.rmi.RemoteException;
 
 import javax.jcr.Credentials;
-import javax.jcr.LoginException;
-import javax.jcr.NoSuchWorkspaceException;
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
@@ -51,8 +49,9 @@
      * @param factory remote adapter factory
      * @throws RemoteException on RMI errors
      */
-    public ServerRepository(Repository repository,
-            RemoteAdapterFactory factory) throws RemoteException {
+    public ServerRepository(
+            Repository repository, RemoteAdapterFactory factory)
+            throws RemoteException {
         super(factory);
         this.repository = repository;
     }
@@ -68,8 +67,7 @@
     }
 
     /** {@inheritDoc} */
-    public RemoteSession login() throws LoginException,
-            NoSuchWorkspaceException, RepositoryException, RemoteException {
+    public RemoteSession login() throws RepositoryException, RemoteException {
         try {
             Session session = repository.login();
             return getFactory().getRemoteSession(session);
@@ -79,8 +77,8 @@
     }
 
     /** {@inheritDoc} */
-    public RemoteSession login(String workspace) throws LoginException,
-            NoSuchWorkspaceException, RepositoryException, RemoteException {
+    public RemoteSession login(String workspace)
+            throws RepositoryException, RemoteException {
         try {
             Session session = repository.login(workspace);
             return getFactory().getRemoteSession(session);
@@ -90,8 +88,8 @@
     }
 
     /** {@inheritDoc} */
-    public RemoteSession login(Credentials credentials) throws LoginException,
-            NoSuchWorkspaceException, RepositoryException, RemoteException {
+    public RemoteSession login(Credentials credentials)
+            throws RepositoryException, RemoteException {
         try {
             Session session = repository.login(credentials);
             return getFactory().getRemoteSession(session);
@@ -102,8 +100,7 @@
 
     /** {@inheritDoc} */
     public RemoteSession login(Credentials credentials, String workspace)
-            throws LoginException, NoSuchWorkspaceException,
-            RepositoryException, RemoteException {
+            throws RepositoryException, RemoteException {
         try {
             Session session = repository.login(credentials, workspace);
             return getFactory().getRemoteSession(session);

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerRow.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerRow.java?view=diff&r1=155800&r2=155801
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerRow.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerRow.java
Tue Mar  1 08:58:09 2005
@@ -18,7 +18,6 @@
 
 import java.rmi.RemoteException;
 
-import javax.jcr.ItemNotFoundException;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
 import javax.jcr.query.Row;
@@ -41,9 +40,9 @@
     private Row row;
 
     /**
-     * Creates a remote adapter for the given local <code>Row</code>.
+     * Creates a remote adapter for the given local query row.
      *
-     * @param row local <code>Row</code>
+     * @param row local query row
      * @param factory remote adapter factory
      * @throws RemoteException on RMI errors
      */
@@ -59,7 +58,8 @@
     }
 
     /** {@inheritDoc} */
-    public Value getValue(String propertyName) throws ItemNotFoundException, RepositoryException,
RemoteException {
+    public Value getValue(String propertyName)
+            throws RepositoryException, RemoteException {
         return row.getValue(propertyName);
     }
 }

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=155800&r2=155801
==============================================================================
--- 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
Tue Mar  1 08:58:09 2005
@@ -22,19 +22,9 @@
 import java.rmi.RemoteException;
 import java.security.AccessControlException;
 
-import javax.jcr.AccessDeniedException;
 import javax.jcr.Credentials;
-import javax.jcr.InvalidItemStateException;
-import javax.jcr.InvalidSerializedDataException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.LoginException;
-import javax.jcr.NamespaceException;
-import javax.jcr.PathNotFoundException;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
 
 import org.apache.jackrabbit.rmi.remote.RemoteItem;
 import org.apache.jackrabbit.rmi.remote.RemoteNode;
@@ -86,7 +76,7 @@
 
     /** {@inheritDoc} */
     public RemoteSession impersonate(Credentials credentials)
-            throws LoginException, RepositoryException, RemoteException {
+            throws RepositoryException, RemoteException {
         try {
             Session newSession = session.impersonate(credentials);
             return getFactory().getRemoteSession(newSession);
@@ -107,8 +97,8 @@
     }
 
     /** {@inheritDoc} */
-    public String getNamespacePrefix(String uri) throws NamespaceException,
-            RepositoryException, RemoteException {
+    public String getNamespacePrefix(String uri)
+             throws RepositoryException, RemoteException {
         try {
             return session.getNamespacePrefix(uri);
         } catch (RepositoryException ex) {
@@ -117,8 +107,8 @@
     }
 
     /** {@inheritDoc} */
-    public String[] getNamespacePrefixes() throws RepositoryException,
-            RemoteException {
+    public String[] getNamespacePrefixes()
+            throws RepositoryException, RemoteException {
         try {
             return session.getNamespacePrefixes();
         } catch (RepositoryException ex) {
@@ -127,8 +117,8 @@
     }
 
     /** {@inheritDoc} */
-    public String getNamespaceURI(String prefix) throws NamespaceException,
-            RepositoryException, RemoteException {
+    public String getNamespaceURI(String prefix)
+            throws RepositoryException, RemoteException {
         try {
             return session.getNamespaceURI(prefix);
         } catch (RepositoryException ex) {
@@ -138,7 +128,7 @@
 
     /** {@inheritDoc} */
     public void setNamespacePrefix(String prefix, String uri)
-            throws NamespaceException, RepositoryException, RemoteException {
+            throws RepositoryException, RemoteException {
         try {
             session.setNamespacePrefix(prefix, uri);
         } catch (RepositoryException ex) {
@@ -152,8 +142,8 @@
     }
 
     /** {@inheritDoc} */
-    public RemoteNode getNodeByUUID(String uuid) throws ItemNotFoundException,
-            RepositoryException, RemoteException {
+    public RemoteNode getNodeByUUID(String uuid)
+            throws RepositoryException, RemoteException {
         try {
             return getFactory().getRemoteNode(session.getNodeByUUID(uuid));
         } catch (RepositoryException ex) {
@@ -162,8 +152,8 @@
     }
 
     /** {@inheritDoc} */
-    public RemoteNode getRootNode() throws RepositoryException,
-            RemoteException {
+    public RemoteNode getRootNode()
+            throws RepositoryException, RemoteException {
         try {
             return getFactory().getRemoteNode(session.getRootNode());
         } catch (RepositoryException ex) {
@@ -172,8 +162,8 @@
     }
 
     /** {@inheritDoc} */
-    public RemoteItem getItem(String path) throws PathNotFoundException,
-            RepositoryException, RemoteException {
+    public RemoteItem getItem(String path)
+            throws RepositoryException, RemoteException {
         try {
             return getRemoteItem(session.getItem(path));
         } catch (RepositoryException ex) {
@@ -182,8 +172,8 @@
     }
 
     /** {@inheritDoc} */
-    public boolean hasPendingChanges() throws RepositoryException,
-            RemoteException {
+    public boolean hasPendingChanges()
+            throws RepositoryException, RemoteException {
         try {
             return session.hasPendingChanges();
         } catch (RepositoryException ex) {
@@ -192,9 +182,8 @@
     }
 
     /** {@inheritDoc} */
-    public void move(String from, String to) throws ItemExistsException,
-            PathNotFoundException, ConstraintViolationException,
-            RepositoryException, RemoteException {
+    public void move(String from, String to)
+            throws RepositoryException, RemoteException {
         try {
             session.move(from, to);
         } catch (RepositoryException ex) {
@@ -203,9 +192,7 @@
     }
 
     /** {@inheritDoc} */
-    public void save() throws AccessDeniedException, LockException,
-            ConstraintViolationException, InvalidItemStateException,
-            RepositoryException, RemoteException {
+    public void save() throws RepositoryException, RemoteException {
         try {
             session.save();
         } catch (RepositoryException ex) {
@@ -214,8 +201,8 @@
     }
 
     /** {@inheritDoc} */
-    public void refresh(boolean keepChanges) throws RepositoryException,
-            RemoteException {
+    public void refresh(boolean keepChanges)
+            throws RepositoryException, RemoteException {
         try {
             session.refresh(keepChanges);
         } catch (RepositoryException ex) {
@@ -229,10 +216,8 @@
     }
 
     /** {@inheritDoc} */
-    public void importXML(String path, byte[] xml) throws IOException,
-            PathNotFoundException, ItemExistsException,
-            ConstraintViolationException, InvalidSerializedDataException,
-            RepositoryException, RemoteException {
+    public void importXML(String path, byte[] xml)
+            throws IOException, RepositoryException, RemoteException {
         try {
             session.importXML(path, new ByteArrayInputStream(xml));
         } catch (RepositoryException ex) {
@@ -256,10 +241,9 @@
     }
 
     /** {@inheritDoc} */
-    public byte[] exportDocView(String path, boolean binaryAsLink,
-            boolean noRecurse) throws InvalidSerializedDataException,
-            PathNotFoundException, IOException, RepositoryException,
-            RemoteException {
+    public byte[] exportDocView(
+            String path, boolean binaryAsLink, boolean noRecurse)
+            throws IOException, RepositoryException, RemoteException {
         try {
             ByteArrayOutputStream buffer = new ByteArrayOutputStream();
             session.exportDocView(path, buffer, binaryAsLink, noRecurse);
@@ -270,9 +254,9 @@
     }
 
     /** {@inheritDoc} */
-    public byte[] exportSysView(String path, boolean binaryAsLink,
-            boolean noRecurse) throws PathNotFoundException, IOException,
-            RepositoryException, RemoteException {
+    public byte[] exportSysView(
+            String path, boolean binaryAsLink, boolean noRecurse)
+            throws IOException, RepositoryException, RemoteException {
         try {
             ByteArrayOutputStream buffer = new ByteArrayOutputStream();
             session.exportSysView(path, buffer, binaryAsLink, noRecurse);
@@ -281,4 +265,5 @@
             throw getRepositoryException(ex);
         }
     }
+
 }

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java?view=diff&r1=155800&r2=155801
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java
Tue Mar  1 08:58:09 2005
@@ -20,23 +20,16 @@
 import java.io.IOException;
 import java.rmi.RemoteException;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.InvalidSerializedDataException;
-import javax.jcr.ItemExistsException;
 import javax.jcr.NamespaceRegistry;
-import javax.jcr.NoSuchWorkspaceException;
-import javax.jcr.PathNotFoundException;
 import javax.jcr.RepositoryException;
 import javax.jcr.Workspace;
-import javax.jcr.query.QueryManager;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.nodetype.NodeTypeManager;
+import javax.jcr.query.QueryManager;
 
 import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry;
 import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager;
-import org.apache.jackrabbit.rmi.remote.RemoteWorkspace;
 import org.apache.jackrabbit.rmi.remote.RemoteQueryManager;
+import org.apache.jackrabbit.rmi.remote.RemoteWorkspace;
 
 /**
  * Remote adapter for the JCR {@link Workspace Workspace} interface.
@@ -71,9 +64,7 @@
 
     /** {@inheritDoc} */
     public void copy(String from, String to)
-            throws ConstraintViolationException, AccessDeniedException,
-            PathNotFoundException, ItemExistsException, RepositoryException,
-            RemoteException {
+            throws RepositoryException, RemoteException {
         try {
             workspace.copy(from, to);
         } catch (RepositoryException ex) {
@@ -83,9 +74,7 @@
 
     /** {@inheritDoc} */
     public void copy(String from, String to, String workspace)
-            throws NoSuchWorkspaceException, ConstraintViolationException,
-            AccessDeniedException, PathNotFoundException, ItemExistsException,
-            RepositoryException, RemoteException {
+            throws RepositoryException, RemoteException {
         try {
             this.workspace.copy(from, to, workspace);
         } catch (RepositoryException ex) {
@@ -94,11 +83,9 @@
     }
 
     /** {@inheritDoc} */
-    public void clone(String workspace, String from, String to,
-            boolean removeExisting) throws NoSuchWorkspaceException,
-            ConstraintViolationException, AccessDeniedException,
-            PathNotFoundException, ItemExistsException, RepositoryException,
-            RemoteException {
+    public void clone(
+            String workspace, String from, String to, boolean removeExisting)
+            throws RepositoryException, RemoteException {
         try {
             this.workspace.clone(workspace, from, to, removeExisting);
         } catch (RepositoryException ex) {
@@ -108,9 +95,7 @@
 
     /** {@inheritDoc} */
     public void move(String from, String to)
-            throws ConstraintViolationException, AccessDeniedException,
-            PathNotFoundException, ItemExistsException, RepositoryException,
-            RemoteException {
+            throws RepositoryException, RemoteException {
         try {
             workspace.move(from, to);
         } catch (RepositoryException ex) {
@@ -152,8 +137,8 @@
     }
 
     /** {@inheritDoc} */
-    public String[] getAccessibleWorkspaceNames() throws RepositoryException,
-            RemoteException {
+    public String[] getAccessibleWorkspaceNames()
+            throws RepositoryException, RemoteException {
         try {
             return workspace.getAccessibleWorkspaceNames();
         } catch (RepositoryException ex) {
@@ -163,11 +148,10 @@
 
     /** {@inheritDoc} */
     public void importXML(String path, byte[] xml, int uuidBehaviour)
-            throws IOException, PathNotFoundException, ItemExistsException,
-            ConstraintViolationException, InvalidSerializedDataException,
-            LockException, RepositoryException, RemoteException {
+            throws IOException, RepositoryException, RemoteException {
         try {
-            workspace.importXML(path, new ByteArrayInputStream(xml), uuidBehaviour);
+            workspace.importXML(
+                    path, new ByteArrayInputStream(xml), uuidBehaviour);
         } catch (RepositoryException ex) {
             throw getRepositoryException(ex);
         }



Mime
View raw message