Class SearchFilterSvc

java.lang.Object
com.patreonshout.rest.BaseSvc
com.patreonshout.rest.SearchFilterSvc
All Implemented Interfaces:
SearchFilterImpl

@RestController
public class SearchFilterSvc
extends BaseSvc
implements SearchFilterImpl
SearchFilter RESTful Endpoint Interface
  • Field Details

    • webAccountFunctions

      @Autowired private WebAccountFunctions webAccountFunctions
      An autowired Spring component that endpoints utilize to send or receive data from the database
    • searchFiltersRepository

      @Autowired private SearchFiltersRepository searchFiltersRepository
      An autowired Spring component that endpoints utilize to send or receive data from the search_filters table in the database
  • Constructor Details

    • SearchFilterSvc

      public SearchFilterSvc()
  • Method Details

    • DeleteFilter

      public org.springframework.http.ResponseEntity<?> DeleteFilter​(FilterDeleteRequest filterDeleteRequest) throws PSException
      Endpoint that will delete a SearchFilter object from the database for a user
      Specified by:
      DeleteFilter in interface SearchFilterImpl
      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

      public org.springframework.http.ResponseEntity<?> GetUserFilters​(java.lang.String loginToken) throws PSException
      Endpoint that will get every SearchFilter from the database for a user
      Specified by:
      GetUserFilters in interface SearchFilterImpl
      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

      public org.springframework.http.ResponseEntity<?> AddFilter​(FilterAddRequest filterAddRequest) throws PSException
      Endpoint that will add a new SearchFilter to the database for a user
      Specified by:
      AddFilter in interface SearchFilterImpl
      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