--- /dev/null
+/*****************************************************************************
+ * 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);
+ }
+}
* @author Maria KRUCHININA
*
*/
-public class LockAlreadyExistsException extends AbstractException {
+public class LockAlreadyExistsException extends BusinessException {
/**
* loginName of a user who has already locked an object.
* @author Maria KRUCHININA
*
*/
-public class LockNotExistsException extends AbstractException {
+public class LockNotExistsException extends BusinessException {
/**
* Version id for serialization.
* @author Maria KRUCHININA
*
*/
-public class LockOutdatedException extends AbstractException {
+public class LockOutdatedException extends BusinessException {
/**
* Version id for serialization.
* @author Maria KRUCHININA
*
*/
-public class LockProtectedException extends AbstractException {
+public class LockProtectedException extends BusinessException {
/**
* Version id for serialization.
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
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
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);
}
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
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);
}
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