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.util.AttributeSet; |
19 | |
import org.kuali.rice.core.util.jaxb.AttributeSetAdapter; |
20 | |
import org.kuali.rice.core.util.jaxb.MapStringStringAdapter; |
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.principal.Principal; |
25 | |
import org.kuali.rice.kim.api.responsibility.Responsibility; |
26 | |
import org.kuali.rice.kim.api.responsibility.ResponsibilityAction; |
27 | |
import org.kuali.rice.kim.bo.entity.dto.KimEntityDefaultInfo; |
28 | |
import org.kuali.rice.kim.bo.entity.dto.KimEntityInfo; |
29 | |
import org.kuali.rice.kim.bo.reference.dto.EmploymentStatusInfo; |
30 | |
import org.kuali.rice.kim.bo.reference.dto.EmploymentTypeInfo; |
31 | |
import org.kuali.rice.kim.bo.reference.dto.ExternalIdentifierTypeInfo; |
32 | |
import org.kuali.rice.kim.bo.role.dto.KimPermissionInfo; |
33 | |
import org.kuali.rice.kim.bo.role.dto.PermissionAssigneeInfo; |
34 | |
import org.kuali.rice.kim.util.KIMWebServiceConstants; |
35 | |
|
36 | |
import javax.jws.WebMethod; |
37 | |
import javax.jws.WebParam; |
38 | |
import javax.jws.WebService; |
39 | |
import javax.jws.soap.SOAPBinding; |
40 | |
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; |
41 | |
import java.util.List; |
42 | |
import java.util.Map; |
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | |
@WebService(name = KIMWebServiceConstants.IdentityManagementService.WEB_SERVICE_NAME, targetNamespace = KIMWebServiceConstants.MODULE_TARGET_NAMESPACE) |
60 | |
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) |
61 | |
public interface IdentityManagementService { |
62 | |
|
63 | |
|
64 | |
|
65 | |
|
66 | |
|
67 | |
Principal getPrincipal(@WebParam(name = "principalId") String principalId); |
68 | |
Principal getPrincipalByPrincipalName(@WebParam(name = "principalName") String principalName); |
69 | |
|
70 | |
Principal getPrincipalByPrincipalNameAndPassword( |
71 | |
@WebParam(name = "principalName") String principalName, |
72 | |
@WebParam(name = "password") String password |
73 | |
); |
74 | |
|
75 | |
KimEntityDefaultInfo getEntityDefaultInfo(@WebParam(name = "entityId") String entityId); |
76 | |
KimEntityDefaultInfo getEntityDefaultInfoByPrincipalId(@WebParam(name = "principalId") String principalId); |
77 | |
KimEntityDefaultInfo getEntityDefaultInfoByPrincipalName(@WebParam(name = "principalName") String principalName); |
78 | |
|
79 | |
List<? extends KimEntityDefaultInfo> lookupEntityDefaultInfo( |
80 | |
@XmlJavaTypeAdapter(value = MapStringStringAdapter.class) |
81 | |
@WebParam(name = "searchCriteria") Map<String, String> searchCriteria, |
82 | |
@WebParam(name = "unbounded") boolean unbounded |
83 | |
); |
84 | |
|
85 | |
int getMatchingEntityCount(@XmlJavaTypeAdapter(value = MapStringStringAdapter.class) |
86 | |
@WebParam(name = "searchCriteria") Map<String, String> searchCriteria); |
87 | |
|
88 | |
|
89 | |
|
90 | |
KimEntityInfo getEntityInfo(@WebParam(name = "entityId") String entityId); |
91 | |
KimEntityInfo getEntityInfoByPrincipalId(@WebParam(name = "principalId") String principalId); |
92 | |
KimEntityInfo getEntityInfoByPrincipalName(@WebParam(name = "principalName") String principalName); |
93 | |
|
94 | |
List<KimEntityInfo> lookupEntityInfo( |
95 | |
@XmlJavaTypeAdapter(value = MapStringStringAdapter.class) |
96 | |
@WebParam(name = "searchCriteria") Map<String, String> searchCriteria, |
97 | |
@WebParam(name = "unbounded") boolean unbounded |
98 | |
); |
99 | |
|
100 | |
Type getAddressType(@WebParam(name = "code") String code); |
101 | |
EntityAffiliationType getAffiliationType(@WebParam(name = "code") String code); |
102 | |
Type getCitizenshipStatus(@WebParam(name = "code") String code); |
103 | |
Type getEmailType(@WebParam(name = "code") String code); |
104 | |
EmploymentStatusInfo getEmploymentStatus(@WebParam(name = "code") String code); |
105 | |
EmploymentTypeInfo getEmploymentType(@WebParam(name = "code") String code); |
106 | |
Type getEntityNameType(@WebParam(name = "code") String code); |
107 | |
Type getEntityType(@WebParam(name = "code") String code); |
108 | |
ExternalIdentifierTypeInfo getExternalIdentifierType(@WebParam(name = "code") String code); |
109 | |
Type getPhoneType(@WebParam(name = "code") String code); |
110 | |
|
111 | |
|
112 | |
|
113 | |
|
114 | |
|
115 | |
Group getGroup(@WebParam(name = "groupId") String groupId); |
116 | |
|
117 | |
Group getGroupByName( |
118 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
119 | |
@WebParam(name = "groupName") String groupName |
120 | |
); |
121 | |
|
122 | |
List<String> getParentGroupIds(@WebParam(name = "groupId") String groupId); |
123 | |
List<String> getDirectParentGroupIds(@WebParam(name = "groupId") String groupId); |
124 | |
|
125 | |
@WebMethod(operationName="getGroupIdsForPrincipal") |
126 | |
List<String> getGroupIdsForPrincipal(@WebParam(name = "principalId") String principalId); |
127 | |
|
128 | |
@WebMethod(operationName="getGroupIdsForPrincipalByNamespace") |
129 | |
List<String> getGroupIdsForPrincipal( |
130 | |
@WebParam(name = "principalId") String principalId, |
131 | |
@WebParam(name = "namespaceCode") String namespaceCode |
132 | |
); |
133 | |
|
134 | |
@WebMethod(operationName="getGroupsForPrincipal") |
135 | |
List<? extends Group> getGroupsForPrincipal(@WebParam(name = "principalId") String principalId); |
136 | |
|
137 | |
@WebMethod(operationName="getGroupsForPrincipalByNamespace") |
138 | |
List<? extends Group> getGroupsForPrincipal( |
139 | |
@WebParam(name = "principalId") String principalId, |
140 | |
@WebParam(name = "namespaceCode") String namespaceCode |
141 | |
); |
142 | |
|
143 | |
List<String> getMemberGroupIds(@WebParam(name = "groupId") String groupId); |
144 | |
List<String> getDirectMemberGroupIds(@WebParam(name = "groupId") String groupId); |
145 | |
|
146 | |
@WebMethod(operationName="isMemberOfGroup") |
147 | |
boolean isMemberOfGroup( |
148 | |
@WebParam(name = "principalId") String principalId, |
149 | |
@WebParam(name = "groupId") String groupId |
150 | |
); |
151 | |
|
152 | |
@WebMethod(operationName="isMemberOfGroupByNamespace") |
153 | |
boolean isMemberOfGroup( |
154 | |
@WebParam(name = "principalId") String principalId, |
155 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
156 | |
@WebParam(name = "groupName") String groupName |
157 | |
); |
158 | |
|
159 | |
boolean isGroupMemberOfGroup( |
160 | |
@WebParam(name = "potentialMemberGroupId") String potentialMemberGroupId, |
161 | |
@WebParam(name = "potentialParentId") String potentialParentId |
162 | |
); |
163 | |
|
164 | |
List<String> getGroupMemberPrincipalIds(@WebParam(name = "groupId") String groupId); |
165 | |
List<String> getDirectGroupMemberPrincipalIds(@WebParam(name = "groupId") String groupId); |
166 | |
|
167 | |
boolean addGroupToGroup( |
168 | |
@WebParam(name = "childId") String childId, |
169 | |
@WebParam(name = "parentId") String parentId |
170 | |
); |
171 | |
|
172 | |
boolean removeGroupFromGroup( |
173 | |
@WebParam(name = "childId") String childId, |
174 | |
@WebParam(name = "parentId") String parentId |
175 | |
); |
176 | |
|
177 | |
boolean addPrincipalToGroup( |
178 | |
@WebParam(name = "principalId") String principalId, |
179 | |
@WebParam(name = "groupId") String groupId |
180 | |
); |
181 | |
|
182 | |
boolean removePrincipalFromGroup( |
183 | |
@WebParam(name = "principalId") String principalId, |
184 | |
@WebParam(name = "groupId") String groupId |
185 | |
); |
186 | |
|
187 | |
Group createGroup(@WebParam(name = "group") Group group); |
188 | |
void removeAllMembers(@WebParam(name = "groupId") String groupId); |
189 | |
|
190 | |
Group updateGroup( |
191 | |
@WebParam(name = "groupId") String groupId, |
192 | |
@WebParam(name = "group") Group group |
193 | |
); |
194 | |
|
195 | |
|
196 | |
|
197 | |
|
198 | |
|
199 | |
|
200 | |
|
201 | |
|
202 | |
|
203 | |
|
204 | |
|
205 | |
|
206 | |
|
207 | |
|
208 | |
|
209 | |
boolean hasPermission( |
210 | |
@WebParam(name = "principalId") String principalId, |
211 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
212 | |
@WebParam(name = "permissionName") String permissionName, |
213 | |
@WebParam(name = "permissionDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet permissionDetails |
214 | |
); |
215 | |
|
216 | |
boolean isAuthorized( |
217 | |
@WebParam(name = "principalId") String principalId, |
218 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
219 | |
@WebParam(name = "permissionName") String permissionName, |
220 | |
@WebParam(name = "permissionDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet permissionDetails, |
221 | |
@WebParam(name = "qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification |
222 | |
); |
223 | |
|
224 | |
boolean hasPermissionByTemplateName( |
225 | |
@WebParam(name = "principalId") String principalId, |
226 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
227 | |
@WebParam(name = "permissionTemplateName") String permissionTemplateName, |
228 | |
@WebParam(name = "permissionDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet permissionDetails |
229 | |
); |
230 | |
|
231 | |
boolean isAuthorizedByTemplateName( |
232 | |
@WebParam(name = "principalId") String principalId, |
233 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
234 | |
@WebParam(name = "permissionTemplateName") String permissionTemplateName, |
235 | |
@WebParam(name = "permissionDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet permissionDetails, |
236 | |
@WebParam(name = "qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification |
237 | |
); |
238 | |
|
239 | |
|
240 | |
|
241 | |
|
242 | |
List<? extends KimPermissionInfo> getAuthorizedPermissions( |
243 | |
@WebParam(name = "principalId") String principalId, |
244 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
245 | |
@WebParam(name = "permissionName") String permissionName, |
246 | |
@WebParam(name = "permissionDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet permissionDetails, |
247 | |
@WebParam(name = "qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification |
248 | |
); |
249 | |
|
250 | |
List<? extends KimPermissionInfo> getAuthorizedPermissionsByTemplateName( |
251 | |
@WebParam(name = "principalId") String principalId, |
252 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
253 | |
@WebParam(name = "permissionTemplateName") String permissionTemplateName, |
254 | |
@WebParam(name = "permissionDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet permissionDetails, |
255 | |
@WebParam(name = "qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification |
256 | |
); |
257 | |
|
258 | |
List<PermissionAssigneeInfo> getPermissionAssignees( |
259 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
260 | |
@WebParam(name = "permissionName") String permissionName, |
261 | |
@WebParam(name = "permissionDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet permissionDetails, |
262 | |
@WebParam(name = "qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification |
263 | |
); |
264 | |
|
265 | |
List<PermissionAssigneeInfo> getPermissionAssigneesForTemplateName( |
266 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
267 | |
@WebParam(name = "permissionTemplateName") String permissionTemplateName, |
268 | |
@WebParam(name = "permissionDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet permissionDetails, |
269 | |
@WebParam(name = "qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification |
270 | |
); |
271 | |
|
272 | |
|
273 | |
|
274 | |
|
275 | |
|
276 | |
|
277 | |
|
278 | |
|
279 | |
Responsibility getResponsibility(@WebParam(name = "responsibilityId") String responsibilityId); |
280 | |
|
281 | |
|
282 | |
|
283 | |
|
284 | |
|
285 | |
List<? extends Responsibility> getResponsibilitiesByName( |
286 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
287 | |
@WebParam(name = "responsibilityName") String responsibilityName |
288 | |
); |
289 | |
|
290 | |
|
291 | |
|
292 | |
|
293 | |
boolean hasResponsibility( |
294 | |
@WebParam(name = "principalId") String principalId, |
295 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
296 | |
@WebParam(name = "responsibilityName") String responsibilityName, |
297 | |
@WebParam(name = "qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification, |
298 | |
@WebParam(name = "responsibilityDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet responsibilityDetails |
299 | |
); |
300 | |
|
301 | |
|
302 | |
|
303 | |
|
304 | |
boolean hasResponsibilityByTemplateName( |
305 | |
@WebParam(name = "principalId") String principalId, |
306 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
307 | |
@WebParam(name = "responsibilityTemplateName") String responsibilityTemplateName, |
308 | |
@WebParam(name = "qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification, |
309 | |
@WebParam(name = "responsibilityDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet responsibilityDetails |
310 | |
); |
311 | |
|
312 | |
List<ResponsibilityAction> getResponsibilityActions( |
313 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
314 | |
@WebParam(name = "responsibilityName") String responsibilityName, |
315 | |
@WebParam(name = "qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification, |
316 | |
@WebParam(name = "responsibilityDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet responsibilityDetails |
317 | |
); |
318 | |
|
319 | |
List<ResponsibilityAction> getResponsibilityActionsByTemplateName( |
320 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
321 | |
@WebParam(name = "responsibilityTemplateName") String responsibilityTemplateName, |
322 | |
@WebParam(name = "qualification") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet qualification, |
323 | |
@WebParam(name = "responsibilityDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet responsibilityDetails |
324 | |
); |
325 | |
|
326 | |
|
327 | |
|
328 | |
|
329 | |
boolean isPermissionDefinedForTemplateName( |
330 | |
@WebParam(name = "namespaceCode") String namespaceCode, |
331 | |
@WebParam(name = "permissionTemplateName") String permissionTemplateName, |
332 | |
@WebParam(name = "permissionDetails") @XmlJavaTypeAdapter(value = AttributeSetAdapter.class) AttributeSet permissionDetails |
333 | |
); |
334 | |
|
335 | |
|
336 | |
|
337 | |
|
338 | |
|
339 | |
|
340 | |
void flushAllCaches(); |
341 | |
void flushEntityPrincipalCaches(); |
342 | |
void flushGroupCaches(); |
343 | |
void flushPermissionCaches(); |
344 | |
void flushResponsibilityCaches(); |
345 | |
|
346 | |
} |