1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kim.inquiry;
17
18 import java.util.HashMap;
19 import java.util.Map;
20
21 import org.kuali.rice.kim.bo.impl.KimAttributes;
22 import org.kuali.rice.kim.bo.impl.RoleImpl;
23 import org.kuali.rice.kns.inquiry.KualiInquirableImpl;
24 import org.kuali.rice.kns.service.KNSServiceLocator;
25
26
27
28
29
30
31
32 public class RoleMemberInquirableImpl extends KualiInquirableImpl {
33
34 protected final String ROLE_ID = "roleId";
35 protected final String NAME = "name";
36 protected final String NAME_TO_DISPLAY = "nameToDisplay";
37 protected final String TEMPLATE_NAME = "template.name";
38 protected final String NAMESPACE_CODE = "namespaceCode";
39 protected final String TEMPLATE_NAMESPACE_CODE = "template.namespaceCode";
40 protected final String DETAIL_OBJECTS = "detailObjects";
41 protected final String ASSIGNED_TO_ROLES = "assignedToRolesToDisplay";
42 protected final String ATTRIBUTE_DATA_ID = "attributeDataId";
43
44 protected String getKimAttributeLabelFromDD(String attributeName){
45 return KNSServiceLocator.getDataDictionaryService().getAttributeLabel(KimAttributes.class, attributeName);
46 }
47
48 protected RoleImpl getRoleImpl(String roleId){
49 Map<String, String> criteria = new HashMap<String, String>();
50 criteria.put("roleId", roleId);
51 return (RoleImpl)getBusinessObjectService().findByPrimaryKey(RoleImpl.class, criteria);
52 }
53
54 }