mirror of
				https://github.com/Alfresco/alfresco-community-repo.git
				synced 2025-10-29 15:21:53 +00:00 
			
		
		
		
	107541: Merged 5.0.N (5.0.3) to HEAD-BUG-FIX (5.1/Cloud) (PARTIAL MERGE)
      107413: Merged DEV to 5.0.N (5.0.3)
         106858 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Cleaning of Javadoc,
   107565: MNT-13545 Fix compilation after merge of Javadoc
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@107633 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
		
	
		
			
				
	
	
		
			99 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			99 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
| /*
 | |
|  * Copyright (C) 2005-2010 Alfresco Software Limited.
 | |
|  *
 | |
|  * This file is part of Alfresco
 | |
|  *
 | |
|  * Alfresco is free software: you can redistribute it and/or modify
 | |
|  * it under the terms of the GNU Lesser General Public License as published by
 | |
|  * the Free Software Foundation, either version 3 of the License, or
 | |
|  * (at your option) any later version.
 | |
|  *
 | |
|  * Alfresco is distributed in the hope that it will be useful,
 | |
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | |
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | |
|  * GNU Lesser General Public License for more details.
 | |
|  *
 | |
|  * You should have received a copy of the GNU Lesser General Public License
 | |
|  * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
 | |
|  */
 | |
| package org.alfresco.service.cmr.preference;
 | |
| 
 | |
| import java.io.Serializable;
 | |
| import java.util.Map;
 | |
| 
 | |
| import org.alfresco.api.AlfrescoPublicApi;     
 | |
| import org.alfresco.query.PagingRequest;
 | |
| import org.alfresco.query.PagingResults;
 | |
| import org.alfresco.service.Auditable;
 | |
| import org.alfresco.util.Pair;
 | |
| 
 | |
| /**
 | |
|  * @author Roy Wetherall
 | |
|  */
 | |
| @AlfrescoPublicApi
 | |
| public interface PreferenceService
 | |
| {
 | |
|     /**
 | |
|      * Get all preferences for a particular user
 | |
|      * 
 | |
|      * @param  userName                     the user name
 | |
|      * @return a map containing the preference values, empty if none
 | |
|      */
 | |
|     @Auditable(parameters = {"userName"})
 | |
|     Map<String, Serializable> getPreferences(String userName);
 | |
| 
 | |
|     @Auditable(parameters = {"userName", "preferenceName"})
 | |
|     Serializable getPreference(String userName, String preferenceName);
 | |
|     
 | |
|     /**
 | |
|      * Get the preferences for a particular user.
 | |
|      * <p>
 | |
|      * 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 a map containing the preference values, empty if none
 | |
|      */
 | |
|     @Auditable(parameters = {"userName", "preferenceFilter"})
 | |
|     Map<String, Serializable> getPreferences(String userName, String preferenceFilter);
 | |
|     
 | |
|     @Auditable(parameters = {"userName", "preferenceFilter"})
 | |
|     PagingResults<Pair<String, Serializable>> getPagedPreferences(String userName, String preferenceFilter, PagingRequest pagingRequest);
 | |
|     
 | |
|     /**
 | |
|      * Sets the preference values for a user.
 | |
|      * <p>
 | |
|      * Values provided overlay those already present.
 | |
|      * <p>
 | |
|      * 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
 | |
|      */
 | |
|     @Auditable(parameters = {"userName", "preferences"})
 | |
|     void setPreferences(String userName, Map<String, Serializable> preferences);
 | |
|     
 | |
|     /**
 | |
|      * Clears all the preferences for a particular user.
 | |
|      * 
 | |
|      * @param userName      the user name
 | |
|      */
 | |
|     @Auditable(parameters = {"userName"})
 | |
|     void clearPreferences(String userName);
 | |
| 
 | |
|     /**
 | |
|      * Clears the preferences for a particular user that match the filter optionally provided.
 | |
|      * <p> 
 | |
|      * If no filter if present then all preferences are cleared.
 | |
|      * 
 | |
|      * @param userName          the user name
 | |
|      * @param preferenceFilter  the preference filter
 | |
|      */
 | |
|     @Auditable(parameters = {"userName", "preferenceFilter"})
 | |
|     void clearPreferences(String userName, String preferenceFilter);
 | |
| }
 |