| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| PersonInquirableImpl |
|
| 1.5;1.5 |
| 1 | /** | |
| 2 | * Copyright 2005-2011 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.Map; | |
| 19 | ||
| 20 | import org.kuali.rice.kim.api.identity.PersonService; | |
| 21 | import org.kuali.rice.kim.api.services.KimApiServiceLocator; | |
| 22 | import org.kuali.rice.kns.inquiry.KualiInquirableImpl; | |
| 23 | import org.kuali.rice.krad.bo.BusinessObject; | |
| 24 | ||
| 25 | /** | |
| 26 | * This is a description of what this class does - kellerj don't forget to fill this in. | |
| 27 | * | |
| 28 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 29 | * | |
| 30 | */ | |
| 31 | 0 | public class PersonInquirableImpl extends KualiInquirableImpl { |
| 32 | ||
| 33 | PersonService personService; | |
| 34 | ||
| 35 | /** | |
| 36 | * This overridden method ... | |
| 37 | * | |
| 38 | * @see org.kuali.rice.krad.inquiry.KualiInquirableImpl#getBusinessObject(java.util.Map) | |
| 39 | */ | |
| 40 | @SuppressWarnings("unchecked") | |
| 41 | @Override | |
| 42 | public BusinessObject getBusinessObject(Map fieldValues) { | |
| 43 | 0 | return getPersonService().getPerson( fieldValues.get( "principalId" ).toString() ); |
| 44 | } | |
| 45 | ||
| 46 | public PersonService getPersonService() { | |
| 47 | 0 | if ( personService == null ) { |
| 48 | 0 | personService = KimApiServiceLocator.getPersonService(); |
| 49 | } | |
| 50 | 0 | return personService; |
| 51 | } | |
| 52 | } |