4
4
import javax .swing .*;
5
5
import java .awt .event .ActionEvent ;
6
6
import java .awt .event .ActionListener ;
7
-
7
+ /**
8
+ * This is the class that is responsible for retrieving the verification code form the user, or presenting if
9
+ * verification is not possible
10
+ * */
8
11
public class UserVerificationScreen implements UserExistsOutputBoundary , ActionListener {
9
12
private final JTextField verText = new JTextField (20 );
10
13
private final UserVerificationInputBoundary verificationInputBoundary ;
@@ -16,7 +19,9 @@ public class UserVerificationScreen implements UserExistsOutputBoundary, ActionL
16
19
public UserVerificationScreen (UserVerificationInputBoundary verificationInputBoundary ){
17
20
this .verificationInputBoundary = verificationInputBoundary ;
18
21
}
19
-
22
+ /**
23
+ * This method asks for the code from the user
24
+ * */
20
25
@ Override
21
26
public void getVerificationCredentials () {
22
27
JFrame verificationFrame = new JFrame ();
@@ -39,7 +44,9 @@ public void getVerificationCredentials() {
39
44
verificationPanel .add (verifyButton );
40
45
verificationFrame .setVisible (true );
41
46
}
42
-
47
+ /**
48
+ * This method presents that verification is not possible, because the user exists in the database
49
+ * */
43
50
@ Override
44
51
public void presentUserExistsMessage () {
45
52
JFrame userExistsFrame = new JFrame ();
@@ -54,12 +61,19 @@ public void presentUserExistsMessage() {
54
61
userExistsPanel .add (accountExists );
55
62
userExistsFrame .setVisible (true );
56
63
}
57
-
64
+ /**
65
+ * Retrieves code from the input boundary, to set the code onto the other input boundary in the constructor
66
+ * @param code verification code
67
+ * */
58
68
@ Override
59
69
public void getCode (int code ) {
60
70
this .code = code ;
61
71
}
62
72
73
+ /**
74
+ * Retrieves user credentials from the input boundary, in order to set the credentials onto the other input
75
+ * boundary in the constructor
76
+ * */
63
77
@ Override
64
78
public void getUserCredentials (String username , String password , String email ) {
65
79
this .username = username ;
0 commit comments