Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
RightsManagerException | 32 | 5 | 0% | 5 | 10 |
1 | /* | |
2 | * See the NOTICE file distributed with this work for additional | |
3 | * information regarding copyright ownership. | |
4 | * | |
5 | * This is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU Lesser General Public License as | |
7 | * published by the Free Software Foundation; either version 2.1 of | |
8 | * the License, or (at your option) any later version. | |
9 | * | |
10 | * This software is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | * Lesser General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU Lesser General Public | |
16 | * License along with this software; if not, write to the Free | |
17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
19 | */ | |
20 | ||
21 | package com.xpn.xwiki.plugin.rightsmanager; | |
22 | ||
23 | import com.xpn.xwiki.plugin.PluginException; | |
24 | ||
25 | /** | |
26 | * Rights Manager plugin base exception. | |
27 | * | |
28 | * @version $Id: 22e28310020f65d0ca126bb4d92b519b254e631b $ | |
29 | * @since 1.1.2 | |
30 | * @since 1.2M2 | |
31 | */ | |
32 | public class RightsManagerException extends PluginException | |
33 | { | |
34 | /** | |
35 | * The default RightsManagerException. | |
36 | */ | |
37 | private static final RightsManagerException DEFAULT_EXCEPTION = new RightsManagerException(); | |
38 | ||
39 | // ////// | |
40 | ||
41 | /** | |
42 | * Create an RightsManagerException. | |
43 | * | |
44 | * @param code the error code. | |
45 | * @param message a literal message about this error. | |
46 | */ | |
47 | 0 | ![]() |
48 | { | |
49 | 0 | super(RightsManagerPlugin.class, code, message); |
50 | } | |
51 | ||
52 | /** | |
53 | * Create an RightsManagerException. Replace any parameters found in the <code>message</code> by the passed | |
54 | * <code>args</code> parameters. The format is the one used by {@link java.text.MessageFormat}. | |
55 | * | |
56 | * @param code the error code. | |
57 | * @param message a literal message about this error. | |
58 | * @param e the exception this exception wrap. | |
59 | * @param args the array of parameters to use for replacing "{N}" elements in the string. See | |
60 | * {@link java.text.MessageFormat} for the full syntax | |
61 | */ | |
62 | 0 | ![]() |
63 | { | |
64 | 0 | super(RightsManagerPlugin.class, code, message, e, args); |
65 | } | |
66 | ||
67 | /** | |
68 | * Create an RightsManagerException. | |
69 | * | |
70 | * @param code the error code. | |
71 | * @param message a literal message about this error. | |
72 | * @param e the exception this exception wrap. | |
73 | */ | |
74 | 0 | ![]() |
75 | { | |
76 | 0 | super(RightsManagerPlugin.class, code, message, e); |
77 | } | |
78 | ||
79 | // ////// | |
80 | ||
81 | /** | |
82 | * Create default RightsManagerException. | |
83 | */ | |
84 | 0 | ![]() |
85 | { | |
86 | 0 | super(RightsManagerPlugin.class, 0, "No error"); |
87 | } | |
88 | ||
89 | /** | |
90 | * @return unique instance of the default RightsManagerException. | |
91 | */ | |
92 | 0 | ![]() |
93 | { | |
94 | 0 | return DEFAULT_EXCEPTION; |
95 | } | |
96 | } |