jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r553409 - in /jackrabbit/trunk/contrib/spi: jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ jcr2spi/src/main/...
Date Thu, 05 Jul 2007 07:45:33 GMT
Author: angela
Date: Thu Jul  5 00:45:27 2007
New Revision: 553409

URL: http://svn.apache.org/viewvc?view=rev&rev=553409
Log:
JCR-1001 SPI: prefer 'Iterator' instead of specialized subclasses

Removed:
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventIterator.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdIterator.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinitionIterator.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryResultRowIterator.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/EventIteratorImpl.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/IteratorHelper.java
    jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/IteratorHelper.java
Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/DefaultVersionManager.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java
    jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientIterator.java
    jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientQueryInfo.java
    jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java
    jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/EventBundleImpl.java
    jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/IteratorHelper.java
    jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/NodeInfoImpl.java
    jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventBundle.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QPropertyDefinition.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QValue.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QValueFactory.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/SessionInfo.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/EventBundleImpl.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NodeInfoImpl.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
    jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventBundleImpl.java
    jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventSubscription.java
    jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/NodeInfoImpl.java
    jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/QueryInfoImpl.java
    jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java Thu Jul  5 00:45:27 2007
@@ -49,7 +49,6 @@
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry;
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.QNodeDefinition;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.QValue;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -87,6 +86,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Arrays;
+import java.util.Iterator;
 
 /**
  * <code>NodeImpl</code>...
@@ -903,12 +903,8 @@
         // make sure the workspace exists and is accessible for this session.
         session.checkAccessibleWorkspace(srcWorkspace);
 
-        IdIterator failedIds = session.getVersionManager().merge(getNodeState(), srcWorkspace, bestEffort);
-        if (failedIds.getSize() == 0) {
-            return IteratorHelper.EMPTY;
-        } else {
-            return new LazyItemIterator(itemMgr, session.getHierarchyManager(), failedIds);
-        }
+        Iterator failedIds = session.getVersionManager().merge(getNodeState(), srcWorkspace, bestEffort);
+        return new LazyItemIterator(itemMgr, session.getHierarchyManager(), failedIds);
     }
 
     /**

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java Thu Jul  5 00:45:27 2007
@@ -72,16 +72,13 @@
 import org.apache.jackrabbit.spi.LockInfo;
 import org.apache.jackrabbit.spi.QueryInfo;
 import org.apache.jackrabbit.spi.QNodeDefinition;
-import org.apache.jackrabbit.spi.QNodeTypeDefinitionIterator;
 import org.apache.jackrabbit.spi.ItemId;
 import org.apache.jackrabbit.spi.PropertyId;
 import org.apache.jackrabbit.spi.Batch;
 import org.apache.jackrabbit.spi.EventBundle;
 import org.apache.jackrabbit.spi.EventFilter;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.spi.QValue;
-import org.apache.jackrabbit.spi.EventIterator;
 import org.apache.jackrabbit.spi.Event;
 import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
@@ -390,10 +387,10 @@
      * @throws RepositoryException
      */
     private NodeTypeRegistry createNodeTypeRegistry(QNodeDefinition rootNodeDef, NamespaceRegistry nsRegistry, Map descriptors) throws RepositoryException {
-        QNodeTypeDefinitionIterator it = service.getNodeTypeDefinitions(sessionInfo);
+        Iterator it = service.getNodeTypeDefinitions(sessionInfo);
         List ntDefs = new ArrayList();
         while (it.hasNext()) {
-            ntDefs.add(it.nextDefinition());
+            ntDefs.add(it.next());
         }
         NodeTypeStorage ntst = new NodeTypeStorage() {
             public void registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs) throws NoSuchNodeTypeException, RepositoryException {
@@ -622,8 +619,8 @@
             for (int i = 0; i < eventBundles.length; i++) {
                 log.debug("BundleId: {}", eventBundles[i].getBundleId());
                 log.debug("IsLocal:  {}", Boolean.valueOf(eventBundles[i].isLocal()));
-                for (EventIterator it = eventBundles[i].getEvents(); it.hasNext(); ) {
-                    Event e = it.nextEvent();
+                for (Iterator it = eventBundles[i].getEvents(); it.hasNext(); ) {
+                    Event e = (Event) it.next();
                     String type;
                     switch (e.getType()) {
                         case Event.NODE_ADDED:
@@ -866,7 +863,7 @@
          */
         public void visit(Merge operation) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException {
             NodeId nId = operation.getNodeId();
-            IdIterator failed = service.merge(sessionInfo, nId, operation.getSourceWorkspaceName(), operation.bestEffort());
+            Iterator failed = service.merge(sessionInfo, nId, operation.getSourceWorkspaceName(), operation.bestEffort());
             operation.setFailedIds(failed);
         }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java Thu Jul  5 00:45:27 2007
@@ -24,7 +24,6 @@
 import org.apache.jackrabbit.spi.EventFilter;
 import org.apache.jackrabbit.spi.Event;
 import org.apache.jackrabbit.spi.EventBundle;
-import org.apache.jackrabbit.spi.EventIterator;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.name.Path;
 
@@ -179,8 +178,8 @@
 
     private static Collection getEventCollection(EventBundle eventBundle) {
         List evs = new ArrayList();
-        for (EventIterator it = eventBundle.getEvents(); it.hasNext();) {
-           evs.add(it.nextEvent());
+        for (Iterator it = eventBundle.getEvents(); it.hasNext();) {
+           evs.add(it.next());
         }
         return evs;
     }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java Thu Jul  5 00:45:27 2007
@@ -18,7 +18,6 @@
 
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.version.VersionManager;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.NodeId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -30,6 +29,7 @@
 import javax.jcr.version.VersionException;
 import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.nodetype.NoSuchNodeTypeException;
+import java.util.Iterator;
 
 /**
  * <code>Merge</code>...
@@ -43,7 +43,7 @@
     private final boolean bestEffort;
     private final VersionManager mgr;
 
-    private IdIterator failedIds = null;
+    private Iterator failedIds = null;
 
     private Merge(NodeState nodeState, String srcWorkspaceName, boolean bestEffort, VersionManager mgr) {
         this.nodeState = nodeState;
@@ -89,7 +89,7 @@
         return bestEffort;
     }
 
-    public void setFailedIds(IdIterator failedIds) {
+    public void setFailedIds(Iterator failedIds) {
         if (failedIds == null) {
             throw new IllegalArgumentException("IdIterator must not be null.");
         }
@@ -99,7 +99,7 @@
         this.failedIds = failedIds;
     }
 
-    public IdIterator getFailedIds() {
+    public Iterator getFailedIds() {
         if (failedIds == null) {
             throw new IllegalStateException("Merge operation has not been executed yet.");
         }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java Thu Jul  5 00:45:27 2007
@@ -21,13 +21,13 @@
 
 import javax.jcr.Item;
 import javax.jcr.Node;
+import javax.jcr.RangeIterator;
 
 import org.apache.jackrabbit.jcr2spi.ItemManager;
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyManager;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.QueryInfo;
 import org.apache.jackrabbit.spi.QueryResultRow;
-import org.apache.jackrabbit.spi.QueryResultRowIterator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -47,7 +47,7 @@
     private final HierarchyManager hierarchyMgr;
 
     /** The QueryResultRows */
-    private final QueryResultRowIterator rows;
+    private final RangeIterator rows;
 
     /** Current position of this node iterator */
     private int pos = -1;
@@ -212,7 +212,7 @@
         
         while (next == null && rows.hasNext()) {
             try {
-                QueryResultRow row = rows.nextQueryResultRow();
+                QueryResultRow row = (QueryResultRow) rows.next();
                 nextId = row.getNodeId();
                 Item tmp = itemMgr.getItem(hierarchyMgr.getHierarchyEntry(nextId));
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java Thu Jul  5 00:45:27 2007
@@ -21,7 +21,6 @@
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.PropertyId;
 import org.apache.jackrabbit.spi.NodeInfo;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.PropertyInfo;
 import org.apache.jackrabbit.spi.SessionInfo;
 import org.apache.jackrabbit.spi.RepositoryService;
@@ -267,8 +266,8 @@
 
         // update NodeEntry from the information present in the NodeInfo (prop entries)
         List propNames = new ArrayList();
-        for (IdIterator it = info.getPropertyIds(); it.hasNext(); ) {
-            PropertyId pId = (PropertyId) it.nextId();
+        for (Iterator it = info.getPropertyIds(); it.hasNext(); ) {
+            PropertyId pId = (PropertyId) it.next();
             QName propertyName = pId.getQName();
             propNames.add(propertyName);
         }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/DefaultVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/DefaultVersionManager.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/DefaultVersionManager.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/DefaultVersionManager.java Thu Jul  5 00:45:27 2007
@@ -27,7 +27,8 @@
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
-import org.apache.jackrabbit.spi.IdIterator;
+
+import java.util.Iterator;
 
 /**
  * <code>DefaultVersionManager</code>...
@@ -73,7 +74,7 @@
         throw new UnsupportedRepositoryOperationException("Versioning ist not supported by this repository.");
     }
 
-    public IdIterator merge(NodeState nodeState, String workspaceName, boolean bestEffort) throws RepositoryException {
+    public Iterator merge(NodeState nodeState, String workspaceName, boolean bestEffort) throws RepositoryException {
         throw new UnsupportedRepositoryOperationException("Versioning ist not supported by this repository.");
     }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java Thu Jul  5 00:45:27 2007
@@ -20,7 +20,6 @@
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
-import org.apache.jackrabbit.spi.IdIterator;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.UnsupportedRepositoryOperationException;
@@ -33,6 +32,7 @@
 import javax.jcr.lock.LockException;
 import javax.jcr.version.VersionException;
 import javax.jcr.version.Version;
+import java.util.Iterator;
 
 /**
  * <code>VersionManager</code>...
@@ -144,9 +144,8 @@
      * @param nodeState
      * @param workspaceName
      * @param bestEffort
-     * @return A Collection of <code>ItemId</code> containing the ids of those
-     * <code>Node</code>s that failed to be merged and need manual resolution
-     * by the user of the API.
+     * @return An Iterator over <code>NodeId</code>s of all <code>Node</code>s
+     * that failed to be merged and need manual resolution by the user of the API.
      * @throws NoSuchWorkspaceException
      * @throws AccessDeniedException
      * @throws MergeException
@@ -154,9 +153,9 @@
      * @throws InvalidItemStateException
      * @throws RepositoryException
      * @see #resolveMergeConflict(NodeState,NodeState,boolean)
-     * @see javax.jcr.Node#merge(String, boolean) 
+     * @see javax.jcr.Node#merge(String, boolean)
      */
-    public IdIterator merge(NodeState nodeState, String workspaceName, boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException;
+    public Iterator merge(NodeState nodeState, String workspaceName, boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException;
 
     /**
      * @param nodeState

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java Thu Jul  5 00:45:27 2007
@@ -39,10 +39,11 @@
 
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.Path;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.QValue;
 
+import java.util.Iterator;
+
 /**
  * <code>VersionManagerImpl</code>...
  */
@@ -136,7 +137,7 @@
         workspaceManager.execute(op);
     }
 
-    public IdIterator merge(NodeState nodeState, String workspaceName, boolean bestEffort) throws RepositoryException {
+    public Iterator merge(NodeState nodeState, String workspaceName, boolean bestEffort) throws RepositoryException {
         Merge op = Merge.create(nodeState, workspaceName, bestEffort, this);
         workspaceManager.execute(op);
         return op.getFailedIds();

Modified: jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientIterator.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientIterator.java (original)
+++ jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientIterator.java Thu Jul  5 00:45:27 2007
@@ -22,10 +22,6 @@
 import javax.jcr.RangeIterator;
 
 import org.apache.jackrabbit.spi.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.spi.IdIterator;
-import org.apache.jackrabbit.spi.ItemId;
-import org.apache.jackrabbit.spi.QueryResultRowIterator;
-import org.apache.jackrabbit.spi.QueryResultRow;
 
 /**
  * A buffering local adapter for the {@link RemoteIterator}
@@ -33,7 +29,7 @@
  * using the JCR {@link RangeIterator} interface. The element arrays
  * returned by the remote iterator are buffered locally.
  */
-class ClientIterator implements RangeIterator, IdIterator, QueryResultRowIterator {
+class ClientIterator implements RangeIterator {
 
     /** The adapted remote iterator. */
     private final RemoteIterator remote;
@@ -202,23 +198,5 @@
      */
     public void remove() throws UnsupportedOperationException {
         throw new UnsupportedOperationException();
-    }
-
-    //------------------------------< IdIterator >------------------------------
-
-    /**
-     * @return returns the next <code>ItemId</code> in this iterator.
-     */
-    public ItemId nextId() {
-        return (ItemId) next();
-    }
-
-    //-----------------------< QueryResultRowIterator >-------------------------
-
-    /**
-     * @return returns the next <code>QueryResultRow</code> in this iterator.
-     */
-    public QueryResultRow nextQueryResultRow() {
-        return (QueryResultRow) next();
     }
 }

Modified: jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientQueryInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientQueryInfo.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientQueryInfo.java (original)
+++ jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientQueryInfo.java Thu Jul  5 00:45:27 2007
@@ -17,10 +17,10 @@
 package org.apache.jackrabbit.spi.rmi.client;
 
 import org.apache.jackrabbit.spi.QueryInfo;
-import org.apache.jackrabbit.spi.QueryResultRowIterator;
 import org.apache.jackrabbit.spi.rmi.remote.RemoteQueryInfo;
 import org.apache.jackrabbit.name.QName;
 
+import javax.jcr.RangeIterator;
 import java.rmi.RemoteException;
 
 /**
@@ -46,7 +46,7 @@
     /**
      * {@inheritDoc}
      */
-    public QueryResultRowIterator getRows() {
+    public RangeIterator getRows() {
         try {
             return new ClientIterator(queryInfo.getRows());
         } catch (RemoteException e) {

Modified: jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java (original)
+++ jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/client/ClientRepositoryService.java Thu Jul  5 00:45:27 2007
@@ -28,11 +28,9 @@
 import org.apache.jackrabbit.spi.PropertyInfo;
 import org.apache.jackrabbit.spi.Batch;
 import org.apache.jackrabbit.spi.LockInfo;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.QueryInfo;
 import org.apache.jackrabbit.spi.EventFilter;
 import org.apache.jackrabbit.spi.EventBundle;
-import org.apache.jackrabbit.spi.QNodeTypeDefinitionIterator;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.spi.NodeInfo;
 import org.apache.jackrabbit.spi.rmi.remote.RemoteRepositoryService;
@@ -41,7 +39,6 @@
 import org.apache.jackrabbit.spi.rmi.remote.RemoteQueryInfo;
 import org.apache.jackrabbit.spi.rmi.common.SerializableIdFactory;
 import org.apache.jackrabbit.spi.rmi.common.SerializableInputStream;
-import org.apache.jackrabbit.spi.rmi.common.IteratorHelper;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.value.QValueFactoryImpl;
@@ -533,7 +530,7 @@
     /**
      * {@inheritDoc}
      */
-    public IdIterator merge(SessionInfo sessionInfo,
+    public Iterator merge(SessionInfo sessionInfo,
                             NodeId nodeId,
                             String srcWorkspaceName,
                             boolean bestEffort)
@@ -748,12 +745,12 @@
     /**
      * {@inheritDoc}
      */
-    public QNodeTypeDefinitionIterator getNodeTypeDefinitions(
+    public Iterator getNodeTypeDefinitions(
             SessionInfo sessionInfo) throws RepositoryException {
         try {
             QNodeTypeDefinition[] ntDefs = remoteService.getNodeTypeDefinitions(
                     getRemoteSessionInfo(sessionInfo));
-            return new IteratorHelper(Arrays.asList(ntDefs));
+            return Arrays.asList(ntDefs).iterator();
         } catch (RemoteException e) {
             throw new RemoteRepositoryException(e);
         }

Modified: jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/EventBundleImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/EventBundleImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/EventBundleImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/EventBundleImpl.java Thu Jul  5 00:45:27 2007
@@ -17,10 +17,10 @@
 package org.apache.jackrabbit.spi.rmi.common;
 
 import org.apache.jackrabbit.spi.EventBundle;
-import org.apache.jackrabbit.spi.EventIterator;
 
 import java.io.Serializable;
 import java.util.Collection;
+import java.util.Iterator;
 
 /**
  * <code>EventBundleImpl</code> implements a serializable {@link EventBundle}.
@@ -58,8 +58,8 @@
     /**
      * {@inheritDoc}
      */
-    public EventIterator getEvents() {
-        return new IteratorHelper(events);
+    public Iterator getEvents() {
+        return events.iterator();
     }
 
     /**

Modified: jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/IteratorHelper.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/IteratorHelper.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/IteratorHelper.java (original)
+++ jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/IteratorHelper.java Thu Jul  5 00:45:27 2007
@@ -16,15 +16,6 @@
  */
 package org.apache.jackrabbit.spi.rmi.common;
 
-import org.apache.jackrabbit.spi.IdIterator;
-import org.apache.jackrabbit.spi.QNodeTypeDefinitionIterator;
-import org.apache.jackrabbit.spi.ItemId;
-import org.apache.jackrabbit.spi.QNodeTypeDefinition;
-import org.apache.jackrabbit.spi.Event;
-import org.apache.jackrabbit.spi.EventIterator;
-import org.apache.jackrabbit.spi.QueryResultRow;
-import org.apache.jackrabbit.spi.QueryResultRowIterator;
-
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.ArrayList;
@@ -33,8 +24,7 @@
  * <code>org.apache.jackrabbit.spi.rmi.common.IteratorHelper</code>...
  * TODO: move to spi-commons
  */
-public class IteratorHelper extends org.apache.jackrabbit.util.IteratorHelper
-    implements IdIterator, QueryResultRowIterator, QNodeTypeDefinitionIterator, EventIterator {
+public class IteratorHelper extends org.apache.jackrabbit.util.IteratorHelper {
 
     public static final IteratorHelper EMPTY = new IteratorHelper(new ArrayList(0));
 
@@ -44,33 +34,5 @@
 
     public IteratorHelper(Iterator iter) {
         super(iter);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ItemId nextId() {
-        return (ItemId) next();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public QNodeTypeDefinition nextDefinition() {
-        return (QNodeTypeDefinition) next();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public QueryResultRow nextQueryResultRow() {
-        return (QueryResultRow)super.next();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Event nextEvent() {
-        return (Event) next();
     }
 }

Modified: jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/NodeInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/NodeInfoImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/NodeInfoImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/common/NodeInfoImpl.java Thu Jul  5 00:45:27 2007
@@ -19,7 +19,6 @@
 import org.apache.jackrabbit.spi.NodeInfo;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.PropertyId;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.ItemId;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.Path;
@@ -27,6 +26,7 @@
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Iterator;
 import java.io.Serializable;
 
 /**
@@ -92,7 +92,7 @@
                     new IteratorHelper(nodeInfo.getPropertyIds()) {
                         public ItemId nextId() {
                             return idFactory.createSerializablePropertyId(
-                                    (PropertyId) super.nextId());
+                                    (PropertyId) super.next());
                         }
                     });
         }
@@ -114,7 +114,7 @@
      */
     private NodeInfoImpl(NodeId parentId, QName name, Path path, NodeId id,
                          int index, QName primaryTypeName, QName[] mixinNames,
-                         PropertyId[] references, IdIterator propertyIds) {
+                         PropertyId[] references, Iterator propertyIds) {
         super(parentId, name, path, true);
         this.id = id;
         this.index = index;
@@ -123,7 +123,7 @@
         this.references = Arrays.asList(references);
         this.propertyIds = new ArrayList();
         while (propertyIds.hasNext()) {
-            this.propertyIds.add(propertyIds.nextId());
+            this.propertyIds.add(propertyIds.next());
         }
     }
 
@@ -169,7 +169,7 @@
     /**
      * {@inheritDoc}
      */
-    public IdIterator getPropertyIds() {
-        return new IteratorHelper(propertyIds);
+    public Iterator getPropertyIds() {
+        return propertyIds.iterator();
     }
 }

Modified: jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java (original)
+++ jackrabbit/trunk/contrib/spi/spi-rmi/src/main/java/org/apache/jackrabbit/spi/rmi/server/ServerRepositoryService.java Thu Jul  5 00:45:27 2007
@@ -46,11 +46,8 @@
 import org.apache.jackrabbit.spi.EventFilter;
 import org.apache.jackrabbit.spi.EventBundle;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.QueryInfo;
-import org.apache.jackrabbit.spi.QNodeTypeDefinitionIterator;
 import org.apache.jackrabbit.spi.ChildInfo;
-import org.apache.jackrabbit.spi.EventIterator;
 import org.apache.jackrabbit.spi.Event;
 import org.apache.jackrabbit.spi.ItemInfo;
 import org.apache.jackrabbit.name.QName;
@@ -606,8 +603,7 @@
                                 String srcWorkspaceName,
                                 boolean bestEffort) throws RepositoryException, RemoteException {
         try {
-            IdIterator it = service.merge(getSessionInfo(sessionInfo),
-                    nodeId, srcWorkspaceName, bestEffort);
+            Iterator it = service.merge(getSessionInfo(sessionInfo), nodeId, srcWorkspaceName, bestEffort);
             return new ServerIterator(it, DEFAULT_BUFFER_SIZE);
         } catch (RepositoryException e) {
             throw getRepositoryException(e);
@@ -741,8 +737,8 @@
             EventBundle[] serBundles = new EventBundle[bundles.length];
             for (int i = 0; i < bundles.length; i++) {
                 List events = new ArrayList();
-                for (EventIterator it = bundles[i].getEvents(); it.hasNext(); ) {
-                    Event e = it.nextEvent();
+                for (Iterator it = bundles[i].getEvents(); it.hasNext(); ) {
+                    Event e = (Event) it.next();
                     ItemId id;
                     if (e.getItemId().denotesNode()) {
                         id = idFactory.createSerializableNodeId((NodeId) e.getItemId());
@@ -836,10 +832,10 @@
      */
     public QNodeTypeDefinition[] getNodeTypeDefinitions(RemoteSessionInfo sessionInfo)
             throws RepositoryException, RemoteException {
-        QNodeTypeDefinitionIterator it = service.getNodeTypeDefinitions(getSessionInfo(sessionInfo));
+        Iterator it = service.getNodeTypeDefinitions(getSessionInfo(sessionInfo));
         List nts = new ArrayList();
         while (it.hasNext()) {
-            QNodeTypeDefinition nt = it.nextDefinition();
+            QNodeTypeDefinition nt = (QNodeTypeDefinition) it.next();
             if (nt instanceof Serializable) {
                 nts.add(nt);
             } else {

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java Thu Jul  5 00:45:27 2007
@@ -23,9 +23,21 @@
  */
 public interface ChildInfo {
 
+    /**
+     *
+     * @return
+     */
     public QName getName();
 
+    /**
+     *
+     * @return
+     */
     public String getUniqueID();
 
+    /**
+     * 
+     * @return
+     */
     public int getIndex();
 }

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventBundle.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventBundle.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventBundle.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventBundle.java Thu Jul  5 00:45:27 2007
@@ -16,6 +16,8 @@
  */
 package org.apache.jackrabbit.spi;
 
+import java.util.Iterator;
+
 /**
  * An <code>EventBundle</code> is similar to the
  * {@link javax.jcr.observation.EventIterator} interface. Other than the
@@ -27,9 +29,9 @@
     /**
      * Returns the events of this bundle.
      *
-     * @return the events of this bundle.
+     * @return the {@link Event events} of this bundle.
      */
-    public EventIterator getEvents();
+    public Iterator getEvents();
 
     /**
      * Returns the identifier for this <code>EventBundle</code>.

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java Thu Jul  5 00:45:27 2007
@@ -24,11 +24,34 @@
  */
 public interface IdFactory {
 
+    /**
+     *
+     * @param parentId
+     * @param propertyName
+     * @return
+     */
     public PropertyId createPropertyId(NodeId parentId, QName propertyName);
 
+    /**
+     *
+     * @param parentId
+     * @param path
+     * @return
+     */
     public NodeId createNodeId(NodeId parentId, Path path);
 
+    /**
+     *
+     * @param uniqueID
+     * @param path
+     * @return
+     */
     public NodeId createNodeId(String uniqueID, Path path);
 
+    /**
+     * 
+     * @param uniqueID
+     * @return
+     */
     public NodeId createNodeId(String uniqueID);
 }

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java Thu Jul  5 00:45:27 2007
@@ -25,17 +25,17 @@
 public interface ItemInfo {
 
     /**
-     * @return the id of the parent item info
+     * @return the id of the parent item info.
      */
     public NodeId getParentId();
 
     /**
-     * @return Return the qualified representation of the item name
+     * @return Return the qualified representation of the item name.
      */
     public QName getQName();
 
     /**
-     * @return Return true if this ItemInfo denotes a node, false otherwise
+     * @return Return true if this ItemInfo denotes a node, false otherwise.
      */
     public boolean denotesNode();
 

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java Thu Jul  5 00:45:27 2007
@@ -18,6 +18,8 @@
 
 import org.apache.jackrabbit.name.QName;
 
+import java.util.Iterator;
+
 /**
  * <code>NodeInfo</code>...
  */
@@ -31,33 +33,33 @@
     public NodeId getId();
 
     /**
-     * Index of the node
+     * Index of the node.
      * 
-     * @return
+     * @return the index.
      */
     public int getIndex();
 
     /**
-     * @return QName representing the name of the primary nodetype
+     * @return QName representing the name of the primary nodetype.
      */
     public QName getNodetype();
 
     /**
-     * @return array of QName representing the names of mixin nodetypes.
+     * @return Array of QName representing the names of mixin nodetypes.
      */
     public QName[] getMixins();
 
     /**
-     * @return ids of the properties that are referencing the node based on this
-     * info object or an empty array if the node is not referenceable or no references
-     * exist.
+     * @return {@link PropertyId Id}s of the properties that are referencing the
+     * node based on this info object or an empty array if the node is not
+     * referenceable or no references exist.
      * @see PropertyInfo#getId()
      */
     public PropertyId[] getReferences();
 
     /**
-     * @return ids of children properties
+     * @return {@link PropertyId Id}s of children properties
      * @see PropertyInfo#getId()
      */
-    public IdIterator getPropertyIds();
+    public Iterator getPropertyIds();
 }

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java Thu Jul  5 00:45:27 2007
@@ -23,7 +23,13 @@
  */
 public interface PropertyId extends ItemId {
 
+    /**
+     * @return The {@link NodeId parentId} of this <code>PropertyId</code>.
+     */
     public NodeId getParentId();
 
+    /**
+     * @return The name of the property that is identified by this <code>PropertyId</code>.
+     */
     public QName getQName();
 }

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java Thu Jul  5 00:45:27 2007
@@ -29,6 +29,9 @@
  */
 public interface QItemDefinition {
 
+    /**
+     * Empty array of <code>QItemDefinition</code>.
+     */
     public static final QItemDefinition[] EMPTY_ARRAY = new QItemDefinition[0];
 
     /**

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java Thu Jul  5 00:45:27 2007
@@ -29,6 +29,9 @@
  */
 public interface QNodeDefinition extends QItemDefinition {
 
+    /**
+     * Empty array of <code>QNodeDefinition</code>.
+     */
     public static final QNodeDefinition[] EMPTY_ARRAY = new QNodeDefinition[0];
 
     /**

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QPropertyDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QPropertyDefinition.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QPropertyDefinition.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QPropertyDefinition.java Thu Jul  5 00:45:27 2007
@@ -28,6 +28,9 @@
  */
 public interface QPropertyDefinition extends QItemDefinition {
 
+    /**
+     * Empty array of <code>QPropertyDefinition</code>.
+     */
     public static final QPropertyDefinition[] EMPTY_ARRAY = new QPropertyDefinition[0];
 
     /**

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QValue.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QValue.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QValue.java Thu Jul  5 00:45:27 2007
@@ -46,7 +46,7 @@
      * <li>{@link PropertyType#STRING}</li>
      * </ul>
      *
-     * @return
+     * @return the <code>PropertyType</code> of this <code>QValue</code> object.
      */
     public int getType();
 
@@ -57,19 +57,26 @@
      * of a property such as retrieved by calling {@link Property#getLength()}
      * and {@link Property#getLengths()}.
      *
-     * @return length of the internal value.
+     * @return length of this <code>QValue</code> object.
+     * @throws RepositoryException
      */
     public long getLength() throws RepositoryException;
 
     /**
+     * Returns a <code>String</code> representation of this <code>QValue</code>
+     * object.
      *
-     * @return
+     * @return A <code>String</code> representation of this <code>QValue</code>
+     * object.
+     * @throws RepositoryException
      */
     public String getString() throws RepositoryException;
 
     /**
+     * Returns a <code>InputStream</code> representation of this <code>QValue</code>
+     * object.
      *
-     * @return
+     * @return A stream representation of this value.
      * @throws RepositoryException
      */
     public InputStream getStream() throws RepositoryException;

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QValueFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QValueFactory.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QValueFactory.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QValueFactory.java Thu Jul  5 00:45:27 2007
@@ -33,6 +33,7 @@
 
     /**
      * @param value
+     * @param type
      * @return
      */
     public QValue create(String value, int type);

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java Thu Jul  5 00:45:27 2007
@@ -18,20 +18,22 @@
 
 import org.apache.jackrabbit.name.QName;
 
+import javax.jcr.RangeIterator;
+
 /**
  * QueryInfo...
  */
 public interface QueryInfo {
 
     /**
-     * @return an iterator over the {@link QueryResultRow}s
+     * @return an iterator over the {@link QueryResultRow}s.
      * @see javax.jcr.query.QueryResult#getRows()
      */
-    public QueryResultRowIterator getRows();
+    public RangeIterator getRows();
 
     /**
      * @return an array of QName representing the column names of the query
-     *         result.
+     * result.
      * @see javax.jcr.query.QueryResult#getColumnNames()
      */
     public QName[] getColumnNames();

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=553409&r1=553408&r2=553409
==============================================================================
--- 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 Thu Jul  5 00:45:27 2007
@@ -80,6 +80,8 @@
      * <code>credentials</code>.
      *
      * @param credentials the credentials of the user.
+     * @param workspaceName the name of the workspace the <code>SessionInfo</code>
+     * should be built for.
      * @return a <code>SessionInfo</code> if authentication was successful.
      * @throws LoginException           if authentication of the user fails.
      * @throws NoSuchWorkspaceException if the specified <code>workspaceName</code>
@@ -94,6 +96,8 @@
      * will be used by other methods on the <code>RepositoryService</code>.
      *
      * @param sessionInfo for another workspace
+     * @param workspaceName the name of the workspace the new <code>SessionInfo</code>
+     * should be built for.
      * @return a <code>SessionInfo</code> if authentication was successful.
      * @throws LoginException           if authentication of the user fails.
      * @throws NoSuchWorkspaceException if the specified <code>workspaceName</code>
@@ -110,7 +114,9 @@
      * @param sessionInfo
      * @param credentials
      * @return a <code>SessionInfo</code> if impersonate was successful.
-     * @see Session#impersonate(Credentials)
+     * @throws LoginException
+     * @throws RepositoryException
+     * @see javax.jcr.Session#impersonate(javax.jcr.Credentials)
      */
     public SessionInfo impersonate(SessionInfo sessionInfo, Credentials credentials) throws LoginException, RepositoryException;
 
@@ -119,6 +125,7 @@
      * will not be used any more.
      *
      * @param sessionInfo
+     * @throws RepositoryException
      */
     public void dispose(SessionInfo sessionInfo) throws RepositoryException;
 
@@ -265,6 +272,7 @@
      * @param itemId
      * @param sessionInfo
      * @return
+     * @throws RepositoryException
      */
     public Batch createBatch(ItemId itemId, SessionInfo sessionInfo) throws RepositoryException;
 
@@ -508,8 +516,8 @@
      * @param nodeId
      * @param srcWorkspaceName
      * @param bestEffort
-     * @return an <code>IdIterator</code> over all nodes that received a merge
-     * result of "fail" in the course of this operation.
+     * @return an <code>Iterator</code> over the {@link NodeId}s of all nodes that
+     * received a merge result of "fail" in the course of this operation.
      * @throws javax.jcr.NoSuchWorkspaceException
      * @throws javax.jcr.AccessDeniedException
      * @throws javax.jcr.MergeException
@@ -518,7 +526,7 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Node#merge(String, boolean)
      */
-    public IdIterator merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName, boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException;
+    public Iterator merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName, boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException;
 
     /**
      * @param sessionInfo
@@ -540,6 +548,7 @@
 
     /**
      * @param sessionInfo
+     * @param versionHistoryId
      * @param versionId
      * @param label
      * @param moveLabel
@@ -551,6 +560,7 @@
 
     /**
      * @param sessionInfo
+     * @param versionHistoryId
      * @param versionId
      * @param label
      * @throws javax.jcr.version.VersionException
@@ -748,7 +758,7 @@
      * Retrieve the <code>QNodeTypeDefinition</code>s of all registered nodetypes.
      *
      * @param sessionInfo
-     * @return
+     * @return Iterator of {@link QNodeTypeDefinition}s.
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Workspace#getNodeTypeManager()
      * @see javax.jcr.nodetype.NodeTypeManager#getAllNodeTypes()
@@ -756,5 +766,5 @@
      * @see javax.jcr.nodetype.NodeTypeManager#getPrimaryNodeTypes()
      * @see javax.jcr.nodetype.NodeTypeManager#getNodeType(String)
      */
-    public QNodeTypeDefinitionIterator getNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException;
+    public Iterator getNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException;
 }

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/SessionInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/SessionInfo.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/SessionInfo.java (original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/SessionInfo.java Thu Jul  5 00:45:27 2007
@@ -26,14 +26,34 @@
  */
 public interface SessionInfo {
 
+    /**
+     * 
+     * @return
+     */
     public String getUserID();
 
+    /**
+     *
+     * @return
+     */
     public String getWorkspaceName();
 
+    /**
+     *
+     * @return
+     */
     public String[] getLockTokens();
 
+    /**
+     *
+     * @param lockToken
+     */
     public void addLockToken(String lockToken);
 
+    /**
+     *
+     * @param lockToken
+     */
     public void removeLockToken(String lockToken);
 
     /**

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/EventBundleImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/EventBundleImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/EventBundleImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/EventBundleImpl.java Thu Jul  5 00:45:27 2007
@@ -17,10 +17,11 @@
 package org.apache.jackrabbit.spi2dav;
 
 import org.apache.jackrabbit.spi.EventBundle;
-import org.apache.jackrabbit.spi.EventIterator;
 import org.apache.jackrabbit.webdav.observation.ObservationConstants;
 
 import java.util.Collection;
+import java.util.Iterator;
+import java.util.Collections;
 
 /**
  * <code>EventBundleImpl</code> implements a bundle of events. The individual
@@ -51,11 +52,11 @@
     /**
      * @inheritDoc
      */
-    public EventIterator getEvents() {
+    public Iterator getEvents() {
         if (events == null || events.isEmpty()) {
-            return IteratorHelper.EMPTY;
+            return Collections.EMPTY_LIST.iterator();
         } else {
-            return new EventIteratorImpl(events);
+            return events.iterator();
         }
     }
 

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NodeInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NodeInfoImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NodeInfoImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/NodeInfoImpl.java Thu Jul  5 00:45:27 2007
@@ -27,7 +27,6 @@
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.name.MalformedPathException;
 import org.apache.jackrabbit.spi.NodeInfo;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.PropertyId;
 import org.slf4j.LoggerFactory;
@@ -153,8 +152,8 @@
         return (PropertyId[]) references.toArray(new PropertyId[references.size()]);
     }
 
-    public IdIterator getPropertyIds() {
-        return new IteratorHelper(propertyIds);
+    public Iterator getPropertyIds() {
+        return propertyIds.iterator();
     }
 
     //--------------------------------------------------------------------------

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java Thu Jul  5 00:45:27 2007
@@ -23,6 +23,7 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.ValueFactory;
 import javax.jcr.Value;
+import javax.jcr.RangeIterator;
 
 import org.apache.jackrabbit.name.NameException;
 import org.apache.jackrabbit.name.NameFormat;
@@ -30,7 +31,6 @@
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.QueryInfo;
-import org.apache.jackrabbit.spi.QueryResultRowIterator;
 import org.apache.jackrabbit.spi.SessionInfo;
 import org.apache.jackrabbit.spi.QValueFactory;
 import org.apache.jackrabbit.spi.QueryResultRow;
@@ -113,8 +113,8 @@
     /**
      * @see QueryInfo#getRows()
      */
-    public QueryResultRowIterator getRows() {
-        return new QueryResultRowIteratorImpl();
+    public RangeIterator getRows() {
+        return new QueryResultRowIterator();
     }
 
     /**
@@ -124,16 +124,21 @@
         return columnNames;
     }
 
-    private class QueryResultRowIteratorImpl implements QueryResultRowIterator {
+    //--------------------------------------------------------< inner class >---
+    /**
+     * Inner class implementing the <code>RangeIterator</code> for the query
+     * result rows. 
+     */
+    private class QueryResultRowIterator implements RangeIterator {
 
         private final Iterator keyIterator;
         private long pos = 0;
 
-        private QueryResultRowIteratorImpl() {
+        private QueryResultRowIterator() {
             keyIterator = results.keySet().iterator();
         }
 
-        public QueryResultRow nextQueryResultRow() {
+        private QueryResultRow nextQueryResultRow() {
             final NodeId nId = (NodeId) keyIterator.next();
             final QValue[] qValues = (QValue[]) results.get(nId);
             pos++;
@@ -171,28 +176,48 @@
             };
         }
 
+        //--------------------------------------------------< RangeIterator >---
+        /**
+         * @see RangeIterator#skip(long)
+         */
         public void skip(long skipNum) {
             while (skipNum-- > 0) {
                 nextQueryResultRow();
             }
         }
 
+        /**
+         * @see RangeIterator#getSize()
+         */
         public long getSize() {
             return results.size();
         }
 
+        /**
+         * @see RangeIterator#getPosition()
+         */
         public long getPosition() {
             return pos;
         }
 
+        //-------------------------------------------------------< Iterator >---
+        /**
+         * @see Iterator#remove()
+         */
         public void remove() {
             throw new UnsupportedOperationException("Remove not implemented");
         }
 
+        /**
+         * @see Iterator#hasNext()
+         */
         public boolean hasNext() {
             return keyIterator.hasNext();
         }
 
+        /**
+         * @see Iterator#next()
+         */
         public Object next() {
             return nextQueryResultRow();
         }

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=553409&r1=553408&r2=553409
==============================================================================
--- 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 Thu Jul  5 00:45:27 2007
@@ -114,7 +114,6 @@
 import org.apache.jackrabbit.spi.SessionInfo;
 import org.apache.jackrabbit.spi.PropertyInfo;
 import org.apache.jackrabbit.spi.QueryInfo;
-import org.apache.jackrabbit.spi.QNodeTypeDefinitionIterator;
 import org.apache.jackrabbit.spi.ItemId;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.PropertyId;
@@ -125,7 +124,6 @@
 import org.apache.jackrabbit.spi.IdFactory;
 import org.apache.jackrabbit.spi.LockInfo;
 import org.apache.jackrabbit.spi.EventBundle;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.EventFilter;
 import org.apache.jackrabbit.spi.Event;
 import org.apache.jackrabbit.spi.ChildInfo;
@@ -1321,7 +1319,7 @@
     /**
      * @see RepositoryService#merge(SessionInfo, NodeId, String, boolean)
      */
-    public IdIterator merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName, boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException {
+    public Iterator merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName, boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException {
         try {
             String wspHref = uriResolver.getWorkspaceUri(srcWorkspaceName);
             Element mElem = MergeInfo.createMergeElement(new String[] {wspHref}, bestEffort, false, domFactory);
@@ -1329,8 +1327,14 @@
 
             MergeMethod method = new MergeMethod(getItemUri(nodeId, sessionInfo), mInfo);
             execute(method, sessionInfo);
-            // TODO: need to evaluate response and return merge failed node ids
-            return new IteratorHelper(Collections.EMPTY_LIST);
+
+            MultiStatusResponse[] resps = method.getResponseBodyAsMultiStatus().getResponses();
+            List failedIds = new ArrayList(resps.length);
+            for (int i = 0; i < resps.length; i++) {
+                String href = resps[i].getHref();
+                failedIds.add(uriResolver.getNodeId(href, sessionInfo));
+            }
+            return failedIds.iterator();
         } catch (IOException e) {
             throw new RepositoryException(e);
         } catch (DavException e) {
@@ -1800,7 +1804,7 @@
     /**
      * @see RepositoryService#getNodeTypeDefinitions(SessionInfo)
      */
-    public QNodeTypeDefinitionIterator getNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException {
+    public Iterator getNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException {
         ReportInfo info = new ReportInfo(NodeTypesReport.NODETYPES_REPORT, DEPTH_0);
         info.setContentElement(DomUtil.createElement(domFactory, NodeTypeConstants.XML_REPORT_ALLNODETYPES, NodeTypeConstants.NAMESPACE));
 
@@ -1826,7 +1830,7 @@
                     nodeTypeDefinitions.put(def.getQName(), def);
                 }
             }
-            return new IteratorHelper(ntDefs);
+            return ntDefs.iterator();
         } catch (IOException e) {
             throw new RepositoryException(e);
         } catch (DavException e) {

Modified: jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventBundleImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventBundleImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventBundleImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventBundleImpl.java Thu Jul  5 00:45:27 2007
@@ -17,9 +17,10 @@
 package org.apache.jackrabbit.spi2jcr;
 
 import org.apache.jackrabbit.spi.EventBundle;
-import org.apache.jackrabbit.spi.EventIterator;
+import org.apache.jackrabbit.util.IteratorHelper;
 
 import java.util.Collection;
+import java.util.Iterator;
 
 /**
  * <code>EventBundleImpl</code> implements a {@link EventBundle}.
@@ -57,7 +58,7 @@
     /**
      * {@inheritDoc}
      */
-    public EventIterator getEvents() {
+    public Iterator getEvents() {
         return new IteratorHelper(events);
     }
 

Modified: jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventSubscription.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventSubscription.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventSubscription.java (original)
+++ jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventSubscription.java Thu Jul  5 00:45:27 2007
@@ -18,7 +18,6 @@
 
 import org.apache.jackrabbit.spi.EventBundle;
 import org.apache.jackrabbit.spi.EventFilter;
-import org.apache.jackrabbit.spi.EventIterator;
 import org.apache.jackrabbit.spi.Event;
 import org.apache.jackrabbit.spi.ItemId;
 import org.apache.jackrabbit.spi.NodeId;
@@ -34,6 +33,7 @@
 import javax.jcr.observation.EventListener;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Iterator;
 
 /**
  * <code>EventSubscription</code> listens for JCR events and creates SPI event
@@ -106,8 +106,8 @@
         // apply filters to bundles
         for (int i = 0; i < bundles.length; i++) {
             List filteredEvents = new ArrayList();
-            for (EventIterator it = bundles[i].getEvents(); it.hasNext(); ) {
-                Event e = it.nextEvent();
+            for (Iterator it = bundles[i].getEvents(); it.hasNext(); ) {
+                Event e = (Event) it.next();
                 // TODO: this is actually not correct. if filters are empty no event should go out
                 if (filters == null || filters.length == 0) {
                     filteredEvents.add(e);

Modified: jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/NodeInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/NodeInfoImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/NodeInfoImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/NodeInfoImpl.java Thu Jul  5 00:45:27 2007
@@ -19,7 +19,6 @@
 import org.apache.jackrabbit.spi.NodeInfo;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.PropertyId;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.name.NamespaceResolver;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.NameFormat;
@@ -31,6 +30,7 @@
 import javax.jcr.nodetype.NodeType;
 import java.util.List;
 import java.util.ArrayList;
+import java.util.Iterator;
 
 /**
  * <code>NodeInfoImpl</code> implements a <code>NodeInfo</code> on top of a JCR
@@ -146,8 +146,8 @@
     /**
      * {@inheritDoc}
      */
-    public IdIterator getPropertyIds() {
-        return new IteratorHelper(propertyIds);
+    public Iterator getPropertyIds() {
+        return propertyIds.iterator();
     }
 
     /**

Modified: jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/QueryInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/QueryInfoImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/QueryInfoImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/QueryInfoImpl.java Thu Jul  5 00:45:27 2007
@@ -17,12 +17,12 @@
 package org.apache.jackrabbit.spi2jcr;
 
 import org.apache.jackrabbit.spi.QueryInfo;
-import org.apache.jackrabbit.spi.QueryResultRowIterator;
 import org.apache.jackrabbit.spi.QValueFactory;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.NamespaceResolver;
 import org.apache.jackrabbit.name.NameFormat;
 import org.apache.jackrabbit.name.NameException;
+import org.apache.jackrabbit.util.IteratorHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -30,6 +30,7 @@
 import javax.jcr.query.RowIterator;
 import javax.jcr.query.Row;
 import javax.jcr.RepositoryException;
+import javax.jcr.RangeIterator;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
@@ -114,7 +115,7 @@
     /**
      * {@inheritDoc}
      */
-    public QueryResultRowIterator getRows() {
+    public RangeIterator getRows() {
         final String[] columnJcrNames;
         final RowIterator rows;
         try {

Modified: jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java?view=diff&rev=553409&r1=553408&r2=553409
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java Thu Jul  5 00:45:27 2007
@@ -29,11 +29,9 @@
 import org.apache.jackrabbit.spi.PropertyInfo;
 import org.apache.jackrabbit.spi.Batch;
 import org.apache.jackrabbit.spi.LockInfo;
-import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.QueryInfo;
 import org.apache.jackrabbit.spi.EventFilter;
 import org.apache.jackrabbit.spi.EventBundle;
-import org.apache.jackrabbit.spi.QNodeTypeDefinitionIterator;
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.Path;
@@ -45,6 +43,7 @@
 import org.apache.jackrabbit.value.QValueFactoryImpl;
 import org.apache.jackrabbit.value.ValueFormat;
 import org.apache.jackrabbit.JcrConstants;
+import org.apache.jackrabbit.util.IteratorHelper;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Credentials;
@@ -698,13 +697,13 @@
     /**
      * {@inheritDoc}
      */
-    public IdIterator merge(final SessionInfo sessionInfo,
-                            final NodeId nodeId,
-                            final String srcWorkspaceName,
-                            final boolean bestEffort)
+    public Iterator merge(final SessionInfo sessionInfo,
+                          final NodeId nodeId,
+                          final String srcWorkspaceName,
+                          final boolean bestEffort)
             throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException {
         final SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
-        return (IdIterator) executeWithLocalEvents(new Callable() {
+        return (Iterator) executeWithLocalEvents(new Callable() {
             public Object run() throws RepositoryException {
                 Node n = getNode(nodeId, sInfo);
                 NodeIterator it = n.merge(srcWorkspaceName, bestEffort);
@@ -713,7 +712,7 @@
                     ids.add(idFactory.createNodeId(it.nextNode(),
                             sInfo.getNamespaceResolver()));
                 }
-                return new IteratorHelper(ids);
+                return ids.iterator();
             }
         }, sInfo);
     }
@@ -961,8 +960,7 @@
     /**
      * {@inheritDoc}
      */
-    public QNodeTypeDefinitionIterator getNodeTypeDefinitions(
-            SessionInfo sessionInfo) throws RepositoryException {
+    public Iterator getNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException {
         SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
         NodeTypeManager ntMgr = sInfo.getSession().getWorkspace().getNodeTypeManager();
         List nodeTypes = new ArrayList();
@@ -971,7 +969,7 @@
             nodeTypes.add(new QNodeTypeDefinitionImpl(nt,
                     sInfo.getNamespaceResolver(), getQValueFactory()));
         }
-        return new IteratorHelper(nodeTypes);
+        return nodeTypes.iterator();
     }
 
     //----------------------------< internal >----------------------------------



Mime
View raw message