org.alfresco.repo.preference
Class PreferenceServiceImpl

java.lang.Object
  extended by org.alfresco.repo.preference.PreferenceServiceImpl
All Implemented Interfaces:
PreferenceService

public class PreferenceServiceImpl
extends java.lang.Object
implements PreferenceService

Preference Service Implementation


Constructor Summary
PreferenceServiceImpl()
           
 
Method Summary
 void clearPreferences(java.lang.String userName)
          Clears all the preferences for a particular user.
 void clearPreferences(java.lang.String userName, java.lang.String preferenceFilter)
          Clears the preferences for a particular user that match the filter optionally provided.
 java.util.Map getPreferences(java.lang.String userName)
          Get all preferences for a particular user
 java.util.Map getPreferences(java.lang.String userName, java.lang.String preferenceFilter)
          Get the preferences for a particular user.
 void setAuthenticationContext(AuthenticationContext authenticationContext)
          Set the authentication component
 void setContentService(ContentService contentService)
          Set the content service
 void setNodeService(NodeService nodeService)
          Set the node service
 void setPermissionService(PermissionService permissionService)
          Set the permission service
 void setPersonService(PersonService personService)
          Set the person service
 void setPreferences(java.lang.String userName, java.util.Map preferences)
          Sets the preference values for a user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferenceServiceImpl

public PreferenceServiceImpl()
Method Detail

setNodeService

public void setNodeService(NodeService nodeService)
Set the node service

Parameters:
nodeService - the node service

setContentService

public void setContentService(ContentService contentService)
Set the content service

Parameters:
contentService - the content service

setPersonService

public void setPersonService(PersonService personService)
Set the person service

Parameters:
personService - the person service

setPermissionService

public void setPermissionService(PermissionService permissionService)
Set the permission service

Parameters:
permissionService - the permission service

setAuthenticationContext

public void setAuthenticationContext(AuthenticationContext authenticationContext)
Set the authentication component

Parameters:
authenticationContext - the authentication component

getPreferences

public java.util.Map getPreferences(java.lang.String userName)
Description copied from interface: PreferenceService
Get all preferences for a particular user

Specified by:
getPreferences in interface PreferenceService
Parameters:
userName - the user name
Returns:
Map a map containing the preference values, empty if none
See Also:
PreferenceService.getPreferences(java.lang.String)

getPreferences

public java.util.Map getPreferences(java.lang.String userName,
                                    java.lang.String preferenceFilter)
Description copied from interface: PreferenceService
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.

Specified by:
getPreferences in interface PreferenceService
Parameters:
userName - the user name
preferenceFilter - the preference filter
Returns:
Map a map containing the preference values, empty if none
See Also:
org.alfresco.repo.person.PersonService#getPreferences(java.lang.String, java.lang.String)

setPreferences

public void setPreferences(java.lang.String userName,
                           java.util.Map preferences)
Description copied from interface: PreferenceService
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".

Specified by:
setPreferences in interface PreferenceService
Parameters:
userName - the user name
preferences - the preference values
See Also:
org.alfresco.repo.person.PersonService#setPreferences(java.lang.String, java.util.HashMap)

clearPreferences

public void clearPreferences(java.lang.String userName)
Description copied from interface: PreferenceService
Clears all the preferences for a particular user.

Specified by:
clearPreferences in interface PreferenceService
Parameters:
userName - the user name
See Also:
PreferenceService.clearPreferences(java.lang.String)

clearPreferences

public void clearPreferences(java.lang.String userName,
                             java.lang.String preferenceFilter)
Description copied from interface: PreferenceService
Clears the preferences for a particular user that match the filter optionally provided.

If no filter if present then all preferences are cleared.

Specified by:
clearPreferences in interface PreferenceService
Parameters:
userName - the user name
preferenceFilter - the preference filter
See Also:
org.alfresco.repo.person.PersonService#clearPreferences(java.lang.String, java.lang.String)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.