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