-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInterviewSetupDTO.java
More file actions
76 lines (59 loc) · 2.01 KB
/
InterviewSetupDTO.java
File metadata and controls
76 lines (59 loc) · 2.01 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package net.k2ai.interviewSimulator.dto;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import net.k2ai.interviewSimulator.validation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
/**
* DTO for multi-step interview setup form.
* Stored in HTTP session between wizard steps.
*/
@Data
public class InterviewSetupDTO implements Serializable {
private static final long serialVersionUID = 1L;
// Step 1: Profile
@NotBlank(message = "{validation.name.required}")
@LettersOnly(min = 2, max = 30, message = "{validation.lettersOnly}")
private String candidateName;
// Step 2: Details
@NotBlank(message = "{validation.position.required}")
private String position;
@SafeText(min = 2, max = 50, message = "{validation.safeText}")
private String customPosition;
@NotBlank(message = "{validation.difficulty.required}")
@ValidDifficulty
private String difficulty = "Easy";
// CV - transient (not serializable), extracted text stored instead
private transient MultipartFile cvFile;
private String cvText;
private String cvFileName;
// Step 2 (continued): Topic Focus and Interview Length
private String topicFocus;
private String interviewLength = "standard";
// Step 3: Voice & Language
@NotBlank(message = "{validation.language.required}")
@ValidLanguage
private String language = "bg";
@NotBlank(message = "{validation.voice.required}")
@ValidVoice
private String voiceId = "Algieba";
private String interviewerNameEN = "George";
private String interviewerNameBG = "Георги";
/**
* Gets the effective position (custom or selected).
*/
public String getEffectivePosition() {
if ("custom".equals(position) && customPosition != null && !customPosition.isBlank()) {
return customPosition.trim();
}
return position != null ? position.trim() : position;
}// getEffectivePosition
/**
* Clears CV data.
*/
public void clearCv() {
this.cvFile = null;
this.cvText = null;
this.cvFileName = null;
}// clearCv
}// InterviewSetupDTO