Package pl.edu.icm.unity.engine.api
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 String
getPreference(EntityParam entity, String preferenceId)
Returns a given preference.void
removePreference(EntityParam entity, String preferenceId)
Removes the given preference.void
setPreference(EntityParam entity, String preferenceId, String value)
Sets or updates a preference for the specified user.
-
-
-
Method Detail
-
setPreference
void setPreference(EntityParam entity, String preferenceId, String value) throws EngineException
Sets or updates a preference for the specified user. The value can be arbitrary, for instance JSON encoded.- Parameters:
entity
-preferenceId
-value
-- Throws:
EngineException
-
getPreference
String getPreference(EntityParam entity, String preferenceId) throws EngineException
Returns a given preference. Null is returned if there is no such preference.- Parameters:
entity
-preferenceId
-- Returns:
- Throws:
EngineException
-
removePreference
void removePreference(EntityParam entity, String preferenceId) throws EngineException
Removes the given preference.- Parameters:
entity
-preferenceId
-- Throws:
EngineException
-
-