Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IdentityManagerException |
|
| 1.0;1 |
1 | 0 | /** |
2 | * 2007, Digitalis Informatica. All rights reserved. Distribuicao e Gestao de Informatica, Lda. Estrada de Paco de Arcos | |
3 | * num.9 - Piso -1 2780-666 Paco de Arcos Telefone: (351) 21 4408990 Fax: (351) 21 4408999 http://www.digitalis.pt | |
4 | */ | |
5 | ||
6 | package pt.digitalis.dif.exception.security; | |
7 | ||
8 | import pt.digitalis.dif.controller.security.managers.IIdentityManager; | |
9 | import pt.digitalis.dif.exception.DIFException; | |
10 | ||
11 | /** | |
12 | * Identity manager related exception. | |
13 | * | |
14 | * @author Rodrigo Gonçalves <a href="mailto:rgoncalves@digitalis.pt">rgoncalves@digitalis.pt</a><br/> | |
15 | * @created 2008/04/15 | |
16 | */ | |
17 | public class IdentityManagerException extends DIFException { | |
18 | ||
19 | /** The serial ID. */ | |
20 | final static private long serialVersionUID = 1L; | |
21 | ||
22 | /** isReadOnly value */ | |
23 | 0 | private boolean isReadOnlyException = false; |
24 | ||
25 | /** | |
26 | * Constructs a new IdentityManagerException that wraps a Java Exception. | |
27 | * | |
28 | * @param exception | |
29 | * the exception to encapsulate. | |
30 | */ | |
31 | public IdentityManagerException(Exception exception) | |
32 | { | |
33 | 0 | super(exception); |
34 | 0 | } |
35 | ||
36 | /** | |
37 | * Constructs a new IdentityManagerException from a reason. | |
38 | * | |
39 | * @param reason | |
40 | * the exception reason. | |
41 | */ | |
42 | public IdentityManagerException(String reason) | |
43 | { | |
44 | 0 | super(reason); |
45 | 0 | } |
46 | ||
47 | /** | |
48 | * Constructs a new IdentityManagerException from a reason and a Java Exception. | |
49 | * | |
50 | * @param reason | |
51 | * the exception reason. | |
52 | * @param exception | |
53 | * the exception to encapsulate. | |
54 | */ | |
55 | public IdentityManagerException(String reason, Exception exception) | |
56 | { | |
57 | 0 | super(reason, exception); |
58 | 0 | } |
59 | ||
60 | /** | |
61 | * @return T if the current exception was thrown because the {@link IIdentityManager} is in readonly mode | |
62 | */ | |
63 | public Boolean isReadOnlyException() | |
64 | { | |
65 | 0 | return isReadOnlyException; |
66 | } | |
67 | ||
68 | /** | |
69 | * Modifier for the 'isReadOnlyException' attribute. | |
70 | * | |
71 | * @param isReadOnlyException | |
72 | * the new isReadOnlyException value to set | |
73 | */ | |
74 | public void setReadOnlyException(boolean isReadOnlyException) | |
75 | { | |
76 | 0 | this.isReadOnlyException = isReadOnlyException; |
77 | 0 | } |
78 | } |