Salome HOME
BusinessException is added as base class for ...Exception.
authormka <mka@opencascade.com>
Wed, 14 Nov 2012 08:56:29 +0000 (08:56 +0000)
committermka <mka@opencascade.com>
Wed, 14 Nov 2012 08:56:29 +0000 (08:56 +0000)
Workspace/Siman-Common/src/org/splat/exception/BusinessException.java [new file with mode: 0644]
Workspace/Siman-Common/src/org/splat/exception/LockAlreadyExistsException.java
Workspace/Siman-Common/src/org/splat/exception/LockNotExistsException.java
Workspace/Siman-Common/src/org/splat/exception/LockOutdatedException.java
Workspace/Siman-Common/src/org/splat/exception/LockProtectedException.java
Workspace/Siman-Common/src/org/splat/kernel/DuplicatePropertyException.java
Workspace/Siman-Common/src/org/splat/kernel/InvalidPropertyException.java
Workspace/Siman-Common/src/org/splat/kernel/MismatchException.java
Workspace/Siman-Common/src/org/splat/kernel/MissedPropertyException.java
Workspace/Siman-Common/src/org/splat/kernel/MultiplyDefinedException.java
Workspace/Siman-Common/src/org/splat/kernel/NotApplicableException.java

diff --git a/Workspace/Siman-Common/src/org/splat/exception/BusinessException.java b/Workspace/Siman-Common/src/org/splat/exception/BusinessException.java
new file mode 100644 (file)
index 0000000..faedaa6
--- /dev/null
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Company         EURIWARE
+ * Application     SIMAN
+ * File            $Id$ 
+ * Creation date   14.11.2012
+ * @author         Author: Maria KRUCHININA
+ * @version        Revision: 
+ *****************************************************************************/
+
+package org.splat.exception; 
+
+/**
+ * Define a Business exception send by service. 
+ * This class is send by services when a business error occurred (functionnal error) 
+ * 
+ * @author Maria KRUCHININA
+ *
+ */
+public class BusinessException extends AbstractException {
+
+       /**
+        * serial version id.
+        */
+       private static final long serialVersionUID = 1L;
+
+       /**
+        * Default constructor.
+        * @see ServiceException#ServiceException()
+        */
+       public BusinessException() {
+               super();
+       }
+
+
+       /**
+        * Constructor with a throwable param.
+        * @param throwable the original throwable
+        * @see ServiceException#ServiceException(Throwable)
+        */
+       public BusinessException(final Throwable throwable) {
+               super(throwable);
+       }
+
+       /**
+        * Constructor with a String param and a throwable param.
+        * @param message the error message
+        * @param throwable the original throwable 
+        * @see ServiceException#ServiceException(String, Throwable)
+        */
+       public BusinessException (final String message,final Throwable throwable) {
+               super(message,throwable);
+       }
+       
+       /**
+        * Build a BusinessException with message, user message key, and throwable.
+        * @param messageKey the User Interface Message Key
+        * @param throwable the original exception
+        * @param context the execution context
+        */
+       public BusinessException(final String messageKey,final Throwable throwable,final Object... context) {
+               super(messageKey,throwable,context);
+
+
+       }
+
+       /**
+        * Build a BusinessException with message, user message key and context. 
+        * @param messageKey the User Interface Message Key
+        * @param context the execution context
+        */
+       public BusinessException(final String messageKey,final Object... context) {
+               super(messageKey,context);
+       }
+}
index b174567aab58673728b0ca2f947481f803b8d9a1..d3ede27d679ee07bbfe4b54c340e5fc9f6cd2206 100644 (file)
@@ -16,7 +16,7 @@ import org.splat.common.properties.MessageKeyEnum;
  * @author Maria KRUCHININA
  *
  */
-public class LockAlreadyExistsException extends AbstractException {
+public class LockAlreadyExistsException extends BusinessException {
        
        /**
         * loginName of a user who has already locked an object.
index 8dc10e33c1cddc1d441540a030d38962aabf6947..4ff6fde5a4f93960c52b6f019c82178cff5c0b15 100644 (file)
@@ -16,7 +16,7 @@ import org.splat.common.properties.MessageKeyEnum;
  * @author Maria KRUCHININA
  *
  */
-public class LockNotExistsException extends AbstractException {
+public class LockNotExistsException extends BusinessException {
        
        /**
         * Version id for serialization.
index 44990da5dbfd9340d1fce52cdab0bc054573bffa..1b78c65312da62020cea0907c0f2a69dcf2597ab 100644 (file)
@@ -18,7 +18,7 @@ import org.splat.common.properties.MessageKeyEnum;
  * @author Maria KRUCHININA
  *
  */
-public class LockOutdatedException extends AbstractException {
+public class LockOutdatedException extends BusinessException {
 
        /**
         * Version id for serialization.
index 08fe7803d103a801ef8c58503b06a1002b7e070a..a01a408c0ff00c51d8efb24b7d488bb026d8978b 100644 (file)
@@ -17,7 +17,7 @@ import org.splat.common.properties.MessageKeyEnum;
  * @author Maria KRUCHININA
  *
  */
-public class LockProtectedException extends AbstractException {
+public class LockProtectedException extends BusinessException {
 
        /**
         * Version id for serialization.
index 22392b0dd51258b27d29ff8e3e6236f3fb3bbda1..012629c5946dfcfee59dac65688557df1c4017ef 100644 (file)
@@ -1,15 +1,25 @@
 package org.splat.kernel;
+
+import org.splat.exception.BusinessException;
+
 /**
- * 
+ * Exception thrown when the property is duplicated.
  * @author    Daniel Brunier-Coulin
  * @copyright OPEN CASCADE 2012
  */
 
-public class DuplicatePropertyException extends Exception {
+public class DuplicatePropertyException extends BusinessException {
 
+       /**
+        * Version id for serialization.
+        */
        private static final long serialVersionUID = 189342004009382158L;
 
-    public DuplicatePropertyException (String message) {
+       /**
+        * Create a DuplicatePropertyException. 
+        * @param message the error message. 
+        */
+    public DuplicatePropertyException (final String message) {
         super(message);
     }
 }
\ No newline at end of file
index 92eb71ebfba9439b199bdcce94c05868dd29ce09..660940e9fe7c725bc100e3e05143fb5a32438cd5 100644 (file)
@@ -1,15 +1,25 @@
 package org.splat.kernel;
+
+import org.splat.exception.BusinessException;
+
 /**
- * 
+ * Exception thrown when the property is invalid.
  * @author    Daniel Brunier-Coulin
  * @copyright OPEN CASCADE 2012
  */
 
-public class InvalidPropertyException extends Exception {
+public class InvalidPropertyException extends BusinessException {
 
+       /**
+        * Version id for serialization.
+        */
        private static final long serialVersionUID = -3988379180445723963L;
 
-    public InvalidPropertyException (String message) {
+       /**
+        * Create a InvalidPropertyException. 
+        * @param message the error message. 
+        */
+    public InvalidPropertyException (final String message) {
         super(message);
       }
 }
\ No newline at end of file
index f0a103cfde5fab06191ac689bc1fe7bed3330ef8..956932f4656fba49a6b85a7616e59e54c8c032de 100644 (file)
@@ -1,19 +1,31 @@
 package org.splat.kernel;
 
+import org.splat.exception.BusinessException;
+
 /**
- * 
+ * MismatchException exception.
  * @author Daniel Brunier-Coulin
  * @copyright OPEN CASCADE 2012
  */
 
-public class MismatchException extends Exception {
+public class MismatchException extends BusinessException {
 
+       /**
+        * Version id for serialization.
+        */
        private static final long serialVersionUID = 366699682058153984L;
 
+       /**
+        * Create a MismatchException.  
+        */
        public MismatchException() {
                super();
        }
 
+       /**
+        * Create a MismatchException. 
+        * @param message the error message. 
+        */
        public MismatchException(final String message) {
                super(message);
        }
index c038200e53579c61a3490d22b23244f2b142066d..1b1743683a1822de8add1ea7ec5110358e7381ae 100644 (file)
@@ -1,15 +1,25 @@
 package org.splat.kernel;
+
+import org.splat.exception.BusinessException;
+
 /**
- * 
+ * Exception thrown when the property is missed.
  * @author    Daniel Brunier-Coulin
  * @copyright OPEN CASCADE 2012
  */
 
-public class MissedPropertyException extends Exception {
+public class MissedPropertyException extends BusinessException {
 
+       /**
+        * Version id for serialization.
+        */
        private static final long serialVersionUID = -4459708372517969441L;
 
-    public MissedPropertyException (String message) {
+       /**
+        * Create a MissedPropertyException. 
+        * @param message the error message. 
+        */
+    public MissedPropertyException (final String message) {
         super(message);
       }
 }
\ No newline at end of file
index 708cf45bf0fb7338c45f775d8e73cbb911274f1c..3dd4807c272cc83ba2ec357c2f9b973ddcfcfa63 100644 (file)
@@ -1,19 +1,31 @@
 package org.splat.kernel;
 
+import org.splat.exception.BusinessException;
+
 /**
- * 
+ * Exception thrown when the property is multiply defined.
  * @author Daniel Brunier-Coulin
  * @copyright OPEN CASCADE 2012
  */
 
-public class MultiplyDefinedException extends Exception {
+public class MultiplyDefinedException extends BusinessException {
 
+       /**
+        * Version id for serialization.
+        */
        private static final long serialVersionUID = 3551033092059904168L;
 
+       /**
+        * Create a MultiplyDefinedException.  
+        */
        public MultiplyDefinedException() {
                super();
        }
 
+       /**
+        * Create a MultiplyDefinedException. 
+        * @param message the error message. 
+        */
        public MultiplyDefinedException(final String message) {
                super(message);
        }
index ba5ea874ec330ab6c867e86cd74fd98c479cdf36..26b81167e8e65aa8176f31188de22fea7b1c48af 100644 (file)
@@ -1,15 +1,25 @@
 package org.splat.kernel;
+
+import org.splat.exception.BusinessException;
+
 /**
- * 
+ * NotApplicableException exception.
  * @author    Daniel Brunier-Coulin
  * @copyright OPEN CASCADE 2012
  */
 
-public class NotApplicableException extends Exception {
+public class NotApplicableException extends BusinessException {
 
+       /**
+        * Version id for serialization.
+        */
        private static final long serialVersionUID = -6255758696740565804L;
 
-       public NotApplicableException (String message) {
+       /**
+        * Create a NotApplicableException. 
+        * @param message the error message. 
+        */
+       public NotApplicableException (final String message) {
         super(message);
     }
 }
\ No newline at end of file