1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.security.spi.impl.ldap;
18
19 import org.apache.jetspeed.security.SecurityException;
20
21 /***
22 * <p>
23 * The ldap user principal DAO.
24 * </p>
25 *
26 * @author <a href="mailto:mike.long@dataline.com">Mike Long </a>, <a
27 * href="mailto:dlestrat@apache.org">David Le Strat</a>
28 */
29 public interface LdapUserPrincipalDao extends LdapPrincipalDao
30 {
31 /***
32 * <p>
33 * Add a user to a group.
34 * </p>
35 *
36 * @param userPrincipalUid The user principal.
37 * @param groupPrincipalUid The group principal.
38 * @throws SecurityException A {@link SecurityException}.
39 */
40 void addGroup(String userPrincipalUid, String groupPrincipalUid) throws SecurityException;
41
42 /***
43 * <p>
44 * Remove a user from a group.
45 * </p>
46 *
47 * @param userPrincipalUid The user principal.
48 * @param groupPrincipalUid The group principal.
49 * @throws SecurityException A {@link SecurityException}.
50 */
51 void removeGroup(String userPrincipalUid, String groupPrincipalUid) throws SecurityException;
52
53 /***
54 * <p>
55 * Add a user to a group.
56 * </p>
57 *
58 * @param userPrincipalUid The user principal.
59 * @param rolePrincipalUid The role principal.
60 * @throws SecurityException A {@link SecurityException}.
61 */
62 void addRole(String userPrincipalUid, String rolePrincipalUid) throws SecurityException;
63
64 /***
65 * <p>
66 * Remove a user from a group.
67 * </p>
68 *
69 * @param userPrincipalUid The user principal.
70 * @param rolePrincipalUid The role principal.
71 * @throws SecurityException A {@link SecurityException}.
72 */
73 void removeRole(String userPrincipalUid, String rolePrincipalUid) throws SecurityException;
74
75
76 /***
77 * <p>
78 * Return an array of the group principal UIDS that belong to a specific user.
79 * </p>
80 *
81 * @param userPrincipalUid The user principal uid.
82 * @return The array of group uids asociated with this user
83 * @throws SecurityException A {@link SecurityException}.
84 */
85 String[] getGroupUidsForUser(String userPrincipalUid) throws SecurityException;
86
87 /***
88 * <p>
89 * Return an array of the role principal UIDS that belong to a specific user.
90 * </p>
91 *
92 * @param userPrincipalUid The user principal uid.
93 * @return The array of group uids asociated with this user
94 * @throws SecurityException A {@link SecurityException}.
95 */
96 String[] getRoleUidsForUser(String userPrincipalUid) throws SecurityException;
97
98 /***
99 * <p>
100 * Return an array of the user principal uids that belong to a group.
101 * </p>
102 *
103 * @param groupPrincipalUid The group uid.
104 * @return The array of user uids asociated with this group
105 * @throws SecurityException A {@link SecurityException}.
106 */
107 String[] getUserUidsForGroup(String groupPrincipalUid) throws SecurityException;
108
109 /***
110 * <p>
111 * Return an array of the user principal uids that belong to a role.
112 * </p>
113 *
114 * @param rolePrincipalUid The role uid.
115 * @return The array of user uids asociated with this group
116 * @throws SecurityException A {@link SecurityException}.
117 */
118 String[] getUserUidsForRole(String rolePrincipalUid) throws SecurityException;
119
120 /***
121 * <p>
122 * Return an array of the role principal UIDS that belong to a specific group.
123 * </p>
124 *
125 * @param groupPrincipalUid The group principal uid.
126 * @return The array of role uids asociated with this user
127 * @throws SecurityException A {@link SecurityException}.
128 */
129 String[] getRolesForGroup(String groupPrincipalUid) throws SecurityException;
130
131 /***
132 * <p>
133 * Add a role to a group.
134 * </p>
135 *
136 * @param groupPrincipalUid The group principal.
137 * @param rolePrincipalUid The role principal.
138 * @throws SecurityException A {@link SecurityException}.
139 */
140 void addRoleToGroup(String groupPrincipalUid, String rolePrincipalUid) throws SecurityException;
141
142 /***
143 * <p>
144 * Remove a role from a group.
145 * </p>
146 *
147 * @param groupPrincipalUid The group principal.
148 * @param rolePrincipalUid The role principal.
149 * @throws SecurityException A {@link SecurityException}.
150 */
151 void removeRoleFromGroup(String groupPrincipalUid, String rolePrincipalUid) throws SecurityException;
152
153
154 }