1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.api.services; |
17 | |
|
18 | |
import org.kuali.rice.core.api.criteria.QueryByCriteria; |
19 | |
import org.kuali.rice.core.api.mo.common.Attributes; |
20 | |
import org.kuali.rice.core.util.AttributeSet; |
21 | |
import org.kuali.rice.kim.api.group.Group; |
22 | |
import org.kuali.rice.kim.api.identity.Type; |
23 | |
import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliationType; |
24 | |
import org.kuali.rice.kim.api.identity.entity.Entity; |
25 | |
import org.kuali.rice.kim.api.identity.entity.EntityDefault; |
26 | |
import org.kuali.rice.kim.api.identity.entity.EntityDefaultQueryResults; |
27 | |
import org.kuali.rice.kim.api.identity.entity.EntityQueryResults; |
28 | |
import org.kuali.rice.kim.api.identity.external.EntityExternalIdentifierType; |
29 | |
import org.kuali.rice.kim.api.identity.principal.Principal; |
30 | |
import org.kuali.rice.kim.api.permission.Permission; |
31 | |
import org.kuali.rice.kim.api.responsibility.Responsibility; |
32 | |
import org.kuali.rice.kim.api.responsibility.ResponsibilityAction; |
33 | |
import org.kuali.rice.kim.bo.role.dto.PermissionAssigneeInfo; |
34 | |
|
35 | |
import javax.jws.WebParam; |
36 | |
import java.util.List; |
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | |
public interface IdentityManagementService { |
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | |
Principal getPrincipal( String principalId); |
60 | |
Principal getPrincipalByPrincipalName( String principalName); |
61 | |
|
62 | |
Principal getPrincipalByPrincipalNameAndPassword( |
63 | |
String principalName, |
64 | |
String password |
65 | |
); |
66 | |
|
67 | |
EntityDefault getEntityDefaultInfo( String entityId); |
68 | |
EntityDefault getEntityDefaultInfoByPrincipalId( String principalId); |
69 | |
EntityDefault getEntityDefaultInfoByPrincipalName( String principalName); |
70 | |
|
71 | |
EntityDefaultQueryResults findEntityDefaults(@WebParam(name = "query") QueryByCriteria queryByCriteria); |
72 | |
|
73 | |
|
74 | |
|
75 | |
Entity getEntity( String entityId); |
76 | |
Entity getEntityByPrincipalId( String principalId); |
77 | |
Entity getEntityByPrincipalName( String principalName); |
78 | |
|
79 | |
EntityQueryResults findEntities(@WebParam(name = "query") QueryByCriteria queryByCriteria); |
80 | |
|
81 | |
Type getAddressType( String code); |
82 | |
EntityAffiliationType getAffiliationType( String code); |
83 | |
Type getCitizenshipStatus( String code); |
84 | |
Type getEmailType( String code); |
85 | |
Type getEmploymentStatus( String code); |
86 | |
Type getEmploymentType( String code); |
87 | |
Type getEntityNameType( String code); |
88 | |
Type getEntityType( String code); |
89 | |
EntityExternalIdentifierType getExternalIdentifierType( String code); |
90 | |
Type getPhoneType( String code); |
91 | |
|
92 | |
|
93 | |
|
94 | |
|
95 | |
|
96 | |
Group getGroup( String groupId); |
97 | |
|
98 | |
Group getGroupByName( |
99 | |
String namespaceCode, |
100 | |
String groupName |
101 | |
); |
102 | |
|
103 | |
List<String> getParentGroupIds( String groupId); |
104 | |
List<String> getDirectParentGroupIds( String groupId); |
105 | |
|
106 | |
|
107 | |
List<String> getGroupIdsForPrincipal( String principalId); |
108 | |
|
109 | |
|
110 | |
List<String> getGroupIdsForPrincipal( |
111 | |
String principalId, |
112 | |
String namespaceCode |
113 | |
); |
114 | |
|
115 | |
|
116 | |
List<? extends Group> getGroupsForPrincipal( String principalId); |
117 | |
|
118 | |
|
119 | |
List<? extends Group> getGroupsForPrincipal( |
120 | |
String principalId, |
121 | |
String namespaceCode |
122 | |
); |
123 | |
|
124 | |
List<String> getMemberGroupIds( String groupId); |
125 | |
List<String> getDirectMemberGroupIds( String groupId); |
126 | |
|
127 | |
|
128 | |
boolean isMemberOfGroup( |
129 | |
String principalId, |
130 | |
String groupId |
131 | |
); |
132 | |
|
133 | |
|
134 | |
boolean isMemberOfGroup( |
135 | |
String principalId, |
136 | |
String namespaceCode, |
137 | |
String groupName |
138 | |
); |
139 | |
|
140 | |
boolean isGroupMemberOfGroup( |
141 | |
String potentialMemberGroupId, |
142 | |
String potentialParentId |
143 | |
); |
144 | |
|
145 | |
List<String> getGroupMemberPrincipalIds( String groupId); |
146 | |
List<String> getDirectGroupMemberPrincipalIds( String groupId); |
147 | |
|
148 | |
boolean addGroupToGroup( |
149 | |
String childId, |
150 | |
String parentId |
151 | |
); |
152 | |
|
153 | |
boolean removeGroupFromGroup( |
154 | |
String childId, |
155 | |
String parentId |
156 | |
); |
157 | |
|
158 | |
boolean addPrincipalToGroup( |
159 | |
String principalId, |
160 | |
String groupId |
161 | |
); |
162 | |
|
163 | |
boolean removePrincipalFromGroup( |
164 | |
String principalId, |
165 | |
String groupId |
166 | |
); |
167 | |
|
168 | |
Group createGroup( Group group); |
169 | |
void removeAllMembers( String groupId); |
170 | |
|
171 | |
Group updateGroup( |
172 | |
String groupId, |
173 | |
Group group |
174 | |
); |
175 | |
|
176 | |
|
177 | |
|
178 | |
|
179 | |
|
180 | |
|
181 | |
|
182 | |
|
183 | |
|
184 | |
|
185 | |
|
186 | |
|
187 | |
|
188 | |
|
189 | |
|
190 | |
boolean hasPermission( |
191 | |
String principalId, |
192 | |
String namespaceCode, |
193 | |
String permissionName, |
194 | |
AttributeSet permissionDetails |
195 | |
); |
196 | |
|
197 | |
boolean isAuthorized( |
198 | |
String principalId, |
199 | |
String namespaceCode, |
200 | |
String permissionName, |
201 | |
AttributeSet permissionDetails, |
202 | |
AttributeSet qualification |
203 | |
); |
204 | |
|
205 | |
boolean hasPermissionByTemplateName( |
206 | |
String principalId, |
207 | |
String namespaceCode, |
208 | |
String permissionTemplateName, |
209 | |
AttributeSet permissionDetails |
210 | |
); |
211 | |
|
212 | |
boolean isAuthorizedByTemplateName( |
213 | |
String principalId, |
214 | |
String namespaceCode, |
215 | |
String permissionTemplateName, |
216 | |
Attributes permissionDetails, |
217 | |
Attributes qualification |
218 | |
); |
219 | |
|
220 | |
|
221 | |
|
222 | |
|
223 | |
List<Permission> getAuthorizedPermissions( |
224 | |
String principalId, |
225 | |
String namespaceCode, |
226 | |
String permissionName, |
227 | |
AttributeSet permissionDetails, |
228 | |
AttributeSet qualification |
229 | |
); |
230 | |
|
231 | |
List<Permission> getAuthorizedPermissionsByTemplateName( |
232 | |
String principalId, |
233 | |
String namespaceCode, |
234 | |
String permissionTemplateName, |
235 | |
AttributeSet permissionDetails, |
236 | |
AttributeSet qualification |
237 | |
); |
238 | |
|
239 | |
List<PermissionAssigneeInfo> getPermissionAssignees( |
240 | |
String namespaceCode, |
241 | |
String permissionName, |
242 | |
AttributeSet permissionDetails, |
243 | |
AttributeSet qualification |
244 | |
); |
245 | |
|
246 | |
List<PermissionAssigneeInfo> getPermissionAssigneesForTemplateName( |
247 | |
String namespaceCode, |
248 | |
String permissionTemplateName, |
249 | |
Attributes permissionDetails, |
250 | |
Attributes qualification |
251 | |
); |
252 | |
|
253 | |
|
254 | |
|
255 | |
|
256 | |
|
257 | |
|
258 | |
|
259 | |
|
260 | |
Responsibility getResponsibility( String responsibilityId); |
261 | |
|
262 | |
|
263 | |
|
264 | |
|
265 | |
|
266 | |
Responsibility getResponsibilityByName( |
267 | |
String namespaceCode, |
268 | |
String responsibilityName |
269 | |
); |
270 | |
|
271 | |
|
272 | |
|
273 | |
|
274 | |
boolean hasResponsibility( |
275 | |
String principalId, |
276 | |
String namespaceCode, |
277 | |
String responsibilityName, |
278 | |
AttributeSet qualification, |
279 | |
AttributeSet responsibilityDetails |
280 | |
); |
281 | |
|
282 | |
|
283 | |
|
284 | |
|
285 | |
boolean hasResponsibilityByTemplateName( |
286 | |
String principalId, |
287 | |
String namespaceCode, |
288 | |
String responsibilityTemplateName, |
289 | |
AttributeSet qualification, |
290 | |
AttributeSet responsibilityDetails |
291 | |
); |
292 | |
|
293 | |
List<ResponsibilityAction> getResponsibilityActions( |
294 | |
String namespaceCode, |
295 | |
String responsibilityName, |
296 | |
AttributeSet qualification, |
297 | |
AttributeSet responsibilityDetails |
298 | |
); |
299 | |
|
300 | |
List<ResponsibilityAction> getResponsibilityActionsByTemplateName( |
301 | |
String namespaceCode, |
302 | |
String responsibilityTemplateName, |
303 | |
AttributeSet qualification, |
304 | |
AttributeSet responsibilityDetails |
305 | |
); |
306 | |
|
307 | |
|
308 | |
|
309 | |
|
310 | |
boolean isPermissionDefinedForTemplateName( |
311 | |
String namespaceCode, |
312 | |
String permissionTemplateName, |
313 | |
AttributeSet permissionDetails |
314 | |
); |
315 | |
|
316 | |
|
317 | |
|
318 | |
|
319 | |
|
320 | |
|
321 | |
void flushAllCaches(); |
322 | |
void flushEntityPrincipalCaches(); |
323 | |
void flushGroupCaches(); |
324 | |
void flushPermissionCaches(); |
325 | |
void flushResponsibilityCaches(); |
326 | |
|
327 | |
} |