Interface PreferencesManagement


public interface PreferencesManagement
Preferences management API - allows for storing and retrieving user's preferences, useful for example for the web endpoints.
Author:
K. Benedyczak
  • Method Summary

    Modifier and Type
    Method
    Description
    getPreference(pl.edu.icm.unity.base.entity.EntityParam entity, String preferenceId)
    Returns a given preference.
    void
    removePreference(pl.edu.icm.unity.base.entity.EntityParam entity, String preferenceId)
    Removes the given preference.
    void
    setPreference(pl.edu.icm.unity.base.entity.EntityParam entity, String preferenceId, String value)
    Sets or updates a preference for the specified user.
  • Method Details

    • setPreference

      void setPreference(pl.edu.icm.unity.base.entity.EntityParam entity, String preferenceId, String value) throws pl.edu.icm.unity.base.exceptions.EngineException
      Sets or updates a preference for the specified user. The value can be arbitrary, for instance JSON encoded.
      Parameters:
      entity -
      preferenceId -
      value -
      Throws:
      pl.edu.icm.unity.base.exceptions.EngineException
    • getPreference

      String getPreference(pl.edu.icm.unity.base.entity.EntityParam entity, String preferenceId) throws pl.edu.icm.unity.base.exceptions.EngineException
      Returns a given preference. Null is returned if there is no such preference.
      Parameters:
      entity -
      preferenceId -
      Returns:
      Throws:
      pl.edu.icm.unity.base.exceptions.EngineException
    • removePreference

      void removePreference(pl.edu.icm.unity.base.entity.EntityParam entity, String preferenceId) throws pl.edu.icm.unity.base.exceptions.EngineException
      Removes the given preference.
      Parameters:
      entity -
      preferenceId -
      Throws:
      pl.edu.icm.unity.base.exceptions.EngineException