SpringBootLibrary
Loading...
Searching...
No Matches
com.example.restapi.controller.LibraryController Class Reference

Public Member Functions

 LibraryController (UserController userController, BookController bookController, BorrowingController borrowingController)
ResponseEntity<?> registerUser (@RequestBody User user)
ResponseEntity<?> loginUser (@RequestBody User user, HttpSession session)
ResponseEntity<?> getUserSession (HttpSession session)
ResponseEntity< List< Book > > getBooks ()
ResponseEntity< Book > addBook (@RequestBody Book book)
ResponseEntity< String > borrowBook (@PathVariable Long bookId, @PathVariable Long userId)
ResponseEntity< String > returnBook (@PathVariable Long bookId)
ResponseEntity< User > getUserProfile (@PathVariable Long userId)
ResponseEntity< User > getUserProfileByUsername (@PathVariable String username)
ResponseEntity< List< Map< String, Object > > > getBorrowedBooksByUser (@PathVariable String username)
ResponseEntity< Void > deleteBorrowing (@PathVariable Long bookId, @PathVariable Long userId)

Detailed Description

Definition at line 20 of file LibraryController.java.

Constructor & Destructor Documentation

◆ LibraryController()

com.example.restapi.controller.LibraryController.LibraryController ( UserController userController,
BookController bookController,
BorrowingController borrowingController )

Definition at line 27 of file LibraryController.java.

Member Function Documentation

◆ addBook()

ResponseEntity< Book > com.example.restapi.controller.LibraryController.addBook ( @RequestBody Book book)

Definition at line 64 of file LibraryController.java.

◆ borrowBook()

ResponseEntity< String > com.example.restapi.controller.LibraryController.borrowBook ( @PathVariable Long bookId,
@PathVariable Long userId )

Definition at line 71 of file LibraryController.java.

◆ deleteBorrowing()

ResponseEntity< Void > com.example.restapi.controller.LibraryController.deleteBorrowing ( @PathVariable Long bookId,
@PathVariable Long userId )

Definition at line 107 of file LibraryController.java.

◆ getBooks()

ResponseEntity< List< Book > > com.example.restapi.controller.LibraryController.getBooks ( )

Definition at line 56 of file LibraryController.java.

◆ getBorrowedBooksByUser()

ResponseEntity< List< Map< String, Object > > > com.example.restapi.controller.LibraryController.getBorrowedBooksByUser ( @PathVariable String username)

Definition at line 102 of file LibraryController.java.

◆ getUserProfile()

ResponseEntity< User > com.example.restapi.controller.LibraryController.getUserProfile ( @PathVariable Long userId)

Definition at line 83 of file LibraryController.java.

◆ getUserProfileByUsername()

ResponseEntity< User > com.example.restapi.controller.LibraryController.getUserProfileByUsername ( @PathVariable String username)

Definition at line 89 of file LibraryController.java.

◆ getUserSession()

ResponseEntity<?> com.example.restapi.controller.LibraryController.getUserSession ( HttpSession session)

Definition at line 50 of file LibraryController.java.

◆ loginUser()

ResponseEntity<?> com.example.restapi.controller.LibraryController.loginUser ( @RequestBody User user,
HttpSession session )

Definition at line 42 of file LibraryController.java.

◆ registerUser()

ResponseEntity<?> com.example.restapi.controller.LibraryController.registerUser ( @RequestBody User user)

Definition at line 37 of file LibraryController.java.

◆ returnBook()

ResponseEntity< String > com.example.restapi.controller.LibraryController.returnBook ( @PathVariable Long bookId)

Definition at line 77 of file LibraryController.java.


The documentation for this class was generated from the following file: