1 /*
2 * The Kuali Financial System, a comprehensive financial management system for higher education.
3 *
4 * Copyright 2005-2014 The Kuali Foundation
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 package org.kuali.kfs.module.tem.document.web.bean;
20
21 import java.util.List;
22 import java.util.Map;
23
24 import org.kuali.kfs.module.tem.businessobject.AccountingDistribution;
25 import org.kuali.kfs.module.tem.businessobject.AccountingDocumentRelationship;
26 import org.kuali.kfs.module.tem.businessobject.ActualExpense;
27 import org.kuali.kfs.module.tem.businessobject.ImportedExpense;
28 import org.kuali.kfs.module.tem.businessobject.TemDistributionAccountingLine;
29 import org.kuali.kfs.module.tem.document.TravelDocument;
30 import org.kuali.rice.core.api.util.type.KualiDecimal;
31 import org.kuali.rice.kns.web.ui.ExtraButton;
32 import org.kuali.rice.krad.bo.Note;
33 import org.kuali.rice.krad.document.Document;
34
35 /**
36 * Interface intended to decouple the MVC framework from the classes used therein and Spring. This allows button actions to interact
37 * with the Spring IOC and the SOA without coupling with the MVC framework like Struts. Ooops...I said it.
38 */
39 public interface TravelMvcWrapperBean {
40
41 Integer getTravelerId();
42
43 TravelDocument getTravelDocument();
44
45 void setTravelerId(Integer travelerId);
46
47 Integer getTempTravelerId();
48
49 void setTempTravelerId(Integer tempTravelerId);
50
51 /**
52 * Gets the empPrincipalId attribute.
53 *
54 * @return Returns the empPrincipalId.
55 */
56 String getEmpPrincipalId();
57
58 /**
59 * Sets the empPrincipalId attribute value.
60 *
61 * @param empPrincipalId The empPrincipalId to set.
62 */
63 void setEmpPrincipalId(String empPrincipalId);
64
65 /**
66 * Gets the tempEmpPrincipalId attribute.
67 *
68 * @return Returns the tempEmpPrincipalId.
69 */
70 String getTempEmpPrincipalId();
71
72 /**
73 * Sets the tempEmpPrincipalId attribute value.
74 *
75 * @param tempEmpPrincipalId The tempEmpPrincipalId to set.
76 */
77 void setTempEmpPrincipalId(String tempEmpPrincipalId);
78
79 Map<String, String> getModesOfTransportation();
80
81 /**
82 * Gets the showLodging attribute.
83 *
84 * @return Returns the showLodging.
85 */
86 boolean isShowLodging();
87
88 /**
89 * Sets the showLodging attribute value.
90 *
91 * @param showLodging The showLodging to set.
92 */
93 void setShowLodging(boolean showLodging);
94
95 /**
96 * Gets the showMileage attribute.
97 *
98 * @return Returns the showMileage.
99 */
100 boolean isShowMileage();
101
102 /**
103 * Sets the showMileage attribute value.
104 *
105 * @param showMileage The showMileage to set.
106 */
107 void setShowMileage(boolean showMileage);
108
109 /**
110 * Gets the showPerDiem attribute.
111 *
112 * @return Returns the showPerDiem.
113 */
114 boolean isShowPerDiem();
115
116 /**
117 * Gets the canReturn attribute value.
118 *
119 * @return canReturn The canReturn to set.
120 */
121 boolean canReturn();
122
123 /**
124 * Sets the canReturn attribute value.
125 *
126 * @param canReturn The canReturn to set.
127 */
128 void setCanReturn(final boolean canReturn);
129
130 /**
131 * Sets the showPerDiem attribute value.
132 *
133 * @param showPerDiem The showPerDiem to set.
134 */
135 void setShowPerDiem(boolean showPerDiem);
136
137 boolean isShowAllPerDiemCategories();
138
139 /**
140 * This method takes a string parameter from the db and converts it to an int suitable for using in our calculations
141 *
142 * @param perDiemPercentage
143 */
144 void setPerDiemPercentage(String perDiemPercentage);
145
146 /**
147 * Gets the perDiemPercentage attribute.
148 *
149 * @return Returns the perDiemPercentage.
150 */
151 int getPerDiemPercentage();
152
153 /**
154 * Sets the perDiemPercentage attribute value.
155 *
156 * @param perDiemPercentage The perDiemPercentage to set.
157 */
158 void setPerDiemPercentage(int perDiemPercentage);
159
160 /**
161 * Retrieves a {@link Collection} of related documents from the MVC. Each {@link Collection} of {@link Document} instances is
162 * mapped by document type name
163 *
164 * @returns {@link Collection} instances mapped to document type name
165 */
166 Map<String, List<Document>> getRelatedDocuments();
167
168 void setRelatedDocuments(Map<String, List<Document>> relatedDocuments);
169
170 /**
171 * Gets the relatedDocumentNotes attribute.
172 *
173 * @return Returns the relatedDocumentNotes.
174 */
175 Map<String, List<Note>> getRelatedDocumentNotes();
176
177 /**
178 * Sets the relatedDocumentNotes attribute value.
179 *
180 * @param relatedDocumentNotes The relatedDocumentNotes to set.
181 */
182 void setRelatedDocumentNotes(Map<String, List<Note>> relatedDocumentNotes);
183
184 /**
185 * Determines if the {@link TravelDocument} has been calculated yet.
186 *
187 * @return true if the {@link TravelDocument} calculated flag has been set
188 */
189 boolean isCalculated();
190
191 /**
192 * Sets the calculated status of the {@link TravelDocument}
193 *
194 * @param calculated status that can be set on the {@link TravelDocument} can be true or false
195 */
196 void setCalculated(boolean calculated);
197
198 List<ExtraButton> getExtraButtons();
199
200 String getMethodToCall();
201
202 void setNewActualExpenseLine(ActualExpense newActualExpenseLine);
203
204 ActualExpense getNewActualExpenseLine();
205
206 void setNewActualExpenseLines(List<ActualExpense> newActualExpenseLines);
207
208 List<ActualExpense> getNewActualExpenseLines();
209
210 AccountingDocumentRelationship getNewAccountingDocumentRelationship();
211
212 void setNewAccountingDocumentRelationship(AccountingDocumentRelationship newEmergencyContactLine);
213
214 void setNewImportedExpenseLines(List<ImportedExpense> importedExpenses);
215
216 List<ImportedExpense> getNewImportedExpenseLines();
217
218 void setNewImportedExpenseLine(ImportedExpense importedExpense);
219
220 ImportedExpense getNewImportedExpenseLine();
221
222 void setDistribution(final List<AccountingDistribution> distribution);
223
224 List<AccountingDistribution> getDistribution();
225
226 /**
227 * Gets the accountDistributionnextSourceLineNumber attribute.
228 * @return Returns the accountDistributionnextSourceLineNumber.
229 */
230 public Integer getAccountDistributionnextSourceLineNumber();
231
232 /**
233 * Sets the accountDistributionnextSourceLineNumber attribute value.
234 * @param accountDistributionnextSourceLineNumber The accountDistributionnextSourceLineNumber to set.
235 */
236 public void setAccountDistributionnextSourceLineNumber(Integer accountDistributionnextSourceLineNumber);
237
238 /**
239 * Gets the accountDistributionnewSourceLine attribute.
240 * @return Returns the accountDistributionnewSourceLine.
241 */
242 public TemDistributionAccountingLine getAccountDistributionnewSourceLine();
243
244 /**
245 * Sets the accountDistributionnewSourceLine attribute value.
246 * @param accountDistributionnewSourceLine The accountDistributionnewSourceLine to set.
247 */
248 public void setAccountDistributionnewSourceLine(TemDistributionAccountingLine accountDistributionnewSourceLine);
249
250 /**
251 * Sets the sequence number appropriately for the passed in source accounting line using the value that has been stored in the
252 * nextSourceLineNumber variable, adds the accounting line to the list that is aggregated by this object, and then handles
253 * incrementing the nextSourceLineNumber variable.
254 *
255 * @param line the accounting line to add to the list.
256 * @see org.kuali.kfs.sys.document.AccountingDocument#addSourceAccountingLine(SourceAccountingLine)
257 */
258 public void addAccountDistributionsourceAccountingLine(TemDistributionAccountingLine line);
259
260 public KualiDecimal getDistributionRemainingAmount(boolean selectedDistributions);
261
262 public KualiDecimal getDistributionSubTotal(boolean selectedDistributions);
263
264 public List<TemDistributionAccountingLine> getAccountDistributionsourceAccountingLines();
265
266 public void setAccountDistributionsourceAccountingLines(List<TemDistributionAccountingLine> accountDistributionsourceAccountingLines);
267
268 }