Class ProfileController
java.lang.Object
com.is.findyourplace.controller.gestioneUtenza.ProfileController
Gestisce le operazioni su un profilo Utente.
-
Constructor Summary
ConstructorsConstructorDescriptionProfileController(AccountService accountService, ProfileService profileService) Costruttore del controller. -
Method Summary
Modifier and TypeMethodDescriptioneditPreferences(@Valid Preferenze preferenze) Mapping per la richiesta di modifica preferenze.editProfile(@Valid UtenteDto utenteDto, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, jakarta.servlet.http.HttpServletRequest request) Mapping per la richiesta di modifica profilo.viewEditPreferences(org.springframework.ui.Model model) Mapping della pagina per modificare le preferenze.viewEditProfile(org.springframework.ui.Model model) Mapping della pagina per modificare il profilo.
-
Constructor Details
-
ProfileController
Costruttore del controller.- Parameters:
accountService- AccountServiceprofileService- ProfileService
-
-
Method Details
-
viewEditProfile
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- Modelrequest- 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
-