jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r649183 - in /jackrabbit/sandbox/spi: spi-logger/src/main/java/org/apache/jackrabbit/spi/logger/ spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/remote/ spi-rmi/src/main/java/o...
Date Thu, 17 Apr 2008 16:57:56 GMT
Author: angela
Date: Thu Apr 17 09:57:46 2008
New Revision: 649183

URL: http://svn.apache.org/viewvc?rev=649183&view=rev
Log:
JCR-1513: RepositoryService.checkin should return information about newly created version

Modified:
    jackrabbit/sandbox/spi/spi-logger/src/main/java/org/apache/jackrabbit/spi/logger/RepositoryServiceLogger.java
    jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java
    jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/remote/RemoteRepositoryService.java
    jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java
    jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/sandbox/spi/spi-logger/src/main/java/org/apache/jackrabbit/spi/logger/RepositoryServiceLogger.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi-logger/src/main/java/org/apache/jackrabbit/spi/logger/RepositoryServiceLogger.java?rev=649183&r1=649182&r2=649183&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi-logger/src/main/java/org/apache/jackrabbit/spi/logger/RepositoryServiceLogger.java
(original)
+++ jackrabbit/sandbox/spi/spi-logger/src/main/java/org/apache/jackrabbit/spi/logger/RepositoryServiceLogger.java
Thu Apr 17 09:57:46 2008
@@ -384,8 +384,7 @@
             throws VersionException, UnsupportedRepositoryOperationException, InvalidItemStateException,
LockException, RepositoryException {
         return (NodeId) execute(new Callable() {
             public Object call() throws RepositoryException {
-                service.checkin(sessionInfo, nodeId);
-                return null;
+                return service.checkin(sessionInfo, nodeId);
             }
         }, "checkin(SessionInfo,NodeId)", new Object[]{nodeId});
     }

Modified: jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java?rev=649183&r1=649182&r2=649183&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java
(original)
+++ jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java
Thu Apr 17 09:57:46 2008
@@ -475,10 +475,10 @@
     /**
      * {@inheritDoc}
      */
-    public void checkin(SessionInfo sessionInfo, NodeId nodeId)
+    public NodeId checkin(SessionInfo sessionInfo, NodeId nodeId)
             throws VersionException, UnsupportedRepositoryOperationException, InvalidItemStateException,
LockException, RepositoryException {
         try {
-            remoteService.checkin(getRemoteSessionInfo(sessionInfo), nodeId);
+            return remoteService.checkin(getRemoteSessionInfo(sessionInfo), nodeId);
         } catch (RemoteException e) {
             throw new RemoteRepositoryException(e);
         }

Modified: jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/remote/RemoteRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/remote/RemoteRepositoryService.java?rev=649183&r1=649182&r2=649183&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/remote/RemoteRepositoryService.java
(original)
+++ jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/remote/RemoteRepositoryService.java
Thu Apr 17 09:57:46 2008
@@ -380,11 +380,12 @@
     /**
      * @param sessionInfo
      * @param nodeId
+     * @return 
      * @throws javax.jcr.RepositoryException
      * @throws RemoteException if an error occurs.
      * @see org.apache.jackrabbit.spi.RepositoryService#checkin(org.apache.jackrabbit.spi.SessionInfo,
org.apache.jackrabbit.spi.NodeId)
      */
-    public void checkin(RemoteSessionInfo sessionInfo, NodeId nodeId)
+    public NodeId checkin(RemoteSessionInfo sessionInfo, NodeId nodeId)
             throws RepositoryException, RemoteException;
 
     /**

Modified: jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java?rev=649183&r1=649182&r2=649183&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java
(original)
+++ jackrabbit/sandbox/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java
Thu Apr 17 09:57:46 2008
@@ -509,10 +509,10 @@
     /**
      * {@inheritDoc}
      */
-    public void checkin(RemoteSessionInfo sessionInfo, NodeId nodeId)
+    public NodeId checkin(RemoteSessionInfo sessionInfo, NodeId nodeId)
             throws RepositoryException, RemoteException {
         try {
-            service.checkin(getSessionInfo(sessionInfo), nodeId);
+            return service.checkin(getSessionInfo(sessionInfo), nodeId);
         } catch (RepositoryException e) {
             throw getRepositoryException(e);
         }

Modified: jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?rev=649183&r1=649182&r2=649183&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Thu Apr 17 09:57:46 2008
@@ -1205,10 +1205,12 @@
     /**
      * @see RepositoryService#checkin(SessionInfo, NodeId)
      */
-    public void checkin(SessionInfo sessionInfo, NodeId nodeId) throws VersionException,
UnsupportedRepositoryOperationException, InvalidItemStateException, LockException, RepositoryException
{
+    public NodeId checkin(SessionInfo sessionInfo, NodeId nodeId) throws VersionException,
UnsupportedRepositoryOperationException, InvalidItemStateException, LockException, RepositoryException
{
         String uri = getItemUri(nodeId, sessionInfo);
         CheckinMethod method = new CheckinMethod(uri);
         execute(method, sessionInfo);
+        Header rh = method.getResponseHeader(DeltaVConstants.HEADER_LOCATION);
+        return uriResolver.getNodeId(rh.getValue(), sessionInfo);
     }
 
     /**



Mime
View raw message