1
|
package eu.dnetlib.goldoa.service;
|
2
|
|
3
|
import eu.dnetlib.goldoa.domain.*;
|
4
|
|
5
|
import java.util.List;
|
6
|
|
7
|
/**
|
8
|
* Created by antleb on 3/4/15.
|
9
|
*/
|
10
|
public interface UserManager {
|
11
|
|
12
|
public User getById(String personId) throws PersonManagerException;
|
13
|
|
14
|
public User getByEmail(String email) throws PersonManagerException;
|
15
|
|
16
|
public void register(User user) throws PersonManagerException;
|
17
|
|
18
|
public User login(String email, String password) throws PersonManagerException;
|
19
|
|
20
|
;
|
21
|
|
22
|
public User activate(String email, String token) throws PersonManagerException;
|
23
|
|
24
|
;
|
25
|
|
26
|
public void resetPassword(String email) throws PersonManagerException;
|
27
|
|
28
|
public List<Role> getRoles();
|
29
|
|
30
|
public User saveUser(User user) throws PersonManagerException;
|
31
|
|
32
|
public List<User> getModerators();
|
33
|
|
34
|
public void activateUser(String email);
|
35
|
|
36
|
public void activateUsers(List<String> emails);
|
37
|
|
38
|
public void deactivateUser(String email);
|
39
|
|
40
|
public void deactivateUsers(List<String> emails);
|
41
|
|
42
|
public void acceptUserRole(String email, String roleId);
|
43
|
|
44
|
public void rejectRole(String email, String roleId);
|
45
|
|
46
|
public List<User> getUsers();
|
47
|
|
48
|
String generateId(User user);
|
49
|
|
50
|
public List<User> getAccountingOfficers();
|
51
|
|
52
|
public Role getRole(String roleId);
|
53
|
|
54
|
List<Role> getUserRoles(String email);
|
55
|
|
56
|
User createInActiveResearcher(String firstname, String lastname, String email, Organization organization) throws OrganizationManagerException, PersonManagerException;
|
57
|
}
|