Package org.alfresco.repo.preference
Class PreferenceServiceImpl
java.lang.Object
org.alfresco.repo.preference.PreferenceServiceImpl
- All Implemented Interfaces:
PreferenceService,Extensible
Preference Service Implementation
- Author:
- Roy Wetherall
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
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.<M extends Trait>
ExtendedTrait<M>voidsetAuthenticationContext(AuthenticationContext authenticationContext) voidsetAuthorityService(AuthorityService authorityService) voidsetContentService(ContentService contentService) voidsetNodeService(NodeService nodeService) Set the node servicevoidsetPermissionService(PermissionService permissionService) voidsetPersonService(PersonService personService) Set the person servicevoidsetPreferences(String userName, Map<String, Serializable> preferences) Sets the preference values for a user.
-
Constructor Details
-
PreferenceServiceImpl
public PreferenceServiceImpl()
-
-
Method Details
-
setNodeService
Set the node service- Parameters:
nodeService- the node service
-
setContentService
-
setPersonService
Set the person service- Parameters:
personService- the person service
-
setPermissionService
-
setAuthenticationContext
-
setAuthorityService
-
getPreferences
Description copied from interface:PreferenceServiceGet all preferences for a particular user- Specified by:
getPreferencesin interfacePreferenceService- Parameters:
userName- the user name- Returns:
- a map containing the preference values, empty if none
- See Also:
-
getPreference
- Specified by:
getPreferencein interfacePreferenceService
-
getPreferences
Description copied from interface:PreferenceServiceGet 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.
- Specified by:
getPreferencesin interfacePreferenceService- Parameters:
userName- the user namepreferenceFilter- the preference filter- Returns:
- a map containing the preference values, empty if none
-
getPagedPreferences
public org.alfresco.query.PagingResults<Pair<String,Serializable>> getPagedPreferences(String userName, String preferenceFilter, org.alfresco.query.PagingRequest pagingRequest) - Specified by:
getPagedPreferencesin interfacePreferenceService
-
setPreferences
Description copied from interface:PreferenceServiceSets 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".
- Specified by:
setPreferencesin interfacePreferenceService- Parameters:
userName- the user namepreferences- the preference values
-
clearPreferences
Description copied from interface:PreferenceServiceClears all the preferences for a particular user.- Specified by:
clearPreferencesin interfacePreferenceService- Parameters:
userName- the user name- See Also:
-
clearPreferences
Description copied from interface:PreferenceServiceClears the preferences for a particular user that match the filter optionally provided.If no filter if present then all preferences are cleared.
- Specified by:
clearPreferencesin interfacePreferenceService- Parameters:
userName- the user namepreferenceFilter- the preference filter
-
getTrait
- Specified by:
getTraitin interfaceExtensible
-
createPreferenceServiceTrait
-