package Ġn tn u . id att 2 1 0 5 . user . controller Ċ Ċ import Ġcom . query dsl . core . types . Predicate Ċ import Ġn tn u . id att 2 1 0 5 . group . dto . Group Dto Ċ import Ġn tn u . id att 2 1 0 5 . group . service . Group Service Ċ import Ġn tn u . id att 2 1 0 5 . reservation . service . Reservation Service Ċ import Ġn tn u . id att 2 1 0 5 . user . dto . Detailed User Dto Ċ import Ġn tn u . id att 2 1 0 5 . user . dto . User Dto Ċ import Ġn tn u . id att 2 1 0 5 . user . dto . User Registration Dto Ċ import Ġn tn u . id att 2 1 0 5 . user . service . UserDetails Impl Ċ import Ġn tn u . id att 2 1 0 5 . user . service . UserService Ċ import Ġorg . springframework . data . domain . Page able Ċ import Ġorg . springframework . http . HttpStatus Ċ import Ġorg . springframework . http . Response Entity Ċ import Ġorg . springframework . web . bind . annotation .* Ċ import Ġorg . springframework . web . multipart . Multipart File Ċ import Ġjava . util .* Ċ Ċ @ RestController Ċ class ĠUser Controller Impl ( val ĠuserService : ĠUserService , Ġval Ġreservation Service : ĠReser vation Service , Ġval Ġgroup Service : ĠGroup Service ) Ġ: ĠUser Controller Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġregister User ( user Registration Dto : ĠUser Registration Dto ): ĠResponseEntity < User Dto > Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠResponseEntity ( userService . register User ( user Registration Dto ), ĠHttpStatus . CREATED ) ĊĊĠĠĠ Ġoverride Ġfun Ġregister User Batch ( file : ĠMultip art File ) Ġ= ĊĠĠĠĠĠĠĠ ĠResponseEntity ( userService . register User Batch ( file ), ĠHttpStatus . CREATED ) ĊĊĠĠĠ Ġoverride Ġfun Ġget Me ( principal : ĠUser Details Impl ) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠResponseEntity . ok ( userService . getUser ( principal . getId (), Ġmap To Ġ= ĠD eta iled User Dto :: class . java )) ĊĊĠĠĠ Ġoverride Ġfun ĠgetUser ( userId : ĠUUID ) Ġ= ĊĠĠĠĠĠĠĠ ĠResponseEntity . ok ( userService . getUser ( userId , Ġmap To Ġ= ĠD eta iled User Dto :: class . java )) ĊĊĠĠĠ Ġoverride Ġfun Ġget Users ( ĊĠĠĠĠĠĠĠ Ġpredicate : ĠPredicate , ĊĠĠĠĠĠĠĠ Ġpage able : ĠPage able ĊĠĠĠ Ġ) Ġ= ĊĠĠĠĠĠĠĠ ĠResponseEntity ( userService . get Users ( page able , Ġpredicate ), ĠHttpStatus . OK ) ĊĊĠĠĠ Ġoverride Ġfun Ġupdate User ( userId : ĠUUID , Ġuser : ĠUser Dto ) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠResponseEntity . ok ( userService . update User ( userId , Ġuser )) ĊĊĠĠĠ Ġoverride Ġfun Ġdelete User ( userId : ĠUUID ) Ġ= ĊĠĠĠĠĠĠĠ ĠResponseEntity . ok ( userService . delete User ( userId )) ĊĊĠĠĠ Ġoverride Ġfun Ġget My Reser v ations ( ĊĠĠĠĠĠĠĠ Ġpredicate : ĠPredicate , ĊĠĠĠĠĠĠĠ Ġpage able : ĠPage able , ĊĠĠĠĠĠĠĠ Ġprincipal : ĠUser Details Impl ĊĠĠĠ Ġ) Ġ= ĊĠĠĠĠĠĠĠ Ġreservation Service . getUser Reservation ( principal . getId (), Ġpage able , Ġpredicate ) ĊĊĠĠĠ Ġoverride Ġfun Ġget user Reser v ations ( ĊĠĠĠĠĠĠĠ ĠuserId : ĠUUID , ĊĠĠĠĠĠĠĠ Ġpredicate : ĠPredicate , ĊĠĠĠĠĠĠĠ Ġpage able : ĠPage able , ĊĠĠĠ Ġ) Ġ= ĊĠĠĠĠĠĠĠ Ġreservation Service . getUser Reservation ( userId , Ġpage able , Ġpredicate ) ĊĊĠĠĠ Ġoverride Ġfun ĠgetUser Groups ( principal : ĠUser Details Impl ): ĠList < Group Dto > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġgroup Service . getUser Groups ( principal . getId ()) ĊĠĠĠ Ġ} Ċ } Ċ