Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IdentityHelperService |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2007-2008 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.kew.identity.service; | |
17 | ||
18 | import org.kuali.rice.kew.actionrequest.Recipient; | |
19 | import org.kuali.rice.kew.dto.UserIdDTO; | |
20 | import org.kuali.rice.kew.user.UserId; | |
21 | import org.kuali.rice.kew.workgroup.GroupId; | |
22 | import org.kuali.rice.kim.bo.Group; | |
23 | import org.kuali.rice.kim.bo.Person; | |
24 | import org.kuali.rice.kim.bo.entity.KimPrincipal; | |
25 | ||
26 | /** | |
27 | * A simple helper service in KEW for interacting with the KIM identity | |
28 | * management services. Some of the methods on here exist solely for | |
29 | * the purpose of assisting with the piece-by-piece migration of | |
30 | * KEW to use the KIM services. | |
31 | * | |
32 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
33 | */ | |
34 | public interface IdentityHelperService { | |
35 | ||
36 | public String getIdForPrincipalName(String principalName); | |
37 | ||
38 | public String getIdForGroupName(String namespace, String groupName); | |
39 | ||
40 | /** | |
41 | * Returns the KimPrincipal for the given principal id. Throws an exception | |
42 | * if the principal id cannot be resolved to a principal. | |
43 | */ | |
44 | public KimPrincipal getPrincipal(String principalId); | |
45 | ||
46 | /** | |
47 | * Returns the KimPrincipal for the given principal name. Throws an exception | |
48 | * if the principal name cannot be resolved to a principal. | |
49 | */ | |
50 | public KimPrincipal getPrincipalByPrincipalName(String principalName); | |
51 | ||
52 | /** | |
53 | * Returns the Person for the given principal id. Throws an exception | |
54 | * if the principal id cannot be resolved to a person. | |
55 | */ | |
56 | public Person getPerson(String principalId); | |
57 | ||
58 | /** | |
59 | * Returns the Person for the given principal name. Throws an exception | |
60 | * if the principal name cannot be resolved to a person. | |
61 | */ | |
62 | public Person getPersonByPrincipalName(String principalName); | |
63 | ||
64 | /** | |
65 | * Returns the Person for the given employee id. Throws an exception | |
66 | * if the principal name cannot be resolved to a person. | |
67 | */ | |
68 | public Person getPersonByEmployeeId(String employeeId); | |
69 | ||
70 | /** | |
71 | * Checks that the given principalId is valid. Throws a RiceRuntimeException if it is not. | |
72 | */ | |
73 | public void validatePrincipalId(String principalId); | |
74 | ||
75 | public KimPrincipal getPrincipal(UserId userId); | |
76 | ||
77 | /** | |
78 | * Returns the Group for the given groupId. Throws an exception | |
79 | * if the groupId cannot be resolved to a group. | |
80 | */ | |
81 | public Group getGroup(String groupId); | |
82 | ||
83 | public Group getGroup(GroupId groupId); | |
84 | ||
85 | public Group getGroupByName(String namespaceCode, String name); | |
86 | ||
87 | public Recipient getPrincipalRecipient(String principalId); | |
88 | ||
89 | /** | |
90 | * Returns the principal for the "system user". This is a user | |
91 | * that can be used in the cases where an actual user cannot be | |
92 | * determined. | |
93 | */ | |
94 | public KimPrincipal getSystemPrincipal(); | |
95 | ||
96 | /** | |
97 | * @deprecated | |
98 | */ | |
99 | public String getGroupId(GroupId groupId); | |
100 | ||
101 | /** | |
102 | * @deprecated | |
103 | */ | |
104 | public KimPrincipal getPrincipal(UserIdDTO userId); | |
105 | ||
106 | /** | |
107 | * @deprecated | |
108 | */ | |
109 | public Recipient getGroupRecipient(String groupId); | |
110 | ||
111 | } |