1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.web.struts.action; |
17 | |
|
18 | |
import javax.servlet.http.HttpServletRequest; |
19 | |
|
20 | |
import org.apache.commons.lang.StringUtils; |
21 | |
import org.kuali.rice.kim.bo.group.dto.GroupInfo; |
22 | |
import org.kuali.rice.kim.service.KIMServiceLocator; |
23 | |
import org.kuali.rice.kim.util.KimConstants; |
24 | |
import org.kuali.rice.kim.web.struts.form.IdentityManagementDocumentFormBase; |
25 | |
import org.kuali.rice.kim.web.struts.form.IdentityManagementGroupDocumentForm; |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | 0 | public class IdentityManagementGroupInquiry extends IdentityManagementBaseInquiryAction { |
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
@Override |
41 | |
protected void loadKimObject(HttpServletRequest request, IdentityManagementDocumentFormBase form) { |
42 | 0 | IdentityManagementGroupDocumentForm groupDocumentForm = (IdentityManagementGroupDocumentForm) form; |
43 | 0 | String groupId = request.getParameter(KimConstants.PrimaryKeyConstants.GROUP_ID); |
44 | |
|
45 | 0 | GroupInfo group = null; |
46 | 0 | if (StringUtils.isNotEmpty(groupId)) { |
47 | 0 | group = KIMServiceLocator.getGroupService().getGroupInfo(groupId); |
48 | |
} else { |
49 | 0 | String namespaceCode = request.getParameter(KimConstants.UniqueKeyConstants.NAMESPACE_CODE); |
50 | 0 | String groupName = request.getParameter(KimConstants.UniqueKeyConstants.GROUP_NAME); |
51 | |
|
52 | 0 | if (!StringUtils.isBlank(namespaceCode) && !StringUtils.isBlank(groupName)) { |
53 | 0 | group = KIMServiceLocator.getGroupService().getGroupInfoByName(namespaceCode, groupName); |
54 | |
} |
55 | |
} |
56 | 0 | getUiDocumentService().loadGroupDoc(groupDocumentForm.getGroupDocument(), group); |
57 | |
|
58 | |
|
59 | 0 | } |
60 | |
|
61 | |
} |