1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.tuigwaa.security;
17
18 import java.util.List;
19
20 import javax.naming.NamingException;
21
22 import org.seasar.tuigwaa.security.auth.TgwRole;
23 import org.seasar.tuigwaa.security.auth.TgwUser;
24
25
26 /***
27 * @author someda
28 */
29 public interface DirectoryService {
30
31
32
33 public static final String EMBEDED = "org.seasar.tuigwaa.EMBEDED";
34 public static final String BASE_DN = "org.seasar.tuigwaa.BASE_DN";
35 public static final String USER_PREFIX = "org.seasar.tuigwaa.USER_PREFIX";
36 public static final String USER_SUFFIX = "org.seasar.tuigwaa.USER_SEARCH_DN";
37 public static final String ROLE_PREFIX = "org.seasar.tuigwaa.ROLE_PREFIX";
38 public static final String ROLE_SUFFIX = "org.seasar.tuigwaa.ROLE_SUFFIX";
39 public static final String ROLE_USER_ATTRIBUTE = "org.seasar.tuigwaa.ROLE_USER_ATTRIBUTE";
40 public static final String ROLE_USER_PREFIXONLY = "org.seasr.tuigwaa.ROLE_USER_PREFIXONLY";
41 public static final String PASSWORD_ATTRIBUTE = "org.seasar.tuigwaa.PASSWORD_ATTRIBUTE";
42 public static final String DESCRIPTION_ATTRIBUTE = "org.seasar.tuigwaa.DESCRIPTION_ATTRIBUTE";
43 public static final String ADMIN_USERNAME = "org.seasar.tuigwaa.ADMIN_USERNAME";
44 public static final String ADMIN_ROLENAME = "org.seasar.tuigwaa.ADMIN_ROLENAME";
45
46 /***
47 * Read configuration properties and set basic properties
48 * @throws NamingException
49 */
50 public void initialize() throws NamingException;
51
52 public TgwUser getUser(String userdn);
53
54 public List getUsers();
55
56 public void addUser(TgwUser user);
57
58 public void deleteUser(String userdn);
59
60 public void modifyUser(TgwUser user);
61
62 public TgwRole getRole(String roledn);
63
64 public List getRoles();
65
66 public void addRole(TgwRole role);
67
68 public void deleteRole(String role);
69
70 public void modifyRole(TgwRole role);
71
72 public String buildUserDN(String username);
73
74 }