View Javadoc

1   /**
2    * Copyright 2005-2013 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.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.impl.role.RoleBo;
23  import org.kuali.rice.kns.inquiry.KualiInquirableImpl;
24  import org.kuali.rice.krad.service.KRADServiceLocatorWeb;
25  
26  /**
27   * This is a description of what this class does - bhargavp don't forget to fill this in. 
28   * 
29   * @author Kuali Rice Team (rice.collab@kuali.org)
30   *
31   */
32  public class RoleMemberInquirableImpl extends KualiInquirableImpl {
33  
34  	protected final String ROLE_ID = "id";
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 KRADServiceLocatorWeb.getDataDictionaryService().getAttributeLabel(KimAttributes.class, attributeName);
46      }
47  
48      protected RoleBo getRoleImpl(String roleId){
49  		Map<String, String> criteria = new HashMap<String, String>();
50  		criteria.put("id", roleId);
51  		return getBusinessObjectService().findByPrimaryKey(RoleBo.class, criteria);
52      }
53  
54  }