001 /* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.kfs.module.endow.businessobject.lookup; 017 018 import java.util.ArrayList; 019 import java.util.HashMap; 020 import java.util.List; 021 import java.util.Map; 022 023 import org.kuali.kfs.module.endow.EndowConstants; 024 import org.kuali.kfs.module.endow.EndowPropertyConstants; 025 import org.kuali.kfs.module.endow.businessobject.CurrentTaxLotBalance; 026 import org.kuali.kfs.module.endow.businessobject.HoldingTaxLot; 027 import org.kuali.kfs.sys.context.SpringContext; 028 import org.kuali.rice.kns.bo.BusinessObject; 029 import org.kuali.rice.kns.lookup.HtmlData; 030 import org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl; 031 import org.kuali.rice.kns.service.BusinessObjectService; 032 import org.kuali.rice.kns.util.KNSConstants; 033 import org.kuali.rice.kns.util.ObjectUtils; 034 035 public class HoldingTaxLotRebalanceLookupableHelperService extends KualiLookupableHelperServiceImpl { 036 037 /** 038 * @see org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl#getSearchResults(java.util.Map) 039 */ 040 @Override 041 public List<? extends BusinessObject> getSearchResults(Map<String, String> fieldValues) 042 { 043 return super.getSearchResults(fieldValues); 044 } 045 046 /** 047 * @see org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl#getCustomActionUrls(org.kuali.rice.kns.bo.BusinessObject, 048 * java.util.List) 049 */ 050 @SuppressWarnings("unchecked") 051 @Override 052 public List<HtmlData> getCustomActionUrls(BusinessObject businessObject, List pkNames) 053 { 054 // Change "Actions" column to show "Rebalance" as a link to the maintenance document. 055 List<HtmlData> anchorHtmlDataList = super.getCustomActionUrls(businessObject, pkNames); 056 for (HtmlData htmlData : anchorHtmlDataList) { 057 htmlData.setDisplayText(EndowConstants.HoldingTaxLotRebalanceCodes.RESULTS_ACTIONS_LINK); 058 } 059 060 return anchorHtmlDataList; 061 } 062 063 /** 064 * @see org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl#allowsMaintenanceNewOrCopyAction() 065 */ 066 @Override 067 public boolean allowsMaintenanceNewOrCopyAction() { 068 069 return false; 070 } 071 072 }