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.gl.businessobject.lookup.BusinessObjectFieldConverter;
025    import org.kuali.kfs.module.ld.businessobject.LedgerBalance;
026    import org.kuali.kfs.sys.KFSConstants;
027    
028    /**
029     * This class is used to generate the URL for the user-defined attributes for the July1 Position Funds screen. It is entended the
030     * KualiInquirableImpl class, so it covers both the default implementation and customized implemetnation.
031     */
032    public class July1PositionFundingInquirableImpl extends AbstractLaborInquirableImpl {
033        private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(July1PositionFundingInquirableImpl.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            return keys;
041        }
042    
043        /**
044         * @see org.kuali.kfs.gl.businessobject.inquiry.AbstractGeneralLedgerInquirableImpl#getUserDefinedAttributeMap()
045         */
046        protected Map getUserDefinedAttributeMap() {
047    
048            Map userDefinedAttributeMap = new HashMap();
049            return userDefinedAttributeMap;
050        }
051    
052        /**
053         * @see org.kuali.kfs.gl.businessobject.inquiry.AbstractGeneralLedgerInquirableImpl#getAttributeName(java.lang.String)
054         */
055        protected String getAttributeName(String attributeName) {
056            return attributeName;
057        }
058    
059        /**
060         * @see org.kuali.kfs.gl.businessobject.inquiry.AbstractGeneralLedgerInquirableImpl#getKeyValue(java.lang.String, java.lang.Object)
061         */
062        protected Object getKeyValue(String keyName, Object keyValue) {
063            if (isExclusiveField(keyName, keyValue)) {
064                keyValue = Constant.EMPTY_STRING;
065            }
066            return keyValue;
067        }
068    
069        /**
070         * @see org.kuali.kfs.gl.businessobject.inquiry.AbstractGeneralLedgerInquirableImpl#getKeyName(java.lang.String)
071         */
072        protected String getKeyName(String keyName) {
073            keyName = BusinessObjectFieldConverter.convertToTransactionPropertyName(keyName);
074            return keyName;
075        }
076    
077        /**
078         * @see org.kuali.kfs.gl.businessobject.inquiry.AbstractGeneralLedgerInquirableImpl#getLookupableImplAttributeName()
079         */
080        protected String getLookupableImplAttributeName() {
081            return "july1PositionFundingLookupable";
082        }
083    
084        /**
085         * @see org.kuali.kfs.gl.businessobject.inquiry.AbstractGeneralLedgerInquirableImpl#getBaseUrl()
086         */
087        protected String getBaseUrl() {
088            return KFSConstants.GL_MODIFIED_INQUIRY_ACTION;
089        }
090    
091        /**
092         * @see org.kuali.kfs.gl.businessobject.inquiry.AbstractGeneralLedgerInquirableImpl#getInquiryBusinessObjectClass(String)
093         */
094        protected Class getInquiryBusinessObjectClass(String attributeName) {
095            return LedgerBalance.class;
096        }
097    }