Package pl.edu.icm.unity.engine.api
Interface PreferencesManagement
-
public interface PreferencesManagementPreferences 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.StringgetPreference(pl.edu.icm.unity.types.basic.EntityParam entity, java.lang.String preferenceId)Returns a given preference.voidremovePreference(pl.edu.icm.unity.types.basic.EntityParam entity, java.lang.String preferenceId)Removes the given preference.voidsetPreference(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.EngineExceptionSets 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.EngineExceptionReturns 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.EngineExceptionRemoves the given preference.- Parameters:
entity-preferenceId-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
-