public class PreferenceServiceImpl extends Object implements PreferenceService, Extensible
Modifier and Type | Class and Description |
---|---|
static class |
PreferenceServiceImpl.PageDetails |
Constructor and Description |
---|
PreferenceServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clearPreferences(String userName)
Clears all the preferences for a particular user.
|
void |
clearPreferences(String userName,
String preferenceFilter)
Clears the preferences for a particular user that match the filter optionally provided.
|
PreferenceServiceTrait |
createPreferenceServiceTrait() |
org.alfresco.query.PagingResults<org.alfresco.util.Pair<String,Serializable>> |
getPagedPreferences(String userName,
String preferenceFilter,
org.alfresco.query.PagingRequest pagingRequest) |
Serializable |
getPreference(String userName,
String preferenceName) |
Map<String,Serializable> |
getPreferences(String userName)
Get all preferences for a particular user
|
Map<String,Serializable> |
getPreferences(String userName,
String preferenceFilter)
Get the preferences for a particular user.
|
<M extends Trait> |
getTrait(Class<? extends M> traitAPI) |
void |
setAuthenticationContext(AuthenticationContext authenticationContext) |
void |
setAuthorityService(AuthorityService authorityService) |
void |
setContentService(ContentService contentService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set the node service
|
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) |
void |
setPersonService(PersonService personService)
Set the person service
|
void |
setPreferences(String userName,
Map<String,Serializable> preferences)
Sets the preference values for a user.
|
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- the node servicepublic void setContentService(ContentService contentService)
public void setPersonService(PersonService personService)
personService
- the person servicepublic void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
public void setAuthenticationContext(AuthenticationContext authenticationContext)
public void setAuthorityService(AuthorityService authorityService)
public Map<String,Serializable> getPreferences(String userName)
PreferenceService
getPreferences
in interface PreferenceService
userName
- the user namePreferenceService.getPreferences(java.lang.String)
public Serializable getPreference(String userName, String preferenceName)
getPreference
in interface PreferenceService
public Map<String,Serializable> getPreferences(String userName, String preferenceFilter)
PreferenceService
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.
getPreferences
in interface PreferenceService
userName
- the user namepreferenceFilter
- the preference filterpublic org.alfresco.query.PagingResults<org.alfresco.util.Pair<String,Serializable>> getPagedPreferences(String userName, String preferenceFilter, org.alfresco.query.PagingRequest pagingRequest)
getPagedPreferences
in interface PreferenceService
public void setPreferences(String userName, Map<String,Serializable> preferences)
PreferenceService
Values provided overlay those already present.
Preference value names can be "namespaced" by using package notation. For example "alfresc.myComp.myValue".
setPreferences
in interface PreferenceService
userName
- the user namepreferences
- the preference valuespublic void clearPreferences(String userName)
PreferenceService
clearPreferences
in interface PreferenceService
userName
- the user namePreferenceService.clearPreferences(java.lang.String)
public void clearPreferences(String userName, String preferenceFilter)
PreferenceService
If no filter if present then all preferences are cleared.
clearPreferences
in interface PreferenceService
userName
- the user namepreferenceFilter
- the preference filterpublic <M extends Trait> ExtendedTrait<M> getTrait(Class<? extends M> traitAPI)
getTrait
in interface Extensible
public PreferenceServiceTrait createPreferenceServiceTrait()
Copyright © 2005–2017 Alfresco Software. All rights reserved.