Interface UserPreferencesApi


@FeignClient(name="preferences-service", qualifiers="preferencesApi") public interface UserPreferencesApi
A UserPreferencesApi defines the public REST API to manage UserPreferences.
Author:
Heiko Scherrer
  • Method Details

    • findByUser

      @GetMapping(value="/v1/preferences", params="user") List<PreferenceVO> findByUser(@RequestParam("user") String user)
      Find and return all existing UserPreferences that belong to an user.
      Parameters:
      user - The owning user of the preferences
      Returns:
      An infinite filtered stream of PreferenceVO
    • findByUserAndKey

      @GetMapping(value="/v1/preferences", params={"user","key"}) PreferenceVO findByUserAndKey(@RequestParam("user") String user, @RequestParam("key") String key)
      Find and return one UserPreference that belongs to an user and has the given key.
      Parameters:
      user - The owning user of the preference
      key - The key of the preference
      Returns:
      One single instance
    • createOrUpdate

      @PostMapping("/v1/preferences") UserPreferenceVO createOrUpdate(@RequestBody UserPreferenceVO userPreference)
      Create or update an UserPreference.
      Parameters:
      userPreference - The user preference
      Returns:
      The saved instance