2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.api
.service
;
12 import java
.security
.Permission
;
13 import java
.util
.List
;
14 import java
.util
.UUID
;
16 import org
.hibernate
.criterion
.Criterion
;
17 import org
.springframework
.dao
.DataAccessException
;
18 import org
.springframework
.security
.core
.Authentication
;
19 import org
.springframework
.security
.core
.GrantedAuthority
;
20 import org
.springframework
.security
.core
.userdetails
.UsernameNotFoundException
;
21 import org
.springframework
.security
.provisioning
.GroupManager
;
22 import org
.springframework
.security
.provisioning
.UserDetailsManager
;
24 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
25 import eu
.etaxonomy
.cdm
.model
.common
.User
;
26 import eu
.etaxonomy
.cdm
.permission
.CdmPermission
;
27 import eu
.etaxonomy
.cdm
.persistence
.dao
.BeanInitializer
;
28 import eu
.etaxonomy
.cdm
.persistence
.query
.MatchMode
;
29 import eu
.etaxonomy
.cdm
.persistence
.query
.OrderHint
;
31 public interface IUserService
extends IService
<User
>, UserDetailsManager
, GroupManager
{
33 public void changePasswordForUser(String username
, String password
) throws UsernameNotFoundException
, DataAccessException
;
35 public UUID
saveGrantedAuthority(GrantedAuthority grantedAuthority
);
37 public UUID
saveGroup(Group group
);
40 * Return a List of users matching the given query string, optionally filtered by class, optionally with a particular MatchMode
42 * @param queryString the query string to filter by
43 * @param matchmode use a particular type of matching (can be null - defaults to exact matching)
44 * @param criteria additional criteria to filter by
45 * @param pageSize The maximum number of objects returned (can be null for all objects)
46 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
47 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
49 * Supports path like <code>orderHints.propertyNames</code> which
50 * include *-to-one properties like createdBy.username or
51 * authorTeam.persistentTitleCache
52 * @return a list of instances of type User matching the queryString
54 * @see {@link IIdentifiableEntityService#listByTitle(Class, String, MatchMode, List, Integer, Integer, List, List)}
57 public List
<User
> listByUsername(String queryString
, MatchMode matchmode
, List
<Criterion
> criteria
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);