jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r447376 - in /jackrabbit/trunk/contrib/spi: spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Date Mon, 18 Sep 2006 11:45:51 GMT
Author: angela
Date: Mon Sep 18 04:45:50 2006
New Revision: 447376

URL: http://svn.apache.org/viewvc?view=rev&rev=447376
Log:
work in progress

- inconsistent naming: workspace is always identified by a 'name' not by id.

Modified:
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java?view=diff&rev=447376&r1=447375&r2=447376
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
Mon Sep 18 04:45:50 2006
@@ -244,7 +244,7 @@
 
     /**
      * @param sessionInfo
-     * @param srcWorkspaceId
+     * @param srcWorkspaceName
      * @param srcNodeId
      * @param destParentNodeId
      * @param destName
@@ -260,13 +260,13 @@
      * @see javax.jcr.Workspace#copy(String, String)
      * @see javax.jcr.Workspace#copy(String, String, String)
      */
-    public EventIterator copy(SessionInfo sessionInfo, String srcWorkspaceId, NodeId srcNodeId,
NodeId destParentNodeId, QName destName) throws NoSuchWorkspaceException, ConstraintViolationException,
VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException,
UnsupportedRepositoryOperationException, RepositoryException;
+    public EventIterator copy(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId,
NodeId destParentNodeId, QName destName) throws NoSuchWorkspaceException, ConstraintViolationException,
VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException,
UnsupportedRepositoryOperationException, RepositoryException;
 
     //------------------------------------------------------< Update, Clone >---
     /**
      * @param sessionInfo
      * @param nodeId
-     * @param srcWorkspaceId
+     * @param srcWorkspaceName
      * @throws javax.jcr.NoSuchWorkspaceException
      * @throws javax.jcr.AccessDeniedException
      * @throws javax.jcr.lock.LockException
@@ -274,11 +274,11 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Node#update(String)
      */
-    public EventIterator update(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceId)
throws NoSuchWorkspaceException, AccessDeniedException, LockException, InvalidItemStateException,
RepositoryException;
+    public EventIterator update(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName)
throws NoSuchWorkspaceException, AccessDeniedException, LockException, InvalidItemStateException,
RepositoryException;
 
     /**
      * @param sessionInfo
-     * @param srcWorkspaceId
+     * @param srcWorkspaceName
      * @param srcNodeId
      * @param destParentNodeId
      * @param destName
@@ -294,7 +294,7 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Workspace#clone(String, String, String, boolean)
      */
-    public EventIterator clone(SessionInfo sessionInfo, String srcWorkspaceId, NodeId srcNodeId,
NodeId destParentNodeId, QName destName, boolean removeExisting) throws NoSuchWorkspaceException,
ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException,
ItemExistsException, LockException, UnsupportedRepositoryOperationException, RepositoryException;
+    public EventIterator clone(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId,
NodeId destParentNodeId, QName destName, boolean removeExisting) throws NoSuchWorkspaceException,
ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException,
ItemExistsException, LockException, UnsupportedRepositoryOperationException, RepositoryException;
 
     //------------------------------------------------------------< Locking >---
 
@@ -410,7 +410,7 @@
     /**
      * @param sessionInfo
      * @param nodeId
-     * @param srcWorkspaceId
+     * @param srcWorkspaceName
      * @param bestEffort
      * @throws javax.jcr.NoSuchWorkspaceException
      * @throws javax.jcr.AccessDeniedException
@@ -420,7 +420,7 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Node#merge(String, boolean)
      */
-    public EventIterator merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceId,
boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException,
LockException, InvalidItemStateException, RepositoryException;
+    public EventIterator merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName,
boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException,
LockException, InvalidItemStateException, RepositoryException;
 
     /**
      * @param sessionInfo

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?view=diff&rev=447376&r1=447375&r2=447376
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Mon Sep 18 04:45:50 2006
@@ -256,8 +256,8 @@
         return rootUri;
     }
 
-    private String getItemUri(String workspaceId, ItemId itemId, SessionInfo sessionInfo)
throws RepositoryException {
-        String uri = getWorkspaceUri(workspaceId);
+    private String getItemUri(String workspaceName, ItemId itemId, SessionInfo sessionInfo)
throws RepositoryException {
+        String uri = getWorkspaceUri(workspaceName);
         String uuid = itemId.getUUID();
         if (uuid != null) {
             if (uriCache.containsKey(uuid)) {
@@ -803,10 +803,10 @@
     /**
      * @see RepositoryService#copy(SessionInfo, String, NodeId, NodeId, QName)
      */
-    public EventIterator copy(SessionInfo sessionInfo, String srcWorkspaceId, NodeId srcNodeId,
NodeId destParentNodeId, QName destName) throws NoSuchWorkspaceException, ConstraintViolationException,
VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException,
UnsupportedRepositoryOperationException, RepositoryException {
+    public EventIterator copy(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId,
NodeId destParentNodeId, QName destName) throws NoSuchWorkspaceException, ConstraintViolationException,
VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException,
UnsupportedRepositoryOperationException, RepositoryException {
         CopyMethod method = null;
         try {
-            String uri = getItemUri(srcWorkspaceId, srcNodeId, sessionInfo);
+            String uri = getItemUri(srcWorkspaceName, srcNodeId, sessionInfo);
             String destUri = getItemUri(destParentNodeId, destName, sessionInfo);
             method = new CopyMethod(uri, destUri, true, false);
             initMethod(method, sessionInfo, true);
@@ -830,9 +830,9 @@
     /**
      * @see RepositoryService#update(SessionInfo, NodeId, String)
      */
-    public EventIterator update(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceId)
throws NoSuchWorkspaceException, AccessDeniedException, LockException, InvalidItemStateException,
RepositoryException {
+    public EventIterator update(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName)
throws NoSuchWorkspaceException, AccessDeniedException, LockException, InvalidItemStateException,
RepositoryException {
         String uri = getItemUri(nodeId, sessionInfo);
-        String workspUri = getWorkspaceUri(srcWorkspaceId);
+        String workspUri = getWorkspaceUri(srcWorkspaceName);
 
         return update(uri, new String[] {workspUri}, UpdateInfo.UPDATE_BY_WORKSPACE, false,
sessionInfo);
     }
@@ -840,7 +840,7 @@
     /**
      * @see RepositoryService#clone(SessionInfo, String, NodeId, NodeId, QName, boolean)
      */
-    public EventIterator clone(SessionInfo sessionInfo, String srcWorkspaceId, NodeId srcNodeId,
NodeId destParentNodeId, QName destName, boolean removeExisting) throws NoSuchWorkspaceException,
ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException,
ItemExistsException, LockException, UnsupportedRepositoryOperationException, RepositoryException
{
+    public EventIterator clone(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId,
NodeId destParentNodeId, QName destName, boolean removeExisting) throws NoSuchWorkspaceException,
ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException,
ItemExistsException, LockException, UnsupportedRepositoryOperationException, RepositoryException
{
         // TODO: missing implementation
         return null;
     }
@@ -1089,10 +1089,10 @@
     /**
      * @see RepositoryService#merge(SessionInfo, NodeId, String, boolean)
      */
-    public EventIterator merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceId,
boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException,
LockException, InvalidItemStateException, RepositoryException {
+    public EventIterator merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName,
boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException,
LockException, InvalidItemStateException, RepositoryException {
         MergeMethod method = null;
         try {
-            String wspHref = getWorkspaceUri(srcWorkspaceId);
+            String wspHref = getWorkspaceUri(srcWorkspaceName);
             Element mElem = MergeInfo.createMergeElement(new String[] {wspHref}, bestEffort,
false, domFactory);
             MergeInfo mInfo = new MergeInfo(mElem);
 



Mime
View raw message