Package fr.utc.miage.sporttrack.dto
Class AthleteRegisterFormDTO
java.lang.Object
fr.utc.miage.sporttrack.dto.AthleteRegisterFormDTO
Data Transfer Object (DTO) used for athlete registration form binding
within the SportTrack application.
This DTO replaces direct use of the Athlete JPA entity as a
@ModelAttribute to prevent mass assignment vulnerabilities
(SonarQube java:S4684). It carries only the fields required for
registering a new athlete account: email, password, and username.
- Author:
- SportTrack Team
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEmail()Returns the email address provided during registration.Returns the plaintext password provided during registration.Returns the desired username for the new account.voidSets the email address for registration.voidsetPassword(String password) Sets the password for registration.voidsetUsername(String username) Sets the desired username for the new account.
-
Constructor Details
-
AthleteRegisterFormDTO
public AthleteRegisterFormDTO()
-
-
Method Details
-
getEmail
Returns the email address provided during registration.- Returns:
- the email address
-
getPassword
Returns the plaintext password provided during registration.- Returns:
- the password string
-
getUsername
Returns the desired username for the new account.- Returns:
- the username
-
setEmail
Sets the email address for registration.- Parameters:
email- the email address to assign
-
setPassword
Sets the password for registration.- Parameters:
password- the plaintext password to assign
-
setUsername
Sets the desired username for the new account.- Parameters:
username- the username to assign
-