jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r812570 [21/24] - in /jackrabbit/sandbox/JCR-1456: ./ jackrabbit-api/ jackrabbit-api/src/main/appended-resources/ jackrabbit-api/src/main/appended-resources/META-INF/ jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/ jackrabb...
Date Tue, 08 Sep 2009 16:09:45 GMT
Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java Tue Sep  8 16:09:28 2009
@@ -124,19 +124,13 @@
         return mgrProvider.getNamespaceResolver();
     }
 
-    private NamePathResolver resolver() {
-        return mgrProvider.getNamePathResolver();
-    }
-
     private EffectiveNodeTypeProvider entProvider() {
         return mgrProvider.getEffectiveNodeTypeProvider();
     }
 
     //--------------------------------------------------------------------------
     /**
-     * @param name
-     * @return
-     * @throws NoSuchNodeTypeException
+     * @see AbstractNodeTypeManager#getNodeType(org.apache.jackrabbit.spi.Name)
      */
     public NodeTypeImpl getNodeType(Name name) throws NoSuchNodeTypeException {
         synchronized (ntCache) {
@@ -152,6 +146,13 @@
     }
 
     /**
+     * @see org.apache.jackrabbit.spi.commons.nodetype.AbstractNodeTypeManager#getNamePathResolver() 
+     */
+    public NamePathResolver getNamePathResolver() {
+        return mgrProvider.getNamePathResolver();
+    }
+
+    /**
      *
      * @param nodeTypeName
      * @return
@@ -175,7 +176,7 @@
         synchronized (ndCache) {
             NodeDefinition ndi = (NodeDefinition) ndCache.get(def);
             if (ndi == null) {
-                ndi = new NodeDefinitionImpl(def, this, resolver());
+                ndi = new NodeDefinitionImpl(def, this, getNamePathResolver());
                 ndCache.put(def, ndi);
             }
             return ndi;
@@ -193,7 +194,7 @@
         synchronized (pdCache) {
             PropertyDefinition pdi = (PropertyDefinition) pdCache.get(def);
             if (pdi == null) {
-                pdi = new PropertyDefinitionImpl(def, this, resolver(), valueFactory);
+                pdi = new PropertyDefinitionImpl(def, this, getNamePathResolver(), valueFactory);
                 pdCache.put(def, pdi);
             }
             return pdi;
@@ -231,7 +232,7 @@
         // flush all affected cache entries
         ntCache.remove(ntName);
         try {
-            String name = resolver().getJCRName(ntName);
+            String name = getNamePathResolver().getJCRName(ntName);
             synchronized (pdCache) {
                 Iterator iter = pdCache.values().iterator();
                 while (iter.hasNext()) {
@@ -268,7 +269,7 @@
         // flush all affected cache entries
         ntCache.remove(ntName);
         try {
-            String name = resolver().getJCRName(ntName);
+            String name = getNamePathResolver().getJCRName(ntName);
             synchronized (pdCache) {
                 Iterator iter = pdCache.values().iterator();
                 while (iter.hasNext()) {
@@ -347,7 +348,7 @@
     public NodeType getNodeType(String nodeTypeName)
             throws NoSuchNodeTypeException {
         try {
-            Name qName = resolver().getQName(nodeTypeName);
+            Name qName = getNamePathResolver().getQName(nodeTypeName);
             return getNodeType(qName);
         } catch (NamespaceException e) {
             throw new NoSuchNodeTypeException(nodeTypeName, e);
@@ -361,7 +362,7 @@
      */
     public boolean hasNodeType(String name) throws RepositoryException {
         try {
-            Name qName = resolver().getQName(name);
+            Name qName = getNamePathResolver().getQName(name);
             return hasNodeType(qName);
         } catch (NamespaceException e) {
             return false;
@@ -377,7 +378,7 @@
             throws RepositoryException {
         List<QNodeTypeDefinition> defs = new ArrayList<QNodeTypeDefinition>(ntds.length);
         for (NodeTypeDefinition definition : ntds) {
-            QNodeTypeDefinition qdef = new QNodeTypeDefinitionImpl(definition, resolver(), mgrProvider.getQValueFactory());
+            QNodeTypeDefinition qdef = new QNodeTypeDefinitionImpl(definition, getNamePathResolver(), mgrProvider.getQValueFactory());
             if (!allowUpdate && hasNodeType(qdef.getName())) {
                 throw new NodeTypeExistsException("NodeType " + definition.getName() + " already exists.");
             }
@@ -400,7 +401,7 @@
     public void unregisterNodeTypes(String[] names) throws RepositoryException {
         HashSet ntNames = new HashSet();
         for (String name : names) {
-            ntNames.add(resolver().getQName(name));
+            ntNames.add(getNamePathResolver().getQName(name));
         }
         getNodeTypeRegistry().unregisterNodeTypes(ntNames);
     }

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java Tue Sep  8 16:09:28 2009
@@ -26,6 +26,7 @@
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.QItemDefinition;
 import org.apache.jackrabbit.spi.QValueConstraint;
+import org.apache.jackrabbit.spi.commons.nodetype.NodeTypeStorage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java Tue Sep  8 16:09:28 2009
@@ -41,11 +41,23 @@
     private static Logger log = LoggerFactory.getLogger(Checkout.class);
 
     private final NodeState nodeState;
+    private final NodeId activityId;
+    private final boolean supportsActivity;
     private final VersionManager mgr;
 
     private Checkout(NodeState nodeState, VersionManager mgr) {
         this.nodeState = nodeState;
         this.mgr = mgr;
+        supportsActivity = false;
+        activityId = null;
+        // NOTE: affected-states only needed for transient modifications
+    }
+
+    private Checkout(NodeState nodeState, NodeId activityId, VersionManager mgr) {
+        this.nodeState = nodeState;
+        this.activityId = activityId;
+        this.mgr = mgr;
+        supportsActivity = true;
         // NOTE: affected-states only needed for transient modifications
     }
 
@@ -90,8 +102,32 @@
         return nodeState.getNodeEntry().getWorkspaceId();
     }
 
+    /**
+     * The id of the current activity present on the editing session or <code>null</code>.
+     *
+     * @return id of the current activity present on the editing session or <code>null</code>.
+     */
+    public NodeId getActivityId() {
+        return activityId;
+    }
+
+    /**
+     * Returns <code>true</code>, if activities are supported, 
+     * <code>false</code> otherwise.
+     *
+     * @return  <code>true</code>, if activities are supported,
+     * <code>false</code> otherwise.
+     */
+    public boolean supportsActivity() {
+        return supportsActivity;
+    }
+
     //------------------------------------------------------------< Factory >---
     public static Operation create(NodeState nodeState, VersionManager mgr) {
         return new Checkout(nodeState, mgr);
     }
+
+    public static Operation create(NodeState nodeState, NodeId activityId, VersionManager mgr) {
+        return new Checkout(nodeState, activityId, mgr);
+    }
 }
\ No newline at end of file

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateConfiguration.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateConfiguration.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateConfiguration.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateConfiguration.java Tue Sep  8 16:09:28 2009
@@ -31,21 +31,20 @@
 import javax.jcr.version.VersionException;
 
 /**
- * <code>Checkout</code>...
+ * <code>CreateConfiguration</code>...
  */
 public class CreateConfiguration extends AbstractOperation {
 
     private static Logger log = LoggerFactory.getLogger(CreateConfiguration.class);
 
     private final NodeState nodeState;
-    private final NodeState baselineState;
+
     private final VersionManager mgr;
 
     private NodeId newConfigurationId;
 
-    private CreateConfiguration(NodeState nodeState, NodeState baselineState, VersionManager mgr) {
+    private CreateConfiguration(NodeState nodeState, VersionManager mgr) {
         this.nodeState = nodeState;
-        this.baselineState = baselineState;
         this.mgr = mgr;
         // NOTE: affected-states only needed for transient modifications
     }
@@ -80,10 +79,6 @@
         return nodeState.getNodeEntry().getWorkspaceId();
     }
 
-    public NodeId getBaselineId() throws RepositoryException {
-        return baselineState.getNodeEntry().getWorkspaceId();
-    }
-
     public void setNewConfigurationId(NodeId newConfigurationId) {
         this.newConfigurationId = newConfigurationId;
     }
@@ -93,7 +88,7 @@
     }
 
     //------------------------------------------------------------< Factory >---
-    public static CreateConfiguration create(NodeState nodeState, NodeState baselineState, VersionManager mgr) {
-        return new CreateConfiguration(nodeState, baselineState, mgr);
+    public static CreateConfiguration create(NodeState nodeState, VersionManager mgr) {
+        return new CreateConfiguration(nodeState, mgr);
     }
 }
\ No newline at end of file

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java Tue Sep  8 16:09:28 2009
@@ -19,6 +19,7 @@
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.version.VersionManager;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
+import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry;
 import org.apache.jackrabbit.spi.NodeId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -75,7 +76,13 @@
         assert status == STATUS_PENDING;
         status = STATUS_PERSISTED;
         if (isActivityMerge()) {
-            // TODO invalidate
+            // TODO be more specific about what needs to be invalidated
+            // look for the root entry and invalidate the complete tree
+            HierarchyEntry entry = nodeState.getNodeEntry();
+            while (entry.getParent() != null) {
+                entry = entry.getParent();
+            }
+            entry.invalidate(true);
         } else {
             try {
                 NodeEntry vhe = mgr.getVersionHistoryEntry(nodeState);

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java Tue Sep  8 16:09:28 2009
@@ -16,7 +16,28 @@
  */
 package org.apache.jackrabbit.jcr2spi.state;
 
-import org.apache.jackrabbit.jcr2spi.ManagerProvider;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.ItemExistsException;
+import javax.jcr.PropertyType;
+import javax.jcr.ReferentialIntegrityException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.ValueFormatException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.version.VersionException;
+
+import org.apache.jackrabbit.jcr2spi.SessionImpl;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 import org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntry;
 import org.apache.jackrabbit.jcr2spi.nodetype.EffectiveNodeType;
@@ -43,25 +64,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.InvalidItemStateException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.PropertyType;
-import javax.jcr.ReferentialIntegrityException;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.ValueFormatException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
 /**
  * <code>SessionItemStateManager</code> ...
  */
@@ -83,7 +85,7 @@
 
     private final QValueFactory qValueFactory;
 
-    private final ManagerProvider mgrProvider;
+    private final SessionImpl mgrProvider;
 
     /**
      * Creates a new <code>SessionItemStateManager</code> instance.
@@ -97,7 +99,7 @@
     public SessionItemStateManager(UpdatableItemStateManager workspaceItemStateMgr,
                                    ItemStateValidator validator,
                                    QValueFactory qValueFactory,
-                                   ItemStateFactory isf, ManagerProvider mgrProvider) {
+                                   ItemStateFactory isf, SessionImpl mgrProvider) {
 
         this.workspaceItemStateMgr = workspaceItemStateMgr;
         this.transientStateMgr = new TransientItemStateManager();
@@ -133,7 +135,7 @@
         ChangeLog changeLog = transientStateMgr.getChangeLog(state, true);
         if (!changeLog.isEmpty()) {
             // only pass changelog if there are transient modifications available
-            // for the specified item and its decendants.
+            // for the specified item and its descendants.
             workspaceItemStateMgr.execute(changeLog);
             // remove states and operations just processed from the transient ISM
             transientStateMgr.dispose(changeLog);
@@ -559,7 +561,8 @@
      * @return the computed values
      */
     private QValue[] computeSystemGeneratedPropertyValues(NodeState parent,
-                                                          QPropertyDefinition def) throws RepositoryException {
+                                                          QPropertyDefinition def)
+            throws RepositoryException {
         QValue[] genValues = null;
         QValue[] qDefaultValues = def.getDefaultValues();
         if (qDefaultValues != null && qDefaultValues.length > 0) {
@@ -570,15 +573,36 @@
             Name declaringNT = def.getDeclaringNodeType();
             Name name = def.getName();
 
-            if (NameConstants.NT_BASE.equals(declaringNT) && NameConstants.JCR_PRIMARYTYPE.equals(name)) {
+            if (NameConstants.JCR_PRIMARYTYPE.equals(name)) {
                 // jcr:primaryType property
                 genValues = new QValue[]{qValueFactory.create(parent.getNodeTypeName())};
-            } else if (NameConstants.NT_BASE.equals(declaringNT) && NameConstants.JCR_MIXINTYPES.equals(name)) {
+
+            } else if (NameConstants.JCR_MIXINTYPES.equals(name)) {
                 // jcr:mixinTypes property
                 Name[] mixins = parent.getMixinTypeNames();
                 genValues = getQValues(mixins, qValueFactory);
-            }
-            else {
+
+            } else if (NameConstants.JCR_CREATED.equals(name)
+                    && NameConstants.MIX_CREATED.equals(declaringNT)) {
+                // jcr:created property of a mix:created
+                genValues = new QValue[]{qValueFactory.create(Calendar.getInstance())};
+
+            } else if (NameConstants.JCR_CREATEDBY.equals(name)
+                    && NameConstants.MIX_CREATED.equals(declaringNT)) {
+                // jcr:createdBy property of a mix:created
+                genValues = new QValue[]{qValueFactory.create(mgrProvider.getUserID(), PropertyType.STRING)};
+
+            } else if (NameConstants.JCR_LASTMODIFIED.equals(name)
+                    && NameConstants.MIX_LASTMODIFIED.equals(declaringNT)) {
+                // jcr:lastModified property of a mix:lastModified
+                genValues = new QValue[]{qValueFactory.create(Calendar.getInstance())};
+
+            } else if (NameConstants.JCR_LASTMODIFIEDBY.equals(name)
+                    && NameConstants.MIX_LASTMODIFIED.equals(declaringNT)) {
+                // jcr:lastModifiedBy property of a mix:lastModified
+                genValues = new QValue[]{qValueFactory.create(mgrProvider.getUserID(), PropertyType.STRING)};
+
+            } else {
                 // ask the SPI implementation for advice
                 genValues = qValueFactory.computeAutoValues(def);
             }

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java Tue Sep  8 16:09:28 2009
@@ -217,13 +217,16 @@
         }
 
         // deal with all additional ItemInfos that may be present.
-        NodeEntry parentEntry = nodeState.getNodeEntry();
+        // Assuming locality of the itemInfos, we keep an estimate of a parent entry.
+        // This reduces the part of the hierarchy to traverse. For large batches this
+        // optimization results in about 25% speed up.
+        NodeEntry approxParentEntry = nodeState.getNodeEntry();
         while (infos.hasNext()) {
             ItemInfo info = (ItemInfo) infos.next();
             if (info.denotesNode()) {
-                createDeepNodeState((NodeInfo) info, parentEntry, infos);
+                approxParentEntry = createDeepNodeState((NodeInfo) info, approxParentEntry, infos).getNodeEntry();
             } else {
-                createDeepPropertyState((PropertyInfo) info, parentEntry, infos);
+                createDeepPropertyState((PropertyInfo) info, approxParentEntry, infos);
             }
         }
         return nodeState;
@@ -359,9 +362,18 @@
 
             NodeEntry entry = anyParent;
             for (int i = 0; i < missingElems.length; i++) {
-                Name name = missingElems[i].getName();
-                int index = missingElems[i].getNormalizedIndex();
-                entry = createIntermediateNodeEntry(entry, name, index, infos);
+                if (missingElems[i].denotesParent()) {
+                    // Walk up the hierarchy for 'negative' paths
+                    // until the smallest common root is found
+                    entry = entry.getParent();
+                }
+                else if (missingElems[i].denotesName()) {
+                    // Add missing elements starting from the smallest common root
+                    Name name = missingElems[i].getName();
+                    int index = missingElems[i].getNormalizedIndex();
+                    entry = createIntermediateNodeEntry(entry, name, index, infos);
+                }
+                // else denotesCurrent -> ignore
             }
             if (entry == anyParent) {
                 throw new RepositoryException("Internal error while getting deep itemState");
@@ -400,9 +412,18 @@
             int i = 0;
             // NodeEntries except for the very last 'missingElem'
             while (i < missingElems.length - 1) {
-                Name name = missingElems[i].getName();
-                int index = missingElems[i].getNormalizedIndex();
-                entry = createIntermediateNodeEntry(entry, name, index, infos);
+                if (missingElems[i].denotesParent()) {
+                    // Walk up the hierarchy for 'negative' paths
+                    // until the smallest common root is found
+                    entry = entry.getParent();
+                }
+                else if (missingElems[i].denotesName()) {
+                    // Add missing elements starting from the smallest common root
+                    Name name = missingElems[i].getName();
+                    int index = missingElems[i].getNormalizedIndex();
+                    entry = createIntermediateNodeEntry(entry, name, index, infos);
+                }
+                // else denotesCurrent -> ignore
                 i++;
             }
             // create PropertyEntry for the last element if not existing yet
@@ -473,8 +494,8 @@
     }
 
     /**
-     * Returns true if the given <code>missingElems</code> start with a parent (..),
-     * a current (.) or the root element, in which case the info is not within
+     * Returns true if the given <code>missingElems</code> start with
+     * the root element, in which case the info is not within
      * the tree as it is expected.
      * See also #JCR-1797 for the corresponding enhancement request.
      *
@@ -483,7 +504,7 @@
      */
     private static boolean startsWithIllegalElement(Path.Element[] missingElems) {
         if (missingElems.length > 0) {
-            return !missingElems[0].denotesName();
+            return missingElems[0].denotesRoot();
         }
         return false;
     }

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java Tue Sep  8 16:09:28 2009
@@ -18,6 +18,7 @@
 
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
+import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 
@@ -61,6 +62,14 @@
     public void checkout(NodeState nodeState) throws UnsupportedRepositoryOperationException, LockException, RepositoryException;
 
     /**
+     * 
+     * @param nodeState
+     * @param activityId
+     * @throws RepositoryException
+     */
+    public void checkout(NodeState nodeState, NodeId activityId) throws RepositoryException;
+
+    /**
      * @param nodeState
      * @throws RepositoryException
      * @see javax.jcr.version.VersionManager#checkpoint(String)
@@ -200,12 +209,11 @@
     /**
      *
      * @param nodeState
-     * @param baselineState
      * @return
      * @throws UnsupportedRepositoryOperationException
      * @throws RepositoryException
      */
-    public NodeEntry createConfiguration(NodeState nodeState, NodeState baselineState) throws UnsupportedRepositoryOperationException, RepositoryException;
+    public NodeEntry createConfiguration(NodeState nodeState) throws UnsupportedRepositoryOperationException, RepositoryException;
 
     /**
      *

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManagerImpl.java Tue Sep  8 16:09:28 2009
@@ -34,8 +34,6 @@
 import org.apache.jackrabbit.jcr2spi.operation.RemoveActivity;
 import org.apache.jackrabbit.jcr2spi.WorkspaceManager;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.ItemNotFoundException;
@@ -60,8 +58,6 @@
  */
 public class VersionManagerImpl implements VersionManager {
 
-    private static Logger log = LoggerFactory.getLogger(VersionManagerImpl.class);
-
     private final WorkspaceManager workspaceManager;
 
     public VersionManagerImpl(WorkspaceManager workspaceManager) {
@@ -75,7 +71,11 @@
     }
 
     public void checkout(NodeState nodeState) throws RepositoryException {
-        Operation co = Checkout.create(nodeState, this);
+        checkout(nodeState, null);
+    }
+
+    public void checkout(NodeState nodeState, NodeId activityId) throws RepositoryException {
+        Operation co = Checkout.create(nodeState, activityId, this);
         workspaceManager.execute(co);
     }
 
@@ -201,8 +201,8 @@
         workspaceManager.execute(op);
     }
 
-    public NodeEntry createConfiguration(NodeState nodeState, NodeState baselineState) throws UnsupportedRepositoryOperationException, RepositoryException {
-        CreateConfiguration op = CreateConfiguration.create(nodeState, baselineState, this);
+    public NodeEntry createConfiguration(NodeState nodeState) throws UnsupportedRepositoryOperationException, RepositoryException {
+        CreateConfiguration op = CreateConfiguration.create(nodeState, this);
         workspaceManager.execute(op);
         return workspaceManager.getHierarchyManager().getNodeEntry(op.getNewConfigurationId());
     }

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/SessionImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/SessionImporter.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/SessionImporter.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/SessionImporter.java Tue Sep  8 16:09:28 2009
@@ -46,7 +46,6 @@
 import org.apache.jackrabbit.spi.commons.value.ValueFormat;
 import org.apache.jackrabbit.util.Base64;
 import org.apache.jackrabbit.util.TransientFileFactory;
-import org.apache.jackrabbit.uuid.UUID;
 import org.apache.jackrabbit.value.ValueHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -72,6 +71,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Stack;
+import java.util.UUID;
 
 /**
  * <code>SessionImporter</code>...

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AddPropertyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AddPropertyTest.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AddPropertyTest.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AddPropertyTest.java Tue Sep  8 16:09:28 2009
@@ -41,6 +41,11 @@
         testRootNode.save();
     }
 
+    protected void tearDown() throws Exception {
+        testNode = null;
+        super.tearDown();
+    }
+
     private static void assertItemStatus(Item item, int status) throws NotExecutableException {
         if (!(item instanceof ItemImpl)) {
             throw new NotExecutableException("org.apache.jackrabbit.jcr2spi.ItemImpl expected");

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ExternalModificationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ExternalModificationTest.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ExternalModificationTest.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ExternalModificationTest.java Tue Sep  8 16:09:28 2009
@@ -53,7 +53,10 @@
     protected void tearDown() throws Exception {
         if (testSession != null) {
             testSession.logout();
+            testSession = null;
         }
+        destParentNode = null;
+        refNode = null;
         super.tearDown();
     }
 

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/GetPropertyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/GetPropertyTest.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/GetPropertyTest.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/GetPropertyTest.java Tue Sep  8 16:09:28 2009
@@ -62,6 +62,7 @@
     protected void tearDown() throws Exception {
         if (readOnly != null) {
             readOnly.logout();
+            readOnly = null;
         }
         super.tearDown();
     }

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java Tue Sep  8 16:09:28 2009
@@ -16,30 +16,26 @@
  */
 package org.apache.jackrabbit.jcr2spi;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.jackrabbit.test.AbstractJCRTest;
-import org.apache.jackrabbit.test.NotExecutableException;
+import java.util.HashSet;
+import java.util.Set;
 
 import javax.jcr.Node;
-import javax.jcr.PropertyIterator;
 import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
 import javax.jcr.Property;
+import javax.jcr.PropertyIterator;
+import javax.jcr.RepositoryException;
 import javax.jcr.Session;
-import java.util.Calendar;
-import java.util.Set;
-import java.util.HashSet;
+
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.NotExecutableException;
 
 /**
  * <code>HierarchyNodeTest</code>...
  */
 public class HierarchyNodeTest extends AbstractJCRTest {
 
-    private static Logger log = LoggerFactory.getLogger(HierarchyNodeTest.class);
-
-    private Set hierarchyNodeProps = new HashSet();
-    private Set resourceProps = new HashSet();
+    private Set<String> hierarchyNodeProps = new HashSet<String>();
+    private Set<String> resourceProps = new HashSet<String>();
 
     private String ntFolder;
     private String ntFile;
@@ -59,9 +55,11 @@
 
         hierarchyNodeProps.add(jcrPrefix+":primaryType");
         hierarchyNodeProps.add(jcrPrefix+":created");
+        hierarchyNodeProps.add(jcrPrefix+":createdBy");
 
         resourceProps.add(jcrPrefix+":primaryType");
         resourceProps.add(jcrPrefix+":lastModified");
+        resourceProps.add(jcrPrefix+":lastModifiedBy");
         resourceProps.add(jcrPrefix+":mimeType");
         resourceProps.add(jcrPrefix+":data");
 
@@ -70,7 +68,6 @@
             fileNode = folder.addNode("file", ntFile);
 
             Node content = fileNode.addNode(jcrPrefix + ":content", ntResource);
-            content.setProperty(jcrPrefix + ":lastModified", Calendar.getInstance());
             content.setProperty(jcrPrefix + ":mimeType", "text/plain");
             content.setProperty(jcrPrefix + ":data", "some plain text");
 
@@ -99,7 +96,7 @@
 
         // Then output the properties
         PropertyIterator properties = node.getProperties();
-        Set set = new HashSet();
+        Set<String> set = new HashSet<String>();
         while (properties.hasNext()) {
             Property property = properties.nextProperty();
             set.add(property.getName());

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveCombinedTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveCombinedTest.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveCombinedTest.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveCombinedTest.java Tue Sep  8 16:09:28 2009
@@ -39,6 +39,7 @@
     protected void tearDown() throws Exception {
         if (testSession != null) {
             testSession.logout();
+            testSession = null;
         }
         super.tearDown();
     }

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/PropertyLengthTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/PropertyLengthTest.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/PropertyLengthTest.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/PropertyLengthTest.java Tue Sep  8 16:09:28 2009
@@ -99,7 +99,7 @@
     }
 
     private static void checkLength(Property p) throws RepositoryException {
-        if (p.getDefinition().isMultiple()) {
+        if (p.isMultiple()) {
             Value[] vals = p.getValues();
             long[] lengths = p.getLengths();
             for (int i = 0; i < lengths.length; i++) {

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java Tue Sep  8 16:09:28 2009
@@ -19,6 +19,7 @@
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -34,6 +35,7 @@
         TestSuite suite = new TestSuite("jcr2spi tests");
 
         suite.addTestSuite(AccessByRelativePathTest.class);
+        suite.addTestSuite(GetItemsTest.class);
 
         // get node(s)
         suite.addTestSuite(SNSIndexTest.class);
@@ -45,6 +47,7 @@
         suite.addTestSuite(AddNewPropertyTest.class);
         suite.addTestSuite(SingleValuedPropertyTest.class);
         suite.addTestSuite(MultiValuedPropertyTest.class);
+        suite.addTestSuite(BinaryTest.class);
 
         // change mixin types
         suite.addTestSuite(MixinModificationTest.class);
@@ -85,7 +88,7 @@
         suite.addTestSuite(ReorderNewAndSavedTest.class);
         suite.addTestSuite(ReorderMixedTest.class);
         suite.addTestSuite(ReorderMoveTest.class);
-        
+
         // update
         suite.addTestSuite(UpdateTest.class);
 
@@ -98,7 +101,7 @@
 
         // repository
         suite.addTestSuite(LoginTest.class);
-        
+
         return suite;
     }
 }
\ No newline at end of file

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/MandatoryItemTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/MandatoryItemTest.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/MandatoryItemTest.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/MandatoryItemTest.java Tue Sep  8 16:09:28 2009
@@ -56,6 +56,7 @@
             }
         }
         if (childPropDef == null && childNodeDef == null) {
+            cleanUp();
             throw new NotExecutableException();
         }
     }

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeImplTest.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeImplTest.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeImplTest.java Tue Sep  8 16:09:28 2009
@@ -41,12 +41,14 @@
         if (nt instanceof NodeTypeImpl) {
             nodeType = (NodeTypeImpl) nt;
         } else {
+            cleanUp();
             throw new NotExecutableException("NodeTypeImpl expected.");
         }
 
         if (superuser instanceof NameResolver) {
             resolver = (NameResolver) superuser;
         } else {
+            cleanUp();
              throw new NotExecutableException();
         }
     }

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java Tue Sep  8 16:09:28 2009
@@ -15,6 +15,7 @@
  */
 package org.apache.jackrabbit.jcr2spi.query;
 
+import org.apache.jackrabbit.test.NotExecutableException;
 import org.apache.jackrabbit.test.api.query.AbstractQueryTest;
 
 import javax.jcr.RepositoryException;
@@ -31,8 +32,9 @@
 
     /**
      * Queries the child nodes of the root node.
+     * @throws NotExecutableException 
      */
-    public void testQueryChildNodesOfRoot() throws RepositoryException {
+    public void testQueryChildNodesOfRoot() throws RepositoryException, NotExecutableException {
         List nodes = new ArrayList();
         for (NodeIterator it = superuser.getRootNode().getNodes(); it.hasNext(); ) {
             nodes.add(it.nextNode());
@@ -41,7 +43,7 @@
         executeXPathQuery(superuser, "/jcr:root/*", children);
     }
 
-    public void testRemappedNamespace() throws RepositoryException {
+    public void testRemappedNamespace() throws RepositoryException, NotExecutableException {
         String namespaceURI = "http://jackrabbit.apache.org/spi/test";
         String defaultPrefix = "spiTest";
 

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/xml/SessionImportTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/xml/SessionImportTest.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/xml/SessionImportTest.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/xml/SessionImportTest.java Tue Sep  8 16:09:28 2009
@@ -20,7 +20,6 @@
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.test.AbstractJCRTest;
 import org.apache.jackrabbit.test.NotExecutableException;
-import org.apache.jackrabbit.uuid.UUID;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;
@@ -39,6 +38,7 @@
 import java.io.InputStream;
 import java.util.Arrays;
 import java.util.List;
+import java.util.UUID;
 
 /**
  * <code>SessionImportTest</code>...

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-parent/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-parent/pom.xml?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-parent/pom.xml (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-parent/pom.xml Tue Sep  8 16:09:28 2009
@@ -73,7 +73,7 @@
       <plugin>
         <!-- http://maven.apache.org/plugins/maven-idea-plugin/ -->
         <artifactId>maven-idea-plugin</artifactId>
-        <version>2.0</version>
+        <version>2.2</version>
         <configuration>
           <downloadSources>true</downloadSources>
           <jdkLevel>1.5</jdkLevel>
@@ -147,7 +147,7 @@
       <dependency>
         <groupId>javax.jcr</groupId>
         <artifactId>jcr</artifactId>
-        <version>2.0-b19</version>
+        <version>2.0-b114</version>
         <scope>provided</scope>
       </dependency>
       <dependency>

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-spi-commons/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-spi-commons/pom.xml?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-spi-commons/pom.xml (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-spi-commons/pom.xml Tue Sep  8 16:09:28 2009
@@ -139,6 +139,10 @@
       <artifactId>commons-collections</artifactId>
     </dependency>
     <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
     </dependency>

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java?rev=812570&r1=812569&r2=812570&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java Tue Sep  8 16:09:28 2009
@@ -16,60 +16,29 @@
  */
 package org.apache.jackrabbit.spi.commons;
 
-import org.apache.jackrabbit.spi.Batch;
-import org.apache.jackrabbit.spi.SessionInfo;
-import org.apache.jackrabbit.spi.ItemId;
-import org.apache.jackrabbit.spi.NodeId;
-import org.apache.jackrabbit.spi.Name;
-import org.apache.jackrabbit.spi.LockInfo;
-import org.apache.jackrabbit.spi.EventFilter;
-import org.apache.jackrabbit.spi.Path;
-import org.apache.jackrabbit.spi.Subscription;
-import org.apache.jackrabbit.spi.EventBundle;
-import org.apache.jackrabbit.spi.QNodeDefinition;
-import org.apache.jackrabbit.spi.QPropertyDefinition;
-import org.apache.jackrabbit.spi.PropertyId;
-import org.apache.jackrabbit.spi.QueryInfo;
-import org.apache.jackrabbit.spi.QNodeTypeDefinition;
-import org.apache.jackrabbit.spi.QValue;
-import org.apache.jackrabbit.spi.ItemInfo;
-import org.apache.jackrabbit.spi.commons.namespace.NamespaceMapping;
-import org.apache.jackrabbit.spi.commons.nodetype.compact.CompactNodeTypeDefReader;
-import org.apache.jackrabbit.spi.commons.nodetype.compact.ParseException;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.PathNotFoundException;
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.ValueFormatException;
-import javax.jcr.AccessDeniedException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.NoSuchWorkspaceException;
-import javax.jcr.InvalidItemStateException;
-import javax.jcr.ReferentialIntegrityException;
-import javax.jcr.MergeException;
-import javax.jcr.NamespaceException;
-import javax.jcr.Credentials;
-import javax.jcr.LoginException;
-import javax.jcr.SimpleCredentials;
-import javax.jcr.query.InvalidQueryException;
-import javax.jcr.lock.LockException;
-import javax.jcr.version.VersionException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.InvalidNodeTypeDefinitionException;
-import javax.jcr.nodetype.NodeTypeExistsException;
-import java.io.InputStream;
 import java.io.Reader;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.List;
 import java.util.ArrayList;
-import java.util.Set;
-import java.util.HashSet;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.jcr.Credentials;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.NoSuchWorkspaceException;
+import javax.jcr.RepositoryException;
+import javax.jcr.UnsupportedRepositoryOperationException;
+
+import org.apache.jackrabbit.spi.ItemId;
+import org.apache.jackrabbit.spi.ItemInfo;
+import org.apache.jackrabbit.spi.NodeId;
+import org.apache.jackrabbit.spi.NodeInfo;
+import org.apache.jackrabbit.spi.QValue;
+import org.apache.jackrabbit.spi.SessionInfo;
+import org.apache.jackrabbit.spi.commons.nodetype.compact.ParseException;
 
 /**
  * <code>AbstractReadableRepositoryService</code> provides an abstract base
@@ -84,29 +53,14 @@
             Arrays.asList("add_node", "set_property", "remove"));
 
     /**
-     * The repository descriptors.
-     */
-    protected final Map<String, String> descriptors;
-
-    /**
-     * The fixed set of namespaces known to the repository service.
-     */
-    protected final NamespaceMapping namespaces = new NamespaceMapping();
-
-    /**
-     * The fixed set of node type definitions known to the repository service.
-     */
-    protected final Map<Name, QNodeTypeDefinition> nodeTypeDefs = new HashMap<Name, QNodeTypeDefinition>();
-
-    /**
-     * The node definition of the root node.
+     * The list of workspaces that this repository service exposes.
      */
-    protected QNodeDefinition rootNodeDefinition;
+    protected final List<String> wspNames;
 
     /**
-     * The list of workspaces that this repository service exposes.
+     * The name of the default workspace
      */
-    protected final List<String> wspNames;
+    protected final String defaulWsp;
 
     /**
      * Creates a new <code>AbstractReadableRepositoryService</code>.
@@ -117,164 +71,70 @@
      *                    URIs.
      * @param cnd         a reader on the compact node type definition.
      * @param wspNames    a list of workspace names.
-     * @throws RepositoryException if the namespace mappings are invalid.
-     * @throws ParseException      if an error occurs while parsing the CND.
+     * @param defaultWsp  name of the default workspace
+     * @throws RepositoryException       if the namespace mappings are invalid.
+     * @throws ParseException            if an error occurs while parsing the CND.
+     * @throws IllegalArgumentException  if <code>defaultWsp</code> is <code>null</code>
      */
-    public AbstractReadableRepositoryService(Map<String, String> descriptors,
+    public AbstractReadableRepositoryService(Map<String, QValue[]> descriptors,
                                              Map<String, String> namespaces,
                                              Reader cnd,
-                                             List<String> wspNames)
-            throws RepositoryException, ParseException {
-        this.descriptors = Collections.unmodifiableMap(new HashMap<String, String>(descriptors));
-        for (Map.Entry<String, String> entry : namespaces.entrySet()) {
-            this.namespaces.setMapping(entry.getKey(), entry.getValue());
-        }
-        CompactNodeTypeDefReader reader = new CompactNodeTypeDefReader(cnd, "", this.namespaces);
-        for (QNodeTypeDefinition def : reader.getNodeTypeDefinitions()) {
-            nodeTypeDefs.put(def.getName(), def);
-        }
-        this.wspNames = Collections.unmodifiableList(new ArrayList<String>(wspNames));
-    }
-
-    //---------------------------< subclass responsibility >--------------------
-
-    /**
-     * Create the root node definition.
-     *
-     * @return the root node definition for a workspace.
-     * @throws RepositoryException if an error occurs.
-     */
-    protected abstract QNodeDefinition createRootNodeDefinition()
-            throws RepositoryException;
+                                             List<String> wspNames,
+                                             String defaultWsp)
+            throws RepositoryException, ParseException, IllegalArgumentException {
 
-    /**
-     * Checks if the given <code>credentials</code> are valid.
-     *
-     * @param credentials the credentials to check.
-     * @param workspaceName the workspace to access.
-     * @throws LoginException if the credentials are invalid.
-     */
-    protected abstract void checkCredentials(Credentials credentials,
-                                             String workspaceName)
-            throws LoginException;
+        super(descriptors, namespaces, cnd);
 
-    //---------------------< may be overwritten by subclasses>------------------
-
-    /**
-     * Checks the type of the <code>sessionInfo</code> instance. This default
-     * implementation checks if <code>sessionInfo</code> is of type
-     * {@link SessionInfoImpl}, otherwise throws a {@link RepositoryException}.
-     *
-     * @param sessionInfo the session info to check.
-     * @throws RepositoryException if the given <code>sessionInfo</code> is not
-     *                             of the required type for this repository
-     *                             service implementation.
-     */
-    protected void checkSessionInfo(SessionInfo sessionInfo)
-            throws RepositoryException {
-        if (sessionInfo instanceof SessionInfoImpl) {
-            return;
+        if (defaultWsp == null) {
+            throw new IllegalArgumentException("Default workspace is null");
         }
-        throw new RepositoryException("SessionInfo not of type "
-                + SessionInfoImpl.class.getName());
-    }
 
-    /**
-     * Creates a session info instance for the given <code>userId</code> and
-     * <code>workspaceName</code>. This default implementation creates a
-     * {@link SessionInfoImpl} instance and sets the userId and workspaceName.
-     *
-     * @param userId the userId.
-     * @param workspaceName the name of the workspace to access.
-     * @return a session info instance for the given <code>userId</code> and
-     *         <code>workspaceName</code>.
-     */
-    protected SessionInfo createSessionInfo(String userId,
-                                            String workspaceName) {
-        SessionInfoImpl s = new SessionInfoImpl();
-        s.setUserID(userId);
-        s.setWorkspacename(workspaceName);
-        return s;
+        this.wspNames = Collections.unmodifiableList(new ArrayList<String>(wspNames));
+        this.defaulWsp = defaultWsp;
     }
 
-    //----------------------------< login >-------------------------------------
+    //---------------------< may be overwritten by subclasses>------------------
 
     /**
-     * This default implementation does:
-     * <ul>
-     * <li>calls {@link #checkCredentials(Credentials, String)}</li>
-     * <li>checks if the given <code>workspaceName</code> is in
-     * {@link #wspNames} otherwise throws a {@link NoSuchWorkspaceException}.</li>
-     * <li>calls {@link #createSessionInfo(String, String)} with a <code>null</code>
-     * <code>userId</code> or the <code>userId</code> from <code>credentials</code>
-     * if it is of type {@link SimpleCredentials}.</li>
-     * </ul>
-     * @param credentials the credentials for the login.
-     * @param workspaceName the name of the workspace to log in.
-     * @return the session info.
-     * @throws LoginException if the credentials are invalid.
-     * @throws NoSuchWorkspaceException if <code>workspaceName</code> is unknown.
-     * @throws RepositoryException if another error occurs.
-     */
-    public SessionInfo obtain(Credentials credentials, String workspaceName)
-            throws LoginException, NoSuchWorkspaceException, RepositoryException {
-        checkCredentials(credentials, workspaceName);
-        if (!wspNames.contains(workspaceName)) {
+     * Checks whether the <code>workspaceName</code> is valid.
+     * @param workspaceName  name of the workspace to check
+     * @throws NoSuchWorkspaceException  if <code>workspaceName</code> is neither in the
+     *   list of workspaces nor null (i.e. default workspace).
+     */
+    @Override
+    protected void checkWorkspace(String workspaceName) throws NoSuchWorkspaceException {
+        if (workspaceName != null && !wspNames.contains(workspaceName)) {
             throw new NoSuchWorkspaceException(workspaceName);
         }
-        String userId = null;
-        if (credentials instanceof SimpleCredentials) {
-            userId = ((SimpleCredentials) credentials).getUserID();
-        }
-        return createSessionInfo(userId, workspaceName);
     }
 
-    /**
-     * This default implementation returns the session info retuned by the call
-     * to {@link #createSessionInfo(String, String)} with the userId taken
-     * from the passed <code>sessionInfo</code>.
-     */
-    public SessionInfo obtain(SessionInfo sessionInfo, String workspaceName)
-            throws LoginException, NoSuchWorkspaceException, RepositoryException {
-        return createSessionInfo(sessionInfo.getUserID(), workspaceName);
-    }
-
-    /**
-     * This default implementation returns the session info returned by the call
-     * to {@link #obtain(Credentials, String)} with the workspaceName taken from
-     * the passed <code>sessionInfo</code>.
-     */
-    public SessionInfo impersonate(SessionInfo sessionInfo, Credentials credentials)
-            throws LoginException, RepositoryException {
-        return obtain(credentials, sessionInfo.getWorkspaceName());
-    }
+    @Override
+    protected SessionInfo createSessionInfo(Credentials credentials, String workspaceName)
+            throws RepositoryException {
 
-    /**
-     * This default implementation does nothing.
-     */
-    public void dispose(SessionInfo sessionInfo) throws RepositoryException {
-        // do nothing
+        return super.createSessionInfo(credentials, workspaceName == null? defaulWsp : workspaceName);
     }
 
     //-----------------------------< reading >----------------------------------
 
     /**
-     * This default implementation returns an iterator over the item infos
-     * returned by the call to {@link #getNodeInfo(SessionInfo, NodeId)}.
+     * This default implementation returns the first item returned by the call to
+     * {@link #getItemInfos(SessionInfo, NodeId)}. The underlying assumption here is that
+     * the implementation and the persistence layer are optimized for batch reading. That is,
+     * a call to <code>getItemInfos</code> is no more expensive than retrieving the single
+     * <code>NodeInfo</code> only. If this assumption does not hold, subclasses should override
+     * this method.
      */
-    public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, NodeId nodeId) throws
-            ItemNotFoundException, RepositoryException {
-        return Collections.singleton(getNodeInfo(sessionInfo, nodeId)).iterator();
-    }
-
-    //--------------------------< descriptors >---------------------------------
+    public NodeInfo getNodeInfo(SessionInfo sessionInfo, NodeId nodeId) throws ItemNotFoundException,
+            RepositoryException {
 
-    /**
-     * This default implementation returns the descriptors that were passed
-     * to the constructor of this repository service.
-     */
-    public Map<String, String> getRepositoryDescriptors() throws RepositoryException {
-        return descriptors;
+        Iterator<? extends ItemInfo> infos = getItemInfos(sessionInfo, nodeId);
+        if (infos.hasNext()) {
+            return (NodeInfo) infos.next();
+        }
+        else {
+            throw new ItemNotFoundException();
+        }
     }
 
     //-------------------------< workspace names >------------------------------
@@ -284,8 +144,7 @@
      * with the <code>sessionInfo</code>, then returns the workspaces that were
      * passed to the constructor of this repository service.
      */
-    public String[] getWorkspaceNames(SessionInfo sessionInfo) throws
-            RepositoryException {
+    public String[] getWorkspaceNames(SessionInfo sessionInfo) throws RepositoryException {
         checkSessionInfo(sessionInfo);
         return wspNames.toArray(new String[wspNames.size()]);
     }
@@ -310,488 +169,4 @@
         }
         return true;
     }
-
-    //-----------------------------< node types >-------------------------------
-
-    /**
-     * This default implementation first calls {@link #checkSessionInfo(SessionInfo)}
-     * with the <code>sessionInfo</code>,
-     */
-    public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo) throws
-            RepositoryException {
-        checkSessionInfo(sessionInfo);
-        return nodeTypeDefs.values().iterator();
-    }
-
-    /**
-     * This default implementation first calls {@link #checkSessionInfo(SessionInfo)}
-     * with the <code>sessionInfo</code>, then gathers the {@link QNodeTypeDefinition}s
-     * with the given <code>nodetypeNames</code>. If one of the nodetypeNames
-     * is not a valid node type definition then a {@link RepositoryException}
-     * is thrown.
-     */
-    public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo, Name[] nodetypeNames)
-            throws RepositoryException {
-        checkSessionInfo(sessionInfo);
-        List<QNodeTypeDefinition> ntDefs = new ArrayList<QNodeTypeDefinition>();
-        for (Name nodetypeName : nodetypeNames) {
-            QNodeTypeDefinition def = nodeTypeDefs.get(nodetypeName);
-            if (def == null) {
-                throw new RepositoryException("unknown node type: " + nodetypeName);
-            }
-            ntDefs.add(def);
-        }
-        return ntDefs.iterator();
-    }
-
-    /**
-     * This default implementation first calls {@link #checkSessionInfo(SessionInfo)}
-     * with the <code>sessionInfo</code>, then lazily initializes {@link #rootNodeDefinition}
-     * if <code>nodeId</code> denotes the root node; otherwise throws a
-     * {@link UnsupportedRepositoryOperationException}.
-     */
-    public QNodeDefinition getNodeDefinition(SessionInfo sessionInfo,
-                                             NodeId nodeId)
-            throws RepositoryException {
-        checkSessionInfo(sessionInfo);
-        if (nodeId.getUniqueID() == null && nodeId.getPath().denotesRoot()) {
-            synchronized (this) {
-                if (rootNodeDefinition == null) {
-                    rootNodeDefinition = createRootNodeDefinition();
-                }
-                return rootNodeDefinition;
-            }
-        }
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public QPropertyDefinition getPropertyDefinition(SessionInfo sessionInfo,
-                                                     PropertyId propertyId)
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void registerNodeTypes(SessionInfo sessionInfo, QNodeTypeDefinition[] nodeTypeDefinitions, boolean allowUpdate) throws InvalidNodeTypeDefinitionException, NodeTypeExistsException, UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void unregisterNodeTypes(SessionInfo sessionInfo, Name[] nodeTypeNames) throws UnsupportedRepositoryOperationException, NoSuchNodeTypeException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    //-----------------------------< namespaces >-------------------------------
-
-    /**
-     * This default implementation first calls {@link #checkSessionInfo(SessionInfo)}
-     * with the <code>sessionInfo</code>, then returns the prefix to namespace
-     * URL mapping that was provided in the constructor of this repository
-     * service.
-     */
-    public Map<String, String> getRegisteredNamespaces(SessionInfo sessionInfo) throws
-            RepositoryException {
-        checkSessionInfo(sessionInfo);
-        return namespaces.getPrefixToURIMapping();
-    }
-
-    /**
-     * This default implementation first calls {@link #checkSessionInfo(SessionInfo)}
-     * with the <code>sessionInfo</code>, then returns the namepsace URI for the
-     * given <code>prefix</code>.
-     */
-    public String getNamespaceURI(SessionInfo sessionInfo, String prefix)
-            throws NamespaceException, RepositoryException {
-        checkSessionInfo(sessionInfo);
-        return namespaces.getURI(prefix);
-    }
-
-    /**
-     * This default implementation first calls {@link #checkSessionInfo(SessionInfo)}
-     * with the <code>sessionInfo</code>, then return the namespace prefix for
-     * the given <code>uri</code>.
-     */
-    public String getNamespacePrefix(SessionInfo sessionInfo, String uri)
-            throws NamespaceException, RepositoryException {
-        checkSessionInfo(sessionInfo);
-        return namespaces.getPrefix(uri);
-    }
-
-    //-----------------------------< write methods >----------------------------
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public Batch createBatch(SessionInfo sessionInfo, ItemId itemId)
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void submit(Batch batch) throws PathNotFoundException, ItemNotFoundException, NoSuchNodeTypeException, ValueFormatException, VersionException, LockException, ConstraintViolationException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void importXml(SessionInfo sessionInfo,
-                          NodeId parentId,
-                          InputStream xmlStream,
-                          int uuidBehaviour) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void move(SessionInfo sessionInfo,
-                     NodeId srcNodeId,
-                     NodeId destParentNodeId,
-                     Name destName) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void copy(SessionInfo sessionInfo,
-                     String srcWorkspaceName,
-                     NodeId srcNodeId,
-                     NodeId destParentNodeId,
-                     Name destName) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void update(SessionInfo sessionInfo,
-                       NodeId nodeId,
-                       String srcWorkspaceName)
-            throws NoSuchWorkspaceException, AccessDeniedException, LockException, InvalidItemStateException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void clone(SessionInfo sessionInfo,
-                      String srcWorkspaceName,
-                      NodeId srcNodeId,
-                      NodeId destParentNodeId,
-                      Name destName,
-                      boolean removeExisting) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public LockInfo lock(SessionInfo sessionInfo,
-                         NodeId nodeId,
-                         boolean deep,
-                         boolean sessionScoped)
-            throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public LockInfo lock(SessionInfo sessionInfo, NodeId nodeId, boolean deep,
-                         boolean sessionScoped, long timeoutHint, String ownerHint)
-            throws UnsupportedRepositoryOperationException, LockException,
-            AccessDeniedException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @return <code>null</code>.
-     */
-    public LockInfo getLockInfo(SessionInfo sessionInfo, NodeId nodeId)
-            throws AccessDeniedException, RepositoryException {
-        return null;
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void refreshLock(SessionInfo sessionInfo, NodeId nodeId)
-            throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void unlock(SessionInfo sessionInfo, NodeId nodeId)
-            throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public NodeId checkin(SessionInfo sessionInfo, NodeId nodeId)
-            throws VersionException, UnsupportedRepositoryOperationException, InvalidItemStateException, LockException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void checkout(SessionInfo sessionInfo, NodeId nodeId)
-            throws UnsupportedRepositoryOperationException, LockException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public NodeId checkpoint(SessionInfo sessionInfo, NodeId nodeId)
-            throws UnsupportedRepositoryOperationException, LockException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void removeVersion(SessionInfo sessionInfo,
-                              NodeId versionHistoryId,
-                              NodeId versionId)
-            throws ReferentialIntegrityException, AccessDeniedException, UnsupportedRepositoryOperationException, VersionException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void restore(SessionInfo sessionInfo,
-                        NodeId nodeId,
-                        NodeId versionId,
-                        boolean removeExisting) throws VersionException, PathNotFoundException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void restore(SessionInfo sessionInfo,
-                        NodeId[] versionIds,
-                        boolean removeExisting) throws ItemExistsException, UnsupportedRepositoryOperationException, VersionException, LockException, InvalidItemStateException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException
-     *          always.
-     */
-    public Iterator<NodeId> merge(SessionInfo sessionInfo,
-                                  NodeId nodeId,
-                                  String srcWorkspaceName,
-                                  boolean bestEffort) throws
-            NoSuchWorkspaceException, AccessDeniedException, MergeException,
-            LockException, InvalidItemStateException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException
-     *          always.
-     */
-    public Iterator<NodeId> merge(SessionInfo sessionInfo,
-                                  NodeId nodeId,
-                                  String srcWorkspaceName,
-                                  boolean bestEffort,
-                                  boolean isShallow) throws
-            NoSuchWorkspaceException, AccessDeniedException, MergeException,
-            LockException, InvalidItemStateException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void resolveMergeConflict(SessionInfo sessionInfo,
-                                     NodeId nodeId,
-                                     NodeId[] mergeFailedIds,
-                                     NodeId[] predecessorIds)
-            throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void addVersionLabel(SessionInfo sessionInfo,
-                                NodeId versionHistoryId,
-                                NodeId versionId,
-                                Name label,
-                                boolean moveLabel) throws VersionException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void removeVersionLabel(SessionInfo sessionInfo,
-                                   NodeId versionHistoryId,
-                                   NodeId versionId,
-                                   Name label) throws VersionException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public NodeId createActivity(SessionInfo sessionInfo, String title) throws UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void removeActivity(SessionInfo sessionInfo, NodeId activityId) throws UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public Iterator mergeActivity(SessionInfo sessionInfo, NodeId activityId) throws UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public NodeId createConfiguration(SessionInfo sessionInfo, NodeId nodeId, NodeId baselineId) throws UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    //-----------------------------< observation >------------------------------
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public EventFilter createEventFilter(SessionInfo sessionInfo,
-                                         int eventTypes,
-                                         Path absPath,
-                                         boolean isDeep,
-                                         String[] uuid,
-                                         Name[] nodeTypeName,
-                                         boolean noLocal)
-            throws UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public Subscription createSubscription(SessionInfo sessionInfo,
-                                           EventFilter[] filters)
-            throws UnsupportedRepositoryOperationException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void updateEventFilters(Subscription subscription,
-                                   EventFilter[] filters)
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public EventBundle[] getEvents(Subscription subscription, long timeout)
-            throws RepositoryException, InterruptedException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public EventBundle getEvents(SessionInfo sessionInfo, EventFilter filter,
-                                   long after) throws
-            RepositoryException, UnsupportedRepositoryOperationException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void dispose(Subscription subscription) throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    //-------------------------------------------------< namespace registry >---
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void registerNamespace(SessionInfo sessionInfo,
-                                  String prefix,
-                                  String uri) throws NamespaceException, UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void unregisterNamespace(SessionInfo sessionInfo, String uri)
-            throws NamespaceException, UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    //-----------------------------------------------< Workspace Management >---
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void createWorkspace(SessionInfo sessionInfo, String name, String srcWorkspaceName) throws AccessDeniedException, UnsupportedRepositoryOperationException, NoSuchWorkspaceException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException always.
-     */
-    public void deleteWorkspace(SessionInfo sessionInfo, String name) throws AccessDeniedException, UnsupportedRepositoryOperationException, NoSuchWorkspaceException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-
-    }
-    
-    //-------------------------------< query >----------------------------------
-
-    public String[] getSupportedQueryLanguages(SessionInfo sessionInfo) throws
-            RepositoryException {
-        checkSessionInfo(sessionInfo);
-        return new String[0];
-    }
-
-    public String[] checkQueryStatement(SessionInfo sessionInfo, String statement,
-                                    String language, Map namespaces) throws
-            InvalidQueryException, RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement,
-                                  String language, Map<String, String> namespaces, long limit,
-                                  long offset, Map<String, QValue> values) throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
 }



Mime
View raw message