Project

General

Profile

« Previous | Next » 

Revision 7dbcf130

Added by Andreas Kohlbecker almost 12 years ago

securing UserService on method level - all tests successful

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IUserService.java
5 5
*
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/ 
8
*/
9 9

  
10 10
package eu.etaxonomy.cdm.api.service;
11 11

  
12
import java.security.Permission;
13 12
import java.util.List;
14 13
import java.util.UUID;
15 14

  
16 15
import org.hibernate.criterion.Criterion;
17 16
import org.springframework.dao.DataAccessException;
18
import org.springframework.security.core.Authentication;
19 17
import org.springframework.security.core.GrantedAuthority;
20 18
import org.springframework.security.core.userdetails.UsernameNotFoundException;
21 19
import org.springframework.security.provisioning.GroupManager;
......
28 26
import eu.etaxonomy.cdm.persistence.query.OrderHint;
29 27

  
30 28
public interface IUserService extends IService<User>, UserDetailsManager, GroupManager {
31
	
32
	public void changePasswordForUser(String username, String password) throws UsernameNotFoundException, DataAccessException;
33
	
34
	public UUID saveGrantedAuthority(GrantedAuthority grantedAuthority);
35
	
36
	public UUID saveGroup(Group group);
37
	
38
	/**
39
	 * Return a List of users matching the given query string, optionally filtered by class, optionally with a particular MatchMode
40
	 * 
41
	 * @param queryString the query string to filter by
42
	 * @param matchmode use a particular type of matching (can be null - defaults to exact matching)
43
	 * @param criteria additional criteria to filter by
44
	 * @param pageSize The maximum number of objects returned (can be null for all objects)
45
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
46
	 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
47
	 * @param orderHints
48
	 *            Supports path like <code>orderHints.propertyNames</code> which
49
	 *            include *-to-one properties like createdBy.username or
50
	 *            authorTeam.persistentTitleCache
51
	 * @return a list of instances of type User matching the queryString
52
	 * 
53
	 * @see {@link IIdentifiableEntityService#listByTitle(Class, String, MatchMode, List, Integer, Integer, List, List)}
54
	 *
55
	 */
29

  
30
    public void changePasswordForUser(String username, String password) throws UsernameNotFoundException, DataAccessException;
31

  
32
    public UUID saveGrantedAuthority(GrantedAuthority grantedAuthority);
33

  
34
    public UUID saveGroup(Group group);
35

  
36
    /**
37
     * Return a List of users matching the given query string, optionally filtered by class, optionally with a particular MatchMode
38
     *
39
     * @param queryString the query string to filter by
40
     * @param matchmode use a particular type of matching (can be null - defaults to exact matching)
41
     * @param criteria additional criteria to filter by
42
     * @param pageSize The maximum number of objects returned (can be null for all objects)
43
     * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
44
     * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
45
     * @param orderHints
46
     *            Supports path like <code>orderHints.propertyNames</code> which
47
     *            include *-to-one properties like createdBy.username or
48
     *            authorTeam.persistentTitleCache
49
     * @return a list of instances of type User matching the queryString
50
     *
51
     * @see {@link IIdentifiableEntityService#listByTitle(Class, String, MatchMode, List, Integer, Integer, List, List)}
52
     *
53
     */
56 54
    public List<User> listByUsername(String queryString, MatchMode matchmode, List<Criterion> criteria, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
57
    
58
   
55

  
56

  
59 57
}

Also available in: Unified diff