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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getPreference​(pl.edu.icm.unity.types.basic.EntityParam entity, java.lang.String preferenceId)
      Returns a given preference.
      void removePreference​(pl.edu.icm.unity.types.basic.EntityParam entity, java.lang.String preferenceId)
      Removes the given preference.
      void setPreference​(pl.edu.icm.unity.types.basic.EntityParam entity, java.lang.String preferenceId, java.lang.String value)
      Sets or updates a preference for the specified user.
    • Method Detail

      • setPreference

        void setPreference​(pl.edu.icm.unity.types.basic.EntityParam entity,
                           java.lang.String preferenceId,
                           java.lang.String value)
                    throws pl.edu.icm.unity.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.exceptions.EngineException
      • getPreference

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

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