]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
2affc2a4d4fad1285c0eadb3263649e55f6cbe44
[tmp/jakarta-migration.git] /
1 package org.collectionspace.services.common.document;
2
3 public class DocumentReferenceException extends DocumentException {
4     /**
5          * 
6          */
7         private static final long serialVersionUID = 1L;
8         final public static int HTTP_CODE = 500;
9
10     /**
11      * Creates a new instance of <code>DocumentNotFoundException</code> without detail message.
12      */
13     public DocumentReferenceException() {
14         setErrorCode(HTTP_CODE);
15     }
16
17     /**
18      * Constructs an instance of <code>DocumentNotFoundException</code> with the specified detail message.
19      * @param msg the detail message.
20      */
21     public DocumentReferenceException(String msg) {
22         super(msg);
23         setErrorCode(HTTP_CODE);
24     }
25
26     /**
27      * Constructs a new exception with the specified detail message and
28      * cause.  <p>Note that the detail message associated with
29      * <code>cause</code> is <i>not</i> automatically incorporated in
30      * this exception's detail message.
31      *
32      * @param  message the detail message (which is saved for later retrieval
33      *         by the {@link #getMessage()} method).
34      * @param  cause the cause (which is saved for later retrieval by the
35      *         {@link #getCause()} method).  (A <tt>null</tt> value is
36      *         permitted, and indicates that the cause is nonexistent or
37      *         unknown.)
38      * @since  1.4
39      */
40     public DocumentReferenceException(String message, Throwable cause) {
41         super(message, cause);
42         setErrorCode(HTTP_CODE);
43     }
44
45     /**
46      * Constructs a new exception with the specified cause and a detail
47      * message of <tt>(cause==null ? null : cause.toString())</tt> (which
48      * typically contains the class and detail message of <tt>cause</tt>).
49      * This constructor is useful for exceptions that are little more than
50      * wrappers for other throwables (for example, {@link
51      * java.security.PrivilegedActionException}).
52      *
53      * @param  cause the cause (which is saved for later retrieval by the
54      *         {@link #getCause()} method).  (A <tt>null</tt> value is
55      *         permitted, and indicates that the cause is nonexistent or
56      *         unknown.)
57      * @since  1.4
58      */
59     public DocumentReferenceException(Throwable cause) {
60         super(cause);
61         setErrorCode(HTTP_CODE);
62     }
63 }