Interface PreferenceService

    • Method Detail

      • getPreferences

        @Auditable(parameters="userName")
        Map<String,​Serializable> getPreferences​(String userName)
        Get all preferences for a particular user
        Parameters:
        userName - the user name
        Returns:
        a map containing the preference values, empty if none
      • 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 name
        preferenceFilter - the preference filter
        Returns:
        a map containing the preference values, empty if none
      • 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 name
        preferences - the preference values
      • clearPreferences

        @Auditable(parameters="userName")
        void clearPreferences​(String userName)
        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 name
        preferenceFilter - the preference filter