1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.astrogrid.filestore.common.exception ;
18
19 import java.net.URISyntaxException ;
20
21 /***
22 * An Exception thrown if there is a problem with a file identifier.
23 *
24 */
25 public class FileStoreIdentifierException
26 extends FileStoreException
27 {
28 /***
29 * Invalid identifier message.
30 *
31 */
32 public static final String INVALID_IDENT_MESSAGE = "Invalid identifier" ;
33
34 /***
35 * Null identifier message.
36 *
37 */
38 public static final String NULL_IDENT_MESSAGE = "Null identifier" ;
39
40 /***
41 * The identifier that caused the Exception.
42 *
43 */
44 private String ident ;
45
46 /***
47 * Access to our ident.
48 *
49 */
50 public String getIdent()
51 {
52 return this.ident ;
53 }
54
55 /***
56 * Public constructor.
57 *
58 */
59 public FileStoreIdentifierException()
60 {
61 super() ;
62 }
63
64 /***
65 * Public constructor.
66 * @param message The exception message.
67 *
68 */
69 public FileStoreIdentifierException(String message)
70 {
71 super(message) ;
72 }
73
74 /***
75 * Public constructor.
76 * @param message The exception message.
77 * @param ident The identifier that caused the Exception.
78 *
79 */
80 public FileStoreIdentifierException(String message, String ident)
81 {
82 this(message) ;
83 this.ident = ident ;
84 }
85
86 /***
87 * Public constructor.
88 * @param cause The root cause of this Exception.
89 *
90 */
91 public FileStoreIdentifierException(URISyntaxException cause)
92 {
93 super(cause) ;
94 }
95
96 }