1 package org.apache.archiva.redback.users.ldap.ctl;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.archiva.redback.common.ldap.user.LdapUser;
23 import org.apache.archiva.redback.users.User;
24 import org.apache.archiva.redback.common.ldap.MappingException;
25 import org.apache.archiva.redback.users.ldap.LdapUserQuery;
26
27 import javax.naming.directory.DirContext;
28 import java.util.Collection;
29 import java.util.List;
30 import java.util.Map;
31
32
33
34
35 public interface LdapController
36 {
37
38 void removeUser( String principal, DirContext context )
39 throws LdapControllerException;
40
41 void updateUser( User user, DirContext context )
42 throws LdapControllerException, MappingException;
43
44 boolean userExists( String key, DirContext context )
45 throws LdapControllerException;
46
47 Collection<User> getUsers( DirContext context )
48 throws LdapControllerException, MappingException;
49
50 void createUser( User user, DirContext context, boolean encodePasswordIfChanged )
51 throws LdapControllerException, MappingException;
52
53 LdapUser getUser( String key, DirContext context )
54 throws LdapControllerException, MappingException;
55
56 List<User> getUsersByQuery( LdapUserQuery query, DirContext context )
57 throws LdapControllerException, MappingException;
58
59 void initialize();
60
61
62
63
64
65
66 Map<String, Collection<String>> findUsersWithRoles( DirContext dirContext )
67 throws LdapControllerException;
68 }