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 org.kuali.kfs.module.bc.businessobject.BudgetConstructionMonthly;
019 import org.kuali.kfs.module.bc.document.service.BenefitsCalculationService;
020 import org.kuali.kfs.module.bc.document.service.SalarySettingService;
021 import org.kuali.kfs.sys.context.SpringContext;
022
023 public class MonthlyBudgetForm extends BudgetExpansionForm {
024 private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(MonthlyBudgetForm.class);
025
026 private BudgetConstructionMonthly budgetConstructionMonthly;
027 private boolean monthlyPersisted;
028 private boolean monthlyReadOnly = true;
029 private boolean budgetableDocument = false;
030
031 private boolean hideDetails = false;
032
033 // url parameters sent from BCDoc
034 private String documentNumber;
035 private String chartOfAccountsCode;
036 private String accountNumber;
037 private String subAccountNumber;
038 private String financialObjectCode;
039 private String financialSubObjectCode;
040 private String financialBalanceTypeCode;
041 private String financialObjectTypeCode;
042
043 public MonthlyBudgetForm() {
044 super();
045 setBudgetConstructionMonthly(new BudgetConstructionMonthly());
046 }
047
048 /**
049 * Gets the budgetConstructioMonthly attribute.
050 *
051 * @return Returns the budgetConstructioMonthly.
052 */
053 public BudgetConstructionMonthly getBudgetConstructionMonthly() {
054 return budgetConstructionMonthly;
055 }
056
057 /**
058 * Sets the budgetConstructioMonthly attribute value.
059 *
060 * @param budgetConstructioMonthly The budgetConstructioMonthly to set.
061 */
062 public void setBudgetConstructionMonthly(BudgetConstructionMonthly budgetConstructionMonthly) {
063 this.budgetConstructionMonthly = budgetConstructionMonthly;
064 }
065
066 /**
067 * Gets the accountNumber attribute.
068 *
069 * @return Returns the accountNumber.
070 */
071 public String getAccountNumber() {
072 return accountNumber;
073 }
074
075 /**
076 * Sets the accountNumber attribute value.
077 *
078 * @param accountNumber The accountNumber to set.
079 */
080 public void setAccountNumber(String accountNumber) {
081 this.accountNumber = accountNumber;
082 }
083
084 /**
085 * Gets the chartOfAccountsCode attribute.
086 *
087 * @return Returns the chartOfAccountsCode.
088 */
089 public String getChartOfAccountsCode() {
090 return chartOfAccountsCode;
091 }
092
093 /**
094 * Sets the chartOfAccountsCode attribute value.
095 *
096 * @param chartOfAccountsCode The chartOfAccountsCode to set.
097 */
098 public void setChartOfAccountsCode(String chartOfAccountsCode) {
099 this.chartOfAccountsCode = chartOfAccountsCode;
100 }
101
102 /**
103 * Gets the documentNumber attribute.
104 *
105 * @return Returns the documentNumber.
106 */
107 public String getDocumentNumber() {
108 return documentNumber;
109 }
110
111 /**
112 * Sets the documentNumber attribute value.
113 *
114 * @param documentNumber The documentNumber to set.
115 */
116 public void setDocumentNumber(String documentNumber) {
117 this.documentNumber = documentNumber;
118 }
119
120 /**
121 * Gets the financialBalanceTypeCode attribute.
122 *
123 * @return Returns the financialBalanceTypeCode.
124 */
125 public String getFinancialBalanceTypeCode() {
126 return financialBalanceTypeCode;
127 }
128
129 /**
130 * Sets the financialBalanceTypeCode attribute value.
131 *
132 * @param financialBalanceTypeCode The financialBalanceTypeCode to set.
133 */
134 public void setFinancialBalanceTypeCode(String financialBalanceTypeCode) {
135 this.financialBalanceTypeCode = financialBalanceTypeCode;
136 }
137
138 /**
139 * Gets the financialObjectCode attribute.
140 *
141 * @return Returns the financialObjectCode.
142 */
143 public String getFinancialObjectCode() {
144 return financialObjectCode;
145 }
146
147 /**
148 * Sets the financialObjectCode attribute value.
149 *
150 * @param financialObjectCode The financialObjectCode to set.
151 */
152 public void setFinancialObjectCode(String financialObjectCode) {
153 this.financialObjectCode = financialObjectCode;
154 }
155
156 /**
157 * Gets the financialObjectTypeCode attribute.
158 *
159 * @return Returns the financialObjectTypeCode.
160 */
161 public String getFinancialObjectTypeCode() {
162 return financialObjectTypeCode;
163 }
164
165 /**
166 * Sets the financialObjectTypeCode attribute value.
167 *
168 * @param financialObjectTypeCode The financialObjectTypeCode to set.
169 */
170 public void setFinancialObjectTypeCode(String financialObjectTypeCode) {
171 this.financialObjectTypeCode = financialObjectTypeCode;
172 }
173
174 /**
175 * Gets the financialSubObjectCode attribute.
176 *
177 * @return Returns the financialSubObjectCode.
178 */
179 public String getFinancialSubObjectCode() {
180 return financialSubObjectCode;
181 }
182
183 /**
184 * Sets the financialSubObjectCode attribute value.
185 *
186 * @param financialSubObjectCode The financialSubObjectCode to set.
187 */
188 public void setFinancialSubObjectCode(String financialSubObjectCode) {
189 this.financialSubObjectCode = financialSubObjectCode;
190 }
191
192 /**
193 * Gets the subAccountNumber attribute.
194 *
195 * @return Returns the subAccountNumber.
196 */
197 public String getSubAccountNumber() {
198 return subAccountNumber;
199 }
200
201 /**
202 * Sets the subAccountNumber attribute value.
203 *
204 * @param subAccountNumber The subAccountNumber to set.
205 */
206 public void setSubAccountNumber(String subAccountNumber) {
207 this.subAccountNumber = subAccountNumber;
208 }
209
210 /**
211 * Gets the monthlyPersisted attribute.
212 *
213 * @return Returns the monthlyPersisted.
214 */
215 public boolean isMonthlyPersisted() {
216 return monthlyPersisted;
217 }
218
219 /**
220 * Sets the monthlyPersisted attribute value.
221 *
222 * @param monthlyPersisted The monthlyPersisted to set.
223 */
224 public void setMonthlyPersisted(boolean monthlyPersisted) {
225 this.monthlyPersisted = monthlyPersisted;
226 }
227
228 /**
229 * Gets the readOnly attribute.
230 *
231 * @return Returns the readOnly.
232 */
233 public boolean isMonthlyReadOnly() {
234 return monthlyReadOnly;
235 }
236
237 /**
238 * Sets the readOnly attribute value.
239 *
240 * @param readOnly The readOnly to set.
241 */
242 public void setMonthlyReadOnly(boolean readOnly) {
243 this.monthlyReadOnly = readOnly;
244 }
245
246 /**
247 * Gets the budgetableDocument attribute.
248 *
249 * @return Returns the budgetableDocument.
250 */
251 public boolean isBudgetableDocument() {
252 return budgetableDocument;
253 }
254
255 /**
256 * Sets the budgetableDocument attribute value.
257 *
258 * @param budgetableDocument The budgetableDocument to set.
259 */
260 public void setBudgetableDocument(boolean budgetableDocument) {
261 this.budgetableDocument = budgetableDocument;
262 }
263
264 /**
265 * Gets the benefitsCalculationDisabled attribute.
266 *
267 * @return Returns the benefitsCalculationDisabled.
268 */
269 public boolean isBenefitsCalculationDisabled() {
270 return SpringContext.getBean(BenefitsCalculationService.class).isBenefitsCalculationDisabled();
271 }
272
273 /**
274 * Gets the salarySettingDisabled attribute.
275 *
276 * @return Returns the salarySettingDisabled.
277 */
278 public boolean isSalarySettingDisabled() {
279 return SpringContext.getBean(SalarySettingService.class).isSalarySettingDisabled();
280 }
281
282 /**
283 * Gets the hideDetails attribute.
284 *
285 * @return Returns the hideDetails.
286 */
287 public boolean isHideDetails() {
288 return hideDetails;
289 }
290
291 /**
292 * Sets the hideDetails attribute value.
293 *
294 * @param hideDetails The hideDetails to set.
295 */
296 public void setHideDetails(boolean hideDetails) {
297 this.hideDetails = hideDetails;
298 }
299
300 }