Interface PreferenceService
- All Known Implementing Classes:
PreferenceServiceImpl
@AlfrescoPublicApi
public interface PreferenceService
- Author:
- Roy Wetherall
-
Method Summary
Modifier and TypeMethodDescriptionvoidclearPreferences(String userName) Clears all the preferences for a particular user.voidclearPreferences(String userName, String preferenceFilter) Clears the preferences for a particular user that match the filter optionally provided.org.alfresco.query.PagingResults<Pair<String,Serializable>> getPagedPreferences(String userName, String preferenceFilter, org.alfresco.query.PagingRequest pagingRequest) getPreference(String userName, String preferenceName) getPreferences(String userName) Get all preferences for a particular usergetPreferences(String userName, String preferenceFilter) Get the preferences for a particular user.voidsetPreferences(String userName, Map<String, Serializable> preferences) Sets the preference values for a user.
-
Method Details
-
getPreferences
Get all preferences for a particular user- Parameters:
userName- the user name- Returns:
- a map containing the preference values, empty if none
-
getPreference
@Auditable(parameters={"userName","preferenceName"}) Serializable getPreference(String userName, String preferenceName) -
getPreferences
@Auditable(parameters={"userName","preferenceFilter"}) Map<String,Serializable> getPreferences(String userName, String preferenceFilter) Get the preferences for a particular user.If no filter if provided all preferences are returned.
If a filter is provided it's used to filter the results. For example the filter "alfresco.myComp" will only return filters that are in the "namespace" alfresco.myComp.
- Parameters:
userName- the user namepreferenceFilter- the preference filter- Returns:
- a map containing the preference values, empty if none
-
getPagedPreferences
@Auditable(parameters={"userName","preferenceFilter"}) org.alfresco.query.PagingResults<Pair<String,Serializable>> getPagedPreferences(String userName, String preferenceFilter, org.alfresco.query.PagingRequest pagingRequest) -
setPreferences
@Auditable(parameters={"userName","preferences"}) void setPreferences(String userName, Map<String, Serializable> preferences) Sets the preference values for a user.Values provided overlay those already present.
Preference value names can be "namespaced" by using package notation. For example "alfresc.myComp.myValue".
- Parameters:
userName- the user namepreferences- the preference values
-
clearPreferences
Clears all the preferences for a particular user.- Parameters:
userName- the user name
-
clearPreferences
@Auditable(parameters={"userName","preferenceFilter"}) void clearPreferences(String userName, String preferenceFilter) Clears the preferences for a particular user that match the filter optionally provided.If no filter if present then all preferences are cleared.
- Parameters:
userName- the user namepreferenceFilter- the preference filter
-