Class AthleteRegisterFormDTO

java.lang.Object
fr.utc.miage.sporttrack.dto.AthleteRegisterFormDTO

public class AthleteRegisterFormDTO extends Object
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 Details

    • AthleteRegisterFormDTO

      public AthleteRegisterFormDTO()
  • Method Details

    • getEmail

      public String getEmail()
      Returns the email address provided during registration.
      Returns:
      the email address
    • getPassword

      public String getPassword()
      Returns the plaintext password provided during registration.
      Returns:
      the password string
    • getUsername

      public String getUsername()
      Returns the desired username for the new account.
      Returns:
      the username
    • setEmail

      public void setEmail(String email)
      Sets the email address for registration.
      Parameters:
      email - the email address to assign
    • setPassword

      public void setPassword(String password)
      Sets the password for registration.
      Parameters:
      password - the plaintext password to assign
    • setUsername

      public void setUsername(String username)
      Sets the desired username for the new account.
      Parameters:
      username - the username to assign