User Preference Service

cancel
Showing results for 
Search instead for 
Did you mean: 

User Preference Service

resplin
Intermediate
0 0 986

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



Preference Service3.0


Preference Service



/**
* Get all preferences for a particular user
*
* @param  userName                     the user name
* @return Map<String, Serializable>    a map containing the preference values, empty if none
*/
Map<String, Serializable> getPreferences(String userName);


/**
* Get the preferences for a particular user.
*


* If no filter if provided all preferences are returned.
* <p>
* 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.
*
* @param userName                      the user name
* @param preferenceFilter              the preference filter
* @return Map<String, Serializable>    a map containing the preference values, empty if none
*/
Map<String, Serializable> getPreferences(String userName, String preferenceFilter);


<pre>   
/**

* 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'.
*
* @param userName      the user name
* @param preferences   the preference values
*/

void setPreferences(String userName, Map<String, Serializable> preferences);



<pre>
/**

* Clears all the preferences for a particular user.
*
* @param userName      the user name
*/

void clearPreferences(String userName);



<pre>
/**

* Clears the preferences for a particular user that match the filter optionally provided.

* If no filter if present then all preferences are cleared.
*
* @param userName          the user name
* @param preferenceFilter  the preference filter

  • /

void clearPreferences(String userName, String preferenceFilter);



Preferences Aspect


<pre>
<aspect name='cmSmiley Tonguereferences'>

   <title>Preferences</title>
   <properties>
      <property name='cm:preferenceValues'>
         <type>d:content</type>
      </property>
   <properties>

</aspect>