Class ProfileController

java.lang.Object
com.is.findyourplace.controller.gestioneUtenza.ProfileController

@Controller public class ProfileController extends Object
Gestisce le operazioni su un profilo Utente.
  • Constructor Details

    • ProfileController

      public ProfileController(AccountService accountService, ProfileService profileService)
      Costruttore del controller.
      Parameters:
      accountService - AccountService
      profileService - ProfileService
  • Method Details

    • viewEditProfile

      @GetMapping("/editProfile") public String viewEditProfile(org.springframework.ui.Model model)
      Mapping della pagina per modificare il profilo.
      Parameters:
      model - Model
      Returns:
      account/editProfile.html
    • editProfile

      @PostMapping("/editProfile") @ResponseBody public org.springframework.http.ResponseEntity<Map<String,Object>> editProfile(@Valid @ModelAttribute("utente") @Valid UtenteDto utenteDto, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, jakarta.servlet.http.HttpServletRequest request) throws jakarta.servlet.ServletException
      Mapping per la richiesta di modifica profilo.
      Parameters:
      utenteDto - UtenteDto contenente tutti i dati.
      result - BindingResult, contiene gli errori.
      model - Model
      request - HttpServletRequest
      Returns:
      OK 200 / 400 BAD_REQUEST
      Throws:
      jakarta.servlet.ServletException
    • viewEditPreferences

      @GetMapping("/editPreferences") public String viewEditPreferences(org.springframework.ui.Model model)
      Mapping della pagina per modificare le preferenze.
      Parameters:
      model - Model
      Returns:
      account/editPreferences.html
    • editPreferences

      @PostMapping("/editPreferences") @ResponseBody public org.springframework.http.ResponseEntity<Map<String,Object>> editPreferences(@Valid @ModelAttribute("preferenze") @Valid Preferenze preferenze)
      Mapping per la richiesta di modifica preferenze.
      Parameters:
      preferenze - Preferenze
      Returns:
      OK 200 / 400 BAD_REQUEST