Search in sources :

Example 1 with LaborCalculatedSalaryFoundationTrackerInquirableImpl

use of com.rsmart.kuali.kfs.module.ld.businessobject.inquiry.LaborCalculatedSalaryFoundationTrackerInquirableImpl in project cu-kfs by CU-CommunityApps.

the class LaborCalculatedSalaryFoundationTrackerLookupableHelperServiceImpl method getInquiryUrl.

/**
 * @see org.kuali.kfs.kns.lookup.AbstractLookupableHelperServiceImpl#getInquiryUrl(org.kuali.kfs.kns.bo.BusinessObject,
 *      java.lang.String)
 */
@Override
public HtmlData getInquiryUrl(BusinessObject bo, String propertyName) {
    if (KFSPropertyConstants.POSITION_NUMBER.equals(propertyName)) {
        LaborCalculatedSalaryFoundationTracker CSFTracker = (LaborCalculatedSalaryFoundationTracker) bo;
        AbstractPositionDataDetailsInquirableImpl positionDataDetailsInquirable = new PositionDataDetailsInquirableImpl();
        // KUALI-1321  Gets the Person object via the employee ID and populates the name property.
        Person person = SpringContext.getBean(PersonService.class).getPersonByEmployeeId(CSFTracker.getEmplid());
        if (person != null) {
        // CSFTracker.setName(person.getLastName() + ", " + person.getFirstName());
        }
        Map<String, String> fieldValues = new HashMap<String, String>();
        fieldValues.put(propertyName, CSFTracker.getPositionNumber());
        BusinessObject positionData = positionDataDetailsInquirable.getBusinessObject(fieldValues);
        return positionData == null ? new AnchorHtmlData(KFSConstants.EMPTY_STRING, KFSConstants.EMPTY_STRING) : positionDataDetailsInquirable.getInquiryUrl(positionData, propertyName);
    }
    return (new LaborCalculatedSalaryFoundationTrackerInquirableImpl()).getInquiryUrl(bo, propertyName);
}
Also used : AbstractPositionDataDetailsInquirableImpl(org.kuali.kfs.integration.ld.businessobject.inquiry.AbstractPositionDataDetailsInquirableImpl) HashMap(java.util.HashMap) PersonService(org.kuali.rice.kim.api.identity.PersonService) LaborCalculatedSalaryFoundationTracker(org.kuali.kfs.module.ld.businessobject.LaborCalculatedSalaryFoundationTracker) Person(org.kuali.rice.kim.api.identity.Person) BusinessObject(org.kuali.rice.krad.bo.BusinessObject) AbstractPositionDataDetailsInquirableImpl(org.kuali.kfs.integration.ld.businessobject.inquiry.AbstractPositionDataDetailsInquirableImpl) PositionDataDetailsInquirableImpl(org.kuali.kfs.module.ld.businessobject.inquiry.PositionDataDetailsInquirableImpl) AnchorHtmlData(org.kuali.kfs.kns.lookup.HtmlData.AnchorHtmlData) LaborCalculatedSalaryFoundationTrackerInquirableImpl(com.rsmart.kuali.kfs.module.ld.businessobject.inquiry.LaborCalculatedSalaryFoundationTrackerInquirableImpl)

Aggregations

LaborCalculatedSalaryFoundationTrackerInquirableImpl (com.rsmart.kuali.kfs.module.ld.businessobject.inquiry.LaborCalculatedSalaryFoundationTrackerInquirableImpl)1 HashMap (java.util.HashMap)1 AbstractPositionDataDetailsInquirableImpl (org.kuali.kfs.integration.ld.businessobject.inquiry.AbstractPositionDataDetailsInquirableImpl)1 AnchorHtmlData (org.kuali.kfs.kns.lookup.HtmlData.AnchorHtmlData)1 LaborCalculatedSalaryFoundationTracker (org.kuali.kfs.module.ld.businessobject.LaborCalculatedSalaryFoundationTracker)1 PositionDataDetailsInquirableImpl (org.kuali.kfs.module.ld.businessobject.inquiry.PositionDataDetailsInquirableImpl)1 Person (org.kuali.rice.kim.api.identity.Person)1 PersonService (org.kuali.rice.kim.api.identity.PersonService)1 BusinessObject (org.kuali.rice.krad.bo.BusinessObject)1