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.bc.document.web.struts; 017 018 import java.util.HashMap; 019 import java.util.List; 020 import java.util.Map; 021 022 import org.kuali.kfs.module.bc.BCConstants; 023 import org.kuali.kfs.module.bc.businessobject.BudgetConstructionIntendedIncumbent; 024 import org.kuali.kfs.module.bc.businessobject.PendingBudgetConstructionAppointmentFunding; 025 import org.kuali.kfs.sys.KFSPropertyConstants; 026 027 028 public class IncumbentSalarySettingForm extends DetailSalarySettingForm { 029 private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(IncumbentSalarySettingForm.class); 030 031 private boolean refreshIncumbentBeforeSalarySetting; 032 033 private BudgetConstructionIntendedIncumbent budgetConstructionIntendedIncumbent; 034 035 /** 036 * Constructs a IncumbentSalarySettingForm.java. 037 */ 038 public IncumbentSalarySettingForm() { 039 super(); 040 041 setBudgetConstructionIntendedIncumbent(new BudgetConstructionIntendedIncumbent()); 042 } 043 044 /** 045 * @see org.kuali.kfs.module.bc.document.web.struts.DetailSalarySettingForm#createNewAppointmentFundingLine() 046 */ 047 @Override 048 public PendingBudgetConstructionAppointmentFunding createNewAppointmentFundingLine() { 049 PendingBudgetConstructionAppointmentFunding appointmentFunding = super.createNewAppointmentFundingLine(); 050 051 appointmentFunding.setEmplid(this.getBudgetConstructionIntendedIncumbent().getEmplid()); 052 053 return appointmentFunding; 054 } 055 056 /** 057 * @see org.kuali.kfs.module.bc.document.web.struts.SalarySettingBaseForm#getKeyMapOfSalarySettingItem() 058 */ 059 @Override 060 public Map<String, Object> getKeyMapOfSalarySettingItem() { 061 Map<String, Object> keyMap = new HashMap<String, Object>(); 062 keyMap.put(KFSPropertyConstants.EMPLID, this.getEmplid()); 063 064 return keyMap; 065 } 066 067 /** 068 * @see org.kuali.kfs.module.bc.document.web.struts.DetailSalarySettingForm#getRefreshCallerName() 069 */ 070 @Override 071 public String getRefreshCallerName() { 072 return BCConstants.INCUMBENT_SALARY_SETTING_REFRESH_CALLER; 073 } 074 075 /** 076 * @see org.kuali.kfs.module.bc.document.web.struts.SalarySettingForm#getAppointmentFundings() 077 */ 078 @Override 079 public List<PendingBudgetConstructionAppointmentFunding> getAppointmentFundings() { 080 return this.getBudgetConstructionIntendedIncumbent().getPendingBudgetConstructionAppointmentFunding(); 081 } 082 083 /** 084 * Gets the budgetConstructionIntendedIncumbent attribute. 085 * 086 * @return Returns the budgetConstructionIntendedIncumbent. 087 */ 088 public BudgetConstructionIntendedIncumbent getBudgetConstructionIntendedIncumbent() { 089 return budgetConstructionIntendedIncumbent; 090 } 091 092 /** 093 * Sets the budgetConstructionIntendedIncumbent attribute value. 094 * 095 * @param budgetConstructionIntendedIncumbent The budgetConstructionIntendedIncumbent to set. 096 */ 097 public void setBudgetConstructionIntendedIncumbent(BudgetConstructionIntendedIncumbent budgetConstructionIntendedIncumbent) { 098 this.budgetConstructionIntendedIncumbent = budgetConstructionIntendedIncumbent; 099 } 100 101 /** 102 * Gets the refreshIncumbentBeforeSalarySetting attribute. 103 * 104 * @return Returns the refreshIncumbentBeforeSalarySetting. 105 */ 106 public boolean isRefreshIncumbentBeforeSalarySetting() { 107 return refreshIncumbentBeforeSalarySetting; 108 } 109 110 /** 111 * Sets the refreshIncumbentBeforeSalarySetting attribute value. 112 * 113 * @param refreshIncumbentBeforeSalarySetting The refreshIncumbentBeforeSalarySetting to set. 114 */ 115 public void setRefreshIncumbentBeforeSalarySetting(boolean refreshIncumbentBeforeSalarySetting) { 116 this.refreshIncumbentBeforeSalarySetting = refreshIncumbentBeforeSalarySetting; 117 } 118 119 /** 120 * Gets the documentTitle 121 * @return 122 */ 123 public String getDocumentTitle() { 124 return BCConstants.INCUMBENT_SALARY_SETTING_TITLE; 125 } 126 127 }