Class PreferenceServiceImpl

    • Constructor Detail

      • PreferenceServiceImpl

        public PreferenceServiceImpl()
    • Method Detail

      • setNodeService

        public void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)
        Set the node service
        Parameters:
        nodeService - the node service
      • setContentService

        public void setContentService​(ContentService contentService)
      • setPersonService

        public void setPersonService​(PersonService personService)
        Set the person service
        Parameters:
        personService - the person service
      • setPermissionService

        public void setPermissionService​(org.alfresco.service.cmr.security.PermissionService permissionService)
      • setAuthenticationContext

        public void setAuthenticationContext​(AuthenticationContext authenticationContext)
      • setAuthorityService

        public void setAuthorityService​(AuthorityService authorityService)
      • getPreferences

        public Map<String,​Serializable> getPreferences​(String userName,
                                                             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:
        a map containing the preference values, empty if none
      • setPreferences

        public void setPreferences​(String userName,
                                   Map<String,​Serializable> 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
      • clearPreferences

        public void clearPreferences​(String userName,
                                     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