001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.module.labor.web.inquirable;
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.KFSConstants;
024: import org.kuali.kfs.KFSPropertyConstants;
025: import org.kuali.module.gl.web.Constant;
026: import org.kuali.module.labor.bo.July1PositionFunding;
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
033: extends AbstractLaborInquirableImpl {
034: private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger
035: .getLogger(LaborCalculatedSalaryFoundationTrackerInquirableImpl.class);
036:
037: /**
038: * @see org.kuali.module.labor.web.inquirable.AbstractLaborInquirableImpl#buildUserDefinedAttributeKeyList()
039: */
040: protected List buildUserDefinedAttributeKeyList() {
041: List<String> keys = new ArrayList<String>();
042:
043: keys.add(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR);
044: keys.add(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE);
045: keys.add(KFSPropertyConstants.ACCOUNT_NUMBER);
046: keys.add(KFSPropertyConstants.SUB_ACCOUNT_NUMBER);
047: keys.add(KFSPropertyConstants.FINANCIAL_OBJECT_CODE);
048: keys.add(KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE);
049: keys.add(KFSPropertyConstants.POSITION_NUMBER);
050: keys.add(KFSPropertyConstants.EMPLID);
051:
052: return keys;
053: }
054:
055: /**
056: * @see org.kuali.module.labor.web.inquirable.AbstractGLInquirableImpl#getUserDefinedAttributeMap()
057: */
058: protected Map getUserDefinedAttributeMap() {
059:
060: Map userDefinedAttributeMap = new HashMap();
061: // userDefinedAttributeMap.put(KFSPropertyConstants.JULY1_BUDGET_AMOUNT, "");
062: return userDefinedAttributeMap;
063: }
064:
065: /**
066: * @see org.kuali.module.labor.web.inquirable.AbstractGLInquirableImpl#getAttributeName(java.lang.String)
067: */
068: protected String getAttributeName(String attributeName) {
069: return attributeName;
070: }
071:
072: /**
073: * @see org.kuali.module.labor.web.inquirable.AbstractGLInquirableImpl#getKeyValue(java.lang.String, java.lang.Object)
074: */
075: protected Object getKeyValue(String keyName, Object keyValue) {
076: if (isExclusiveField(keyName, keyValue)) {
077: keyValue = Constant.EMPTY_STRING;
078: }
079: return keyValue;
080: }
081:
082: /**
083: * @see org.kuali.module.labor.web.inquirable.AbstractGLInquirableImpl#getKeyName(java.lang.String)
084: */
085: protected String getKeyName(String keyName) {
086: return keyName;
087: }
088:
089: /**
090: * @see org.kuali.module.labor.web.inquirable.AbstractGLInquirableImpl#getLookupableImplAttributeName()
091: */
092: protected String getLookupableImplAttributeName() {
093: return "CSFTrackerBalanceLookupable";
094: }
095:
096: /**
097: * @see org.kuali.module.labor.web.inquirable.AbstractGLInquirableImpl#getBaseUrl()
098: */
099: protected String getBaseUrl() {
100: return KFSConstants.GL_MODIFIED_INQUIRY_ACTION;
101: }
102:
103: /**
104: * @see org.kuali.module.labor.web.inquirable.AbstractGLInquirableImpl#getInquiryBusinessObjectClass(String)
105: */
106: protected Class getInquiryBusinessObjectClass(String attributeName) {
107: return July1PositionFunding.class;
108: }
109: }
|