1 /*
2 * The Kuali Financial System, a comprehensive financial management system for higher education.
3 *
4 * Copyright 2005-2014 The Kuali Foundation
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 package org.kuali.kfs.module.ld.businessobject.inquiry;
20
21 import java.util.ArrayList;
22 import java.util.HashMap;
23 import java.util.List;
24 import java.util.Map;
25
26 import org.kuali.kfs.gl.Constant;
27 import org.kuali.kfs.module.ld.businessobject.July1PositionFunding;
28 import org.kuali.kfs.sys.KFSConstants;
29 import org.kuali.kfs.sys.KFSPropertyConstants;
30
31 /**
32 * This class is used to generate the URL for the user-defined attributes for the CSF tracker screen. It is entended the
33 * KualiInquirableImpl class, so it covers both the default implementation and customized implemetnation.
34 */
35 public class LaborCalculatedSalaryFoundationTrackerInquirableImpl extends AbstractLaborInquirableImpl {
36 private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(LaborCalculatedSalaryFoundationTrackerInquirableImpl.class);
37
38 /**
39 * @see org.kuali.kfs.module.ld.businessobject.inquiry.AbstractLaborInquirableImpl#buildUserDefinedAttributeKeyList()
40 */
41 protected List buildUserDefinedAttributeKeyList() {
42 List<String> keys = new ArrayList<String>();
43
44 keys.add(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR);
45 keys.add(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE);
46 keys.add(KFSPropertyConstants.ACCOUNT_NUMBER);
47 keys.add(KFSPropertyConstants.SUB_ACCOUNT_NUMBER);
48 keys.add(KFSPropertyConstants.FINANCIAL_OBJECT_CODE);
49 keys.add(KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE);
50 keys.add(KFSPropertyConstants.POSITION_NUMBER);
51 keys.add(KFSPropertyConstants.EMPLID);
52
53 return keys;
54 }
55
56 /**
57 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getUserDefinedAttributeMap()
58 */
59 protected Map getUserDefinedAttributeMap() {
60
61 Map userDefinedAttributeMap = new HashMap();
62 // userDefinedAttributeMap.put(KFSPropertyConstants.JULY1_BUDGET_AMOUNT, "");
63 return userDefinedAttributeMap;
64 }
65
66 /**
67 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getAttributeName(java.lang.String)
68 */
69 protected String getAttributeName(String attributeName) {
70 return attributeName;
71 }
72
73 /**
74 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getKeyValue(java.lang.String, java.lang.Object)
75 */
76 protected Object getKeyValue(String keyName, Object keyValue) {
77 if (isExclusiveField(keyName, keyValue)) {
78 keyValue = Constant.EMPTY_STRING;
79 }
80 return keyValue;
81 }
82
83 /**
84 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getKeyName(java.lang.String)
85 */
86 protected String getKeyName(String keyName) {
87 return keyName;
88 }
89
90 /**
91 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getLookupableImplAttributeName()
92 */
93 protected String getLookupableImplAttributeName() {
94 return "CSFTrackerBalanceLookupable";
95 }
96
97 /**
98 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getBaseUrl()
99 */
100 protected String getBaseUrl() {
101 return KFSConstants.GL_MODIFIED_INQUIRY_ACTION;
102 }
103
104 /**
105 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getInquiryBusinessObjectClass(String)
106 */
107 protected Class getInquiryBusinessObjectClass(String attributeName) {
108 return July1PositionFunding.class;
109 }
110 }