Class UserController

java.lang.Object
com.cyran.tp.server.UserController

@RestController
public class UserController
extends java.lang.Object
  • Constructor Details

  • Method Details

    • getUser

      @CrossOrigin @GetMapping("/getUser") public User getUser​(@RequestParam java.lang.String name) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
      Throws:
      java.lang.InterruptedException
      java.util.concurrent.ExecutionException
    • getProduct

      @CrossOrigin @GetMapping("/getProduct") public Product getProduct​(@RequestParam java.lang.String name) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
      Throws:
      java.lang.InterruptedException
      java.util.concurrent.ExecutionException
    • orderProduct

      @CrossOrigin @PostMapping(path="/order", consumes="application/json", produces="application/json") public java.lang.String orderProduct​(@RequestBody UserOrderRequest userRequest) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
      Throws:
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • registerUser

      @CrossOrigin @PostMapping("/register") public java.lang.String registerUser​(@RequestBody RegisterUserRequest userRequest) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
      Throws:
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • createProduct

      @CrossOrigin @RequestMapping(value="/create/product", consumes="application/json", produces="application/json", method=POST) public java.lang.String createProduct​(@RequestBody ProductRequest createProductRequest) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
      Throws:
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • updateProduct

      @CrossOrigin @RequestMapping(value="/update/product", consumes="application/json", produces="application/json", method=POST) public java.lang.String updateProduct​(@RequestBody ProductRequest updateProductRequest) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
      Throws:
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • createOrder

      @CrossOrigin @RequestMapping(value="/create/order", consumes="application/json", produces="application/json", method=POST) public com.fasterxml.jackson.databind.JsonNode createOrder​(@RequestBody OrderRequest orderRequest) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
      Throws:
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • getCSRFToken

      @CrossOrigin @RequestMapping(value="/getToken", consumes="application/json", produces="application/json", method=POST) public java.lang.String getCSRFToken​(@RequestBody PageRequest accessingPage) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
      Throws:
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • checkToken

      @CrossOrigin @RequestMapping(value="/check-token", consumes="application/json", produces="application/json", method=POST) public java.lang.String checkToken​(@RequestBody Page accessingPage) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
      Throws:
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException