Interface SearchFilterImpl

All Known Implementing Classes:
SearchFilterSvc

@RequestMapping("/filters")
public interface SearchFilterImpl
Interface for endpoints relating to search filters
  • Method Summary

    Modifier and Type Method Description
    org.springframework.http.ResponseEntity<?> AddFilter​(FilterAddRequest filterAddRequest)
    Endpoint that will add a new SearchFilter to the database for a user
    org.springframework.http.ResponseEntity<?> DeleteFilter​(FilterDeleteRequest filterDeleteRequest)
    Endpoint that will delete a SearchFilter object from the database for a user
    org.springframework.http.ResponseEntity<?> GetUserFilters​(java.lang.String loginToken)
    Endpoint that will get every SearchFilter from the database for a user
  • Method Details

    • DeleteFilter

      @DeleteMapping org.springframework.http.ResponseEntity<?> DeleteFilter​(@RequestBody FilterDeleteRequest filterDeleteRequest) throws PSException
      Endpoint that will delete a SearchFilter object from the database for a user
      Parameters:
      filterDeleteRequest - is the FilterDeleteRequest object that contains json body information about the list we are going to delete from the database
      Returns:
      HttpStatus.OK if successful, HttpStatus.BAD_REQUEST otherwise
      Throws:
      PSException
    • GetUserFilters

      @GetMapping org.springframework.http.ResponseEntity<?> GetUserFilters​(@RequestParam java.lang.String loginToken) throws PSException
      Endpoint that will get every SearchFilter from the database for a user
      Parameters:
      loginToken - is the login token provided to the user upon sign in
      Returns:
      a json body of search filter objects for a user
      Throws:
      PSException
    • AddFilter

      @PutMapping org.springframework.http.ResponseEntity<?> AddFilter​(@RequestBody FilterAddRequest filterAddRequest) throws PSException
      Endpoint that will add a new SearchFilter to the database for a user
      Parameters:
      filterAddRequest - is the FilterAddRequest object that contains json body information about the list we are going to add to the database
      Returns:
      HttpStatus.CREATED if successful, HttpStatus.CONFLICT otherwise
      Throws:
      PSException