Uses of Record Class
org.ntnu.idi.idatt2106.sparesti.sparestibackend.dto.challenge.ChallengeDTO
Packages that use ChallengeDTO
Package
Description
-
Uses of ChallengeDTO in org.ntnu.idi.idatt2106.sparesti.sparestibackend.controller
Methods in org.ntnu.idi.idatt2106.sparesti.sparestibackend.controller that return types with arguments of type ChallengeDTOModifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<ChallengeDTO> ChallengeController.completeChallenge
(Long id, org.springframework.security.core.userdetails.UserDetails userDetails) Completes a user challengeorg.springframework.http.ResponseEntity
<ChallengeDTO> ChallengeController.createChallenge
(ChallengeCreateDTO challengeCreateDTO, org.springframework.security.core.userdetails.UserDetails userDetails) Creates a saving challengeorg.springframework.http.ResponseEntity
<List<ChallengeDTO>> ChallengeController.generateChallenges
(org.springframework.security.core.userdetails.UserDetails userDetails) Generates a list of challenges based on user's configorg.springframework.http.ResponseEntity
<org.springframework.data.domain.Page<ChallengeDTO>> ChallengeController.getActiveChallenges
(org.springframework.data.domain.Pageable pageable, org.springframework.security.core.userdetails.UserDetails userDetails) Gets a page of a user's active challengesorg.springframework.http.ResponseEntity
<org.springframework.data.domain.Page<ChallengeDTO>> ChallengeController.getCompletedChallenges
(org.springframework.data.domain.Pageable pageable, org.springframework.security.core.userdetails.UserDetails userDetails) Gets a list of completed challengesorg.springframework.http.ResponseEntity
<ChallengeDTO> ChallengeController.getUserChallenge
(org.springframework.security.core.userdetails.UserDetails userDetails, Long id) Gets a specific user challengeorg.springframework.http.ResponseEntity
<org.springframework.data.domain.Page<ChallengeDTO>> ChallengeController.getUserChallenges
(org.springframework.data.domain.Pageable pageable, org.springframework.security.core.userdetails.UserDetails userDetails) Gets a page of a user's saving challengesorg.springframework.http.ResponseEntity
<ChallengeDTO> ChallengeController.updateChallenge
(Long id, ChallengeUpdateDTO challengeUpdateDTO, org.springframework.security.core.userdetails.UserDetails userDetails) Updates a challenge -
Uses of ChallengeDTO in org.ntnu.idi.idatt2106.sparesti.sparestibackend.mapper
Methods in org.ntnu.idi.idatt2106.sparesti.sparestibackend.mapper that return ChallengeDTOModifier and TypeMethodDescriptionConverts from Challenge entity to DTO. -
Uses of ChallengeDTO in org.ntnu.idi.idatt2106.sparesti.sparestibackend.service
Methods in org.ntnu.idi.idatt2106.sparesti.sparestibackend.service that return ChallengeDTOModifier and TypeMethodDescriptionChallengeService.completeChallenge
(Long challengeId, User user) Marks a challenge as completed, updates user statistics such as saved amounts and streaks, and persists these changes to the database.ChallengeService.getChallenge
(Long challengeId, User user) Retrieves a specific challenge by ID and user.ChallengeService.save
(ChallengeCreateDTO challengeCreateDTO, User user) Creates and persists a new challenge based on provided DTO and user details.ChallengeService.updateChallenge
(Long id, ChallengeUpdateDTO challengeUpdateDTO, User user) Updates an existing challenge with new data from a provided DTO if the challenge has not been completed.Methods in org.ntnu.idi.idatt2106.sparesti.sparestibackend.service that return types with arguments of type ChallengeDTOModifier and TypeMethodDescriptionorg.springframework.data.domain.Page
<ChallengeDTO> ChallengeService.getActiveChallenges
(User user, org.springframework.data.domain.Pageable pageable) Retrieves all active (not completed) challenges for a specific user and paginates the results.org.springframework.data.domain.Page
<ChallengeDTO> ChallengeService.getChallengesByUser
(User user, org.springframework.data.domain.Pageable pageable) Retrieves all challenges associated with a specific user and paginates the results.org.springframework.data.domain.Page
<ChallengeDTO> ChallengeService.getCompletedChallenges
(User user, org.springframework.data.domain.Pageable pageable) Retrieves all completed challenges for a specific user and paginates the results.ChallengeService.getGeneratedChallenges
(User user) Gets list of generated challenges