jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r165136 - in /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: value/BLOBFileValue.java xml/Importer.java xml/SessionImporter.java xml/WorkspaceImporter.java
Date Thu, 28 Apr 2005 13:22:49 GMT
Author: stefan
Date: Thu Apr 28 06:22:48 2005
New Revision: 165136

URL: http://svn.apache.org/viewcvs?rev=165136&view=rev
Log:
fixed JCR-118: Session.importXML and Workspace.importXML throw wrong exception

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/Importer.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java?rev=165136&r1=165135&r2=165136&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
Thu Apr 28 06:22:48 2005
@@ -39,7 +39,7 @@
 
 /**
  * <code>BLOBFileValue</code> represents a binary <code>Value</code>
that
- * is backed by a file. Unlike <code>javax.jcr.BinaryValue</code> it has no
+ * is backed by a file. Unlike <code>BinaryValue</code> it has no
  * state, i.e. the <code>getStream()</code> method always returns a fresh
  * <code>InputStream</code> instance.
  */

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/Importer.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/Importer.java?rev=165136&r1=165135&r2=165136&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/Importer.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/Importer.java Thu Apr
28 06:22:48 2005
@@ -30,15 +30,6 @@
  */
 public interface Importer {
 
-    int IMPORT_UUID_CREATE_NEW =
-            ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW;
-    int IMPORT_UUID_COLLISION_REMOVE_EXISTING =
-            ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING;
-    int IMPORT_UUID_COLLISION_REPLACE_EXISTING =
-            ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING;
-    int IMPORT_UUID_COLLISION_THROW =
-            ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW;
-
     /**
      * @throws RepositoryException
      */

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java?rev=165136&r1=165135&r2=165136&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java
Thu Apr 28 06:22:48 2005
@@ -125,7 +125,7 @@
             if (importTargetNode.getPath().startsWith(conflicting.getPath())) {
                 String msg = "cannot remove ancestor node";
                 log.debug(msg);
-                throw new RepositoryException(msg);
+                throw new ConstraintViolationException (msg);
             }
             // remove conflicting
             conflicting.remove();

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java?rev=165136&r1=165135&r2=165136&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
Thu Apr 28 06:22:48 2005
@@ -19,7 +19,6 @@
 import org.apache.jackrabbit.core.BatchedItemOperations;
 import org.apache.jackrabbit.core.Constants;
 import org.apache.jackrabbit.core.HierarchyManager;
-import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.MalformedPathException;
 import org.apache.jackrabbit.core.NamespaceResolver;
 import org.apache.jackrabbit.core.NodeId;
@@ -28,7 +27,6 @@
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.core.WorkspaceImpl;
-import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.nodetype.EffectiveNodeType;
 import org.apache.jackrabbit.core.nodetype.NodeDef;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
@@ -38,6 +36,7 @@
 import org.apache.jackrabbit.core.util.Base64;
 import org.apache.jackrabbit.core.util.ReferenceChangeTracker;
 import org.apache.jackrabbit.core.util.uuid.UUID;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.log4j.Logger;
 
 import javax.jcr.ImportUUIDBehavior;
@@ -171,7 +170,7 @@
                 if (p1.equals(p0) || p1.isAncestorOf(p0)) {
                     String msg = "cannot remove ancestor node";
                     log.debug(msg);
-                    throw new RepositoryException(msg);
+                    throw new ConstraintViolationException(msg);
                 }
             } catch (MalformedPathException mpe) {
                 // should never get here...



Mime
View raw message