chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1131065 - in /chemistry/opencmis/trunk: chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/mai...
Date Fri, 03 Jun 2011 15:15:36 GMT
Author: fmui
Date: Fri Jun  3 15:15:16 2011
New Revision: 1131065

URL: http://svn.apache.org/viewvc?rev=1131065&view=rev
Log:
let at least OpenCMIS clients understand OpenCMIS server exceptions over AtomPub

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisConnectionException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisConstraintException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisContentAlreadyExistsException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisFilterNotValidException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisInvalidArgumentException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisNameConstraintViolationException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisNotSupportedException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisObjectNotFoundException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisPermissionDeniedException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisRuntimeException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisStorageException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisStreamNotSupportedException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisUpdateConflictException.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisVersioningException.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
Fri Jun  3 15:15:16 2011
@@ -51,11 +51,18 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisContentAlreadyExistsException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisFilterNotValidException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisNameConstraintViolationException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisStorageException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisStreamNotSupportedException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisUpdateConflictException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisVersioningException;
 import org.apache.chemistry.opencmis.commons.impl.Constants;
 import org.apache.chemistry.opencmis.commons.impl.JaxBHelper;
 import org.apache.chemistry.opencmis.commons.impl.ReturnVersion;
@@ -401,22 +408,73 @@ public class AbstractAtomPubService impl
      * Converts a HTTP status code into an Exception.
      */
     protected CmisBaseException convertStatusCode(int code, String message, String errorContent,
Throwable t) {
+        String exception = extractException(errorContent);
+        message = extractErrorMessage(message, errorContent);
+
         switch (code) {
         case 400:
+            if (CmisFilterNotValidException.EXCEPTION_NAME.equals(exception)) {
+                return new CmisFilterNotValidException(message, errorContent, t);
+            }
             return new CmisInvalidArgumentException(message, errorContent, t);
         case 404:
             return new CmisObjectNotFoundException(message, errorContent, t);
         case 403:
+            if (CmisStreamNotSupportedException.EXCEPTION_NAME.equals(exception)) {
+                return new CmisStreamNotSupportedException(message, errorContent, t);
+            }
             return new CmisPermissionDeniedException(message, errorContent, t);
         case 405:
             return new CmisNotSupportedException(message, errorContent, t);
         case 409:
+            if (CmisContentAlreadyExistsException.EXCEPTION_NAME.equals(exception)) {
+                return new CmisContentAlreadyExistsException(message, errorContent, t);
+            } else if (CmisVersioningException.EXCEPTION_NAME.equals(exception)) {
+                return new CmisVersioningException(message, errorContent, t);
+            } else if (CmisUpdateConflictException.EXCEPTION_NAME.equals(exception)) {
+                return new CmisUpdateConflictException(message, errorContent, t);
+            } else if (CmisNameConstraintViolationException.EXCEPTION_NAME.equals(exception))
{
+                return new CmisNameConstraintViolationException(message, errorContent, t);
+            }
             return new CmisConstraintException(message, errorContent, t);
         default:
+            if (CmisStorageException.EXCEPTION_NAME.equals(exception)) {
+                return new CmisStorageException(message, errorContent, t);
+            }
             return new CmisRuntimeException(message, errorContent, t);
         }
     }
 
+    protected String extractException(String errorContent) {
+        if (errorContent == null) {
+            return null;
+        }
+
+        int beginn = errorContent.indexOf("<!--exception-->");
+        int end = errorContent.indexOf("<!--/exception-->");
+
+        if ((beginn == -1) || (end == -1) || (beginn > end)) {
+            return null;
+        }
+
+        return errorContent.substring(beginn + "<!--exception-->".length(), end);
+    }
+
+    protected String extractErrorMessage(String message, String errorContent) {
+        if (errorContent == null) {
+            return message;
+        }
+
+        int beginn = errorContent.indexOf("<!--message-->");
+        int end = errorContent.indexOf("<!--/message-->");
+
+        if ((beginn == -1) || (end == -1) || (beginn > end)) {
+            return message;
+        }
+
+        return errorContent.substring(beginn + "<!--message-->".length(), end);
+    }
+
     // ---- helpers ----
 
     protected boolean is(String name, AtomElement element) {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisConnectionException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisConnectionException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisConnectionException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisConnectionException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisConnectionException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "connection";
 
     public CmisConnectionException() {
         super();
@@ -61,6 +62,6 @@ public class CmisConnectionException ext
 
     @Override
     public String getExceptionName() {
-        return "connection";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisConstraintException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisConstraintException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisConstraintException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisConstraintException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisConstraintException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "constraint";
 
     public CmisConstraintException() {
         super();
@@ -61,6 +62,6 @@ public class CmisConstraintException ext
 
     @Override
     public String getExceptionName() {
-        return "constraint";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisContentAlreadyExistsException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisContentAlreadyExistsException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisContentAlreadyExistsException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisContentAlreadyExistsException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisContentAlreadyExistsException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "contentAlreadyExists";
 
     public CmisContentAlreadyExistsException() {
         super();
@@ -61,6 +62,6 @@ public class CmisContentAlreadyExistsExc
 
     @Override
     public String getExceptionName() {
-        return "contentAlreadyExists";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisFilterNotValidException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisFilterNotValidException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisFilterNotValidException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisFilterNotValidException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisFilterNotValidException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "filterNotValid";
 
     public CmisFilterNotValidException() {
         super();
@@ -46,7 +47,7 @@ public class CmisFilterNotValidException
     public CmisFilterNotValidException(String message, BigInteger code, String errorContent)
{
         super(message, code, errorContent);
     }
-    
+
     public CmisFilterNotValidException(String message, String errorContent, Throwable cause)
{
         super(message, errorContent, cause);
     }
@@ -58,9 +59,9 @@ public class CmisFilterNotValidException
     public CmisFilterNotValidException(String message) {
         super(message, BigInteger.ZERO);
     }
-    
+
     @Override
     public String getExceptionName() {
-        return "filterNotValid";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisInvalidArgumentException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisInvalidArgumentException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisInvalidArgumentException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisInvalidArgumentException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisInvalidArgumentException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "invalidArgument";
 
     public CmisInvalidArgumentException() {
         super();
@@ -61,6 +62,6 @@ public class CmisInvalidArgumentExceptio
     
     @Override
     public String getExceptionName() {
-        return "invalidArgument";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisNameConstraintViolationException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisNameConstraintViolationException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisNameConstraintViolationException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisNameConstraintViolationException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisNameConstraintViolationException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "nameConstraintViolation";
 
     public CmisNameConstraintViolationException() {
         super();
@@ -61,6 +62,6 @@ public class CmisNameConstraintViolation
     
     @Override
     public String getExceptionName() {
-        return "nameConstraintViolation";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisNotSupportedException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisNotSupportedException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisNotSupportedException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisNotSupportedException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisNotSupportedException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "notSupported";
 
     public CmisNotSupportedException() {
         super();
@@ -61,6 +62,6 @@ public class CmisNotSupportedException e
     
     @Override
     public String getExceptionName() {
-        return "notSupported";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisObjectNotFoundException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisObjectNotFoundException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisObjectNotFoundException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisObjectNotFoundException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisObjectNotFoundException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "objectNotFound";
 
     public CmisObjectNotFoundException() {
         super();
@@ -61,6 +62,6 @@ public class CmisObjectNotFoundException
     
     @Override
     public String getExceptionName() {
-        return "objectNotFound";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisPermissionDeniedException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisPermissionDeniedException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisPermissionDeniedException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisPermissionDeniedException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisPermissionDeniedException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "permissionDenied";
 
     public CmisPermissionDeniedException() {
         super();
@@ -61,6 +62,6 @@ public class CmisPermissionDeniedExcepti
     
     @Override
     public String getExceptionName() {
-        return "permissionDenied";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisRuntimeException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisRuntimeException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisRuntimeException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisRuntimeException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisRuntimeException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "runtime";
 
     public CmisRuntimeException() {
         super();
@@ -61,6 +62,6 @@ public class CmisRuntimeException extend
     
     @Override
     public String getExceptionName() {
-        return "runtime";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisStorageException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisStorageException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisStorageException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisStorageException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisStorageException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "storage";
 
     public CmisStorageException() {
         super();
@@ -61,6 +62,6 @@ public class CmisStorageException extend
 
     @Override
     public String getExceptionName() {
-        return "storage";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisStreamNotSupportedException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisStreamNotSupportedException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisStreamNotSupportedException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisStreamNotSupportedException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisStreamNotSupportedException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "streamNotSupported";
 
     public CmisStreamNotSupportedException() {
         super();
@@ -61,6 +62,6 @@ public class CmisStreamNotSupportedExcep
     
     @Override
     public String getExceptionName() {
-        return "streamNotSupported";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisUpdateConflictException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisUpdateConflictException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisUpdateConflictException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisUpdateConflictException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisUpdateConflictException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "updateConflict";
 
     public CmisUpdateConflictException() {
         super();
@@ -61,6 +62,6 @@ public class CmisUpdateConflictException
 
     @Override
     public String getExceptionName() {
-        return "updateConflict";
+        return EXCEPTION_NAME;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisVersioningException.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisVersioningException.java?rev=1131065&r1=1131064&r2=1131065&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisVersioningException.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/exceptions/CmisVersioningException.java
Fri Jun  3 15:15:16 2011
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 public class CmisVersioningException extends CmisBaseException {
 
     private static final long serialVersionUID = 1L;
+    public static final String EXCEPTION_NAME = "versioning";
 
     public CmisVersioningException() {
         super();
@@ -61,6 +62,6 @@ public class CmisVersioningException ext
 
     @Override
     public String getExceptionName() {
-        return "versioning";
+        return EXCEPTION_NAME;
     }
 }



Mime
View raw message