Class FilmsController

java.lang.Object
sk.gursky.films.rest.FilmsController

@CrossOrigin
@RestController
public class FilmsController
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    FilmsController()  
  • Method Summary

    Modifier and Type Method Description
    void deleteFilm​(java.util.Optional<java.lang.String> token, long id)  
    org.springframework.http.ResponseEntity<?> getFilms​(java.util.Optional<java.lang.String> token, java.util.Optional<java.lang.String> orderBy, java.util.Optional<java.lang.Boolean> descending, java.util.Optional<java.lang.Integer> indexFrom, java.util.Optional<java.lang.Integer> indexTo, java.util.Optional<java.lang.String> search)  
    org.springframework.http.ResponseEntity<?> getPersons​(java.util.Optional<java.lang.String> token, java.lang.String search)  
    Film getUserById​(java.util.Optional<java.lang.String> token, java.lang.Long id)  
    Film saveFilm​(java.util.Optional<java.lang.String> token, Film film)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getFilms

      @GetMapping("/films") public org.springframework.http.ResponseEntity<?> getFilms​(@RequestHeader(value="X-Auth-Token",required=false) java.util.Optional<java.lang.String> token, @RequestParam(value="orderBy",required=false) java.util.Optional<java.lang.String> orderBy, @RequestParam(value="descending",required=false) java.util.Optional<java.lang.Boolean> descending, @RequestParam(value="indexFrom",required=false) java.util.Optional<java.lang.Integer> indexFrom, @RequestParam(value="indexTo",required=false) java.util.Optional<java.lang.Integer> indexTo, @RequestParam(value="search",required=false) java.util.Optional<java.lang.String> search)
    • getUserById

      @GetMapping("/films/{id}") public Film getUserById​(@RequestHeader(value="X-Auth-Token",required=false) java.util.Optional<java.lang.String> token, @PathVariable java.lang.Long id)
    • getPersons

      @GetMapping("/search-person/{search}") public org.springframework.http.ResponseEntity<?> getPersons​(@RequestHeader(value="X-Auth-Token",required=false) java.util.Optional<java.lang.String> token, @PathVariable java.lang.String search)
    • saveFilm

      @ResponseStatus(CREATED) @PostMapping("/films") public Film saveFilm​(@RequestHeader(value="X-Auth-Token",required=false) java.util.Optional<java.lang.String> token, @RequestBody Film film)
    • deleteFilm

      @DeleteMapping("/films/{id}") public void deleteFilm​(@RequestHeader(value="X-Auth-Token",required=false) java.util.Optional<java.lang.String> token, @PathVariable long id)