Package web.sportflow.user
Class UserController
java.lang.Object
web.sportflow.user.UserController
-
Constructor Summary
ConstructorsConstructorDescriptionUserController(UserService userService, WorkoutService workoutService, GoalService goalService, ChallengeService challengeService, BadgeService badgeService, FriendshipService friendshipService) -
Method Summary
Modifier and TypeMethodDescriptionacceptFriendRequest(User currentUser, Long friendshipId, String returnTo, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) createUser(User user, String password, String codeStatut, List<Long> organizedConferenceIds, List<Long> participatingConferenceIds, org.springframework.ui.Model model) joinChallenge(User currentUser, Long challengeId, String returnTo, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) leaveChallenge(User currentUser, Long challengeId, String returnTo, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) manageFriends(User currentUser, String query, org.springframework.data.domain.Pageable pageable, org.springframework.ui.Model model) refuseFriendRequest(User currentUser, Long friendshipId, String returnTo, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) registerUser(RegistrationDTO registrationDTO, org.springframework.ui.Model model) sendFriendRequest(User currentUser, Long targetUserId, String returnTo, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) showChallenges(User currentUser, String query, org.springframework.ui.Model model) showCreateForm(org.springframework.ui.Model model) showDashboard(User currentUser, org.springframework.ui.Model model) showEditProfile(User currentUser, org.springframework.ui.Model model) showMenu()showProfile(User currentUser, org.springframework.ui.Model model) showStatistiquePage(User currentUser, org.springframework.ui.Model model) showUserProfile(User currentUser, Long userId, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) showWorkout(org.springframework.ui.Model model) unfriend(User currentUser, Long friendId, String returnTo, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) updateProfile(User currentUser, String firstname, String lastname, String email, Double weight, Double height, Sex sex, PracticeLevel level, LocalDate birthDate, org.springframework.web.multipart.MultipartFile avatarFile, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
-
Constructor Details
-
UserController
public UserController(UserService userService, WorkoutService workoutService, GoalService goalService, ChallengeService challengeService, BadgeService badgeService, FriendshipService friendshipService)
-
-
Method Details
-
showMenu
-
showCreateForm
-
createUser
@PostMapping("/create") public String createUser(@ModelAttribute User user, @RequestParam String password, @RequestParam String codeStatut, @RequestParam(name="organizedConferenceIds",required=false) List<Long> organizedConferenceIds, @RequestParam(name="participatingConferenceIds",required=false) List<Long> participatingConferenceIds, org.springframework.ui.Model model) -
showProfile
-
showUserProfile
-
showEditProfile
-
updateProfile
@PostMapping("/profile/edit") public String updateProfile(@AuthenticationPrincipal User currentUser, @RequestParam String firstname, @RequestParam String lastname, @RequestParam String email, @RequestParam Double weight, @RequestParam Double height, @RequestParam Sex sex, @RequestParam PracticeLevel level, @RequestParam(required=false) @DateTimeFormat(iso=DATE) LocalDate birthDate, @RequestParam(name="avatarFile",required=false) org.springframework.web.multipart.MultipartFile avatarFile, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) -
redirectUsersPage
-
registerUser
@PostMapping("/register") public String registerUser(@ModelAttribute RegistrationDTO registrationDTO, org.springframework.ui.Model model) -
manageFriends
-
showChallenges
-
joinChallenge
-
leaveChallenge
-
sendFriendRequest
-
acceptFriendRequest
-
refuseFriendRequest
-
unfriend
-
showWorkout
-
redirectGoalsPage
-
showDashboard
-
showStatistiquePage
-