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.ld.businessobject.inquiry;
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.gl.Constant;
024 import org.kuali.kfs.module.ld.businessobject.July1PositionFunding;
025 import org.kuali.kfs.sys.KFSConstants;
026 import org.kuali.kfs.sys.KFSPropertyConstants;
027
028 /**
029 * This class is used to generate the URL for the user-defined attributes for the CSF tracker screen. It is entended the
030 * KualiInquirableImpl class, so it covers both the default implementation and customized implemetnation.
031 */
032 public class LaborCalculatedSalaryFoundationTrackerInquirableImpl extends AbstractLaborInquirableImpl {
033 private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(LaborCalculatedSalaryFoundationTrackerInquirableImpl.class);
034
035 /**
036 * @see org.kuali.kfs.module.ld.businessobject.inquiry.AbstractLaborInquirableImpl#buildUserDefinedAttributeKeyList()
037 */
038 protected List buildUserDefinedAttributeKeyList() {
039 List<String> keys = new ArrayList<String>();
040
041 keys.add(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR);
042 keys.add(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE);
043 keys.add(KFSPropertyConstants.ACCOUNT_NUMBER);
044 keys.add(KFSPropertyConstants.SUB_ACCOUNT_NUMBER);
045 keys.add(KFSPropertyConstants.FINANCIAL_OBJECT_CODE);
046 keys.add(KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE);
047 keys.add(KFSPropertyConstants.POSITION_NUMBER);
048 keys.add(KFSPropertyConstants.EMPLID);
049
050 return keys;
051 }
052
053 /**
054 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getUserDefinedAttributeMap()
055 */
056 protected Map getUserDefinedAttributeMap() {
057
058 Map userDefinedAttributeMap = new HashMap();
059 // userDefinedAttributeMap.put(KFSPropertyConstants.JULY1_BUDGET_AMOUNT, "");
060 return userDefinedAttributeMap;
061 }
062
063 /**
064 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getAttributeName(java.lang.String)
065 */
066 protected String getAttributeName(String attributeName) {
067 return attributeName;
068 }
069
070 /**
071 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getKeyValue(java.lang.String, java.lang.Object)
072 */
073 protected Object getKeyValue(String keyName, Object keyValue) {
074 if (isExclusiveField(keyName, keyValue)) {
075 keyValue = Constant.EMPTY_STRING;
076 }
077 return keyValue;
078 }
079
080 /**
081 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getKeyName(java.lang.String)
082 */
083 protected String getKeyName(String keyName) {
084 return keyName;
085 }
086
087 /**
088 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getLookupableImplAttributeName()
089 */
090 protected String getLookupableImplAttributeName() {
091 return "CSFTrackerBalanceLookupable";
092 }
093
094 /**
095 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getBaseUrl()
096 */
097 protected String getBaseUrl() {
098 return KFSConstants.GL_MODIFIED_INQUIRY_ACTION;
099 }
100
101 /**
102 * @see org.kuali.module.labor.web.inquirable.AbstractGeneralLedgerInquirableImpl#getInquiryBusinessObjectClass(String)
103 */
104 protected Class getInquiryBusinessObjectClass(String attributeName) {
105 return July1PositionFunding.class;
106 }
107 }