1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 package net.sf.jguard.core.provisioning;
29
30 import java.util.HashSet;
31 import java.util.Set;
32
33 import net.sf.jguard.core.authentication.AuthenticationException;
34
35
36
37
38
39
40 public class RegistrationException extends AuthenticationException {
41
42 private static final long serialVersionUID = -51540986121856569L;
43 private Set missingPublicCredential = null;
44 private Set missingPrivateCredential = null;
45
46 public RegistrationException(){
47 super();
48 missingPrivateCredential = new HashSet();
49 missingPublicCredential = new HashSet();
50 }
51 public RegistrationException(String msg){
52 super(msg);
53 missingPrivateCredential = new HashSet();
54 missingPublicCredential = new HashSet();
55 }
56 public RegistrationException(AuthenticationException e) {
57 super(e);
58 }
59
60 public RegistrationException(String msg,Set missingPublicCred,Set missingPrivateCred){
61 super(msg);
62 if(missingPrivateCred==null){
63 missingPrivateCred = new HashSet();
64 }
65 if(missingPublicCred==null){
66 missingPublicCred = new HashSet();
67 }
68
69 missingPublicCredential = missingPublicCred;
70 missingPrivateCredential = missingPrivateCred;
71
72 }
73
74
75 public Set getMissingPrivateCredential() {
76 return missingPrivateCredential;
77 }
78
79 public Set getMissingPublicCredential() {
80 return missingPublicCredential;
81 }
82 }