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.GeneralLedgerConstants;
024 import org.kuali.kfs.module.ld.businessobject.PositionFunding;
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 Position Inquiry screen. It is entended the
030 * KualiInquirableImpl class, so it covers both the default implementation and customized implemetnation.
031 */
032 public class PositionFundingInquirableImpl extends AbstractLaborInquirableImpl {
033
034 /**
035 * @see org.kuali.kfs.module.ld.businessobject.inquiry.AbstractLaborInquirableImpl#buildUserDefinedAttributeKeyList()
036 */
037 protected List buildUserDefinedAttributeKeyList() {
038 List keys = new ArrayList();
039 keys.add(KFSPropertyConstants.POSITION_NUMBER);
040 return keys;
041 }
042
043 /**
044 * @see org.kuali.kfs.module.ld.businessobject.inquiry.AbstractLaborInquirableImpl#getAttributeName(java.lang.String)
045 */
046 protected String getAttributeName(String attributeName) {
047 return attributeName;
048 }
049
050 /**
051 * @see org.kuali.kfs.module.ld.businessobject.inquiry.AbstractLaborInquirableImpl#getBaseUrl()
052 */
053 protected String getBaseUrl() {
054 return KFSConstants.GL_MODIFIED_INQUIRY_ACTION;
055 }
056
057 /**
058 * @see org.kuali.kfs.module.ld.businessobject.inquiry.AbstractLaborInquirableImpl#getInquiryBusinessObjectClass(java.lang.String)
059 */
060 protected Class getInquiryBusinessObjectClass(String attributeName) {
061 return PositionFunding.class;
062 }
063
064 /**
065 * @see org.kuali.kfs.module.ld.businessobject.inquiry.AbstractLaborInquirableImpl#getKeyName(java.lang.String)
066 */
067 protected String getKeyName(String keyName) {
068 return keyName;
069 }
070
071 /**
072 * @see org.kuali.kfs.module.ld.businessobject.inquiry.AbstractLaborInquirableImpl#getKeyValue(java.lang.String, java.lang.Object)
073 */
074 protected Object getKeyValue(String keyName, Object keyValue) {
075 return keyValue;
076 }
077
078 /**
079 * @see org.kuali.kfs.module.ld.businessobject.inquiry.AbstractLaborInquirableImpl#getLookupableImplAttributeName()
080 */
081 protected String getLookupableImplAttributeName() {
082 return null;
083 }
084
085 /**
086 * @see org.kuali.kfs.module.ld.businessobject.inquiry.AbstractLaborInquirableImpl#getUserDefinedAttributeMap()
087 */
088 protected Map getUserDefinedAttributeMap() {
089 Map userDefinedAttributeMap = new HashMap();
090 userDefinedAttributeMap.put(GeneralLedgerConstants.DummyBusinessObject.LINK_BUTTON_OPTION, "");
091
092 return userDefinedAttributeMap;
093 }
094 }