001 /** 002 * Copyright 2004-2013 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.hr.time.timesheet.web; 017 018 import org.apache.struts.action.ActionMapping; 019 import org.kuali.hr.lm.balancetransfer.BalanceTransfer; 020 import org.kuali.hr.time.base.web.TkCommonCalendarForm; 021 import org.kuali.hr.time.calendar.CalendarEntries; 022 import org.kuali.hr.time.timesheet.TimesheetDocument; 023 024 import javax.servlet.http.HttpServletRequest; 025 026 import java.util.List; 027 import java.util.Map; 028 029 public class TimesheetActionForm extends TkCommonCalendarForm { 030 031 /** 032 * 033 */ 034 private static final long serialVersionUID = 6938733178369007689L; 035 private TimesheetDocument timesheetDocument; 036 037 038 /**Job Number -> Formatted department earn codes */ 039 private Map<Long,String> earnCodeDescriptions; 040 /** String (concat(job number, work_area, task)) -> Formatted Assignment Descriptions */ 041 private Map<String,String> assignmentDescriptions; 042 private CalendarEntries payCalendarDates; 043 private String selectedAssignment; 044 private String selectedEarnCode; 045 private String transferAccrualCategory; 046 047 private String calNav; 048 private String documentId; 049 050 private java.util.Date beginPeriodDateTime; 051 private java.util.Date endPeriodDateTime; 052 053 private String prevDocumentId; 054 private String nextDocumentId; 055 private List<BalanceTransfer> forfeitures; 056 057 @Override 058 public void reset(ActionMapping mapping, HttpServletRequest request) { 059 super.reset(mapping, request); 060 //setDocumentId(""); 061 } 062 063 public TimesheetDocument getTimesheetDocument() { 064 return timesheetDocument; 065 } 066 067 public void setTimesheetDocument(TimesheetDocument timesheetDocument) { 068 this.timesheetDocument = timesheetDocument; 069 } 070 071 public Map<Long,String> getEarnCodeDescriptions() { 072 return earnCodeDescriptions; 073 } 074 075 public void setEarnCodeDescriptions(Map<Long,String> earnCodeDescriptions) { 076 this.earnCodeDescriptions = earnCodeDescriptions; 077 } 078 079 public Map<String,String> getAssignmentDescriptions() { 080 return assignmentDescriptions; 081 } 082 083 public void setAssignmentDescriptions(Map<String,String> assignmentDescriptions) { 084 this.assignmentDescriptions = assignmentDescriptions; 085 } 086 087 public String getSelectedAssignment() { 088 return selectedAssignment; 089 } 090 091 public void setSelectedAssignment(String selectedAssignment) { 092 this.selectedAssignment = selectedAssignment; 093 } 094 095 public String getSelectedEarnCode() { 096 return selectedEarnCode; 097 } 098 099 public void setSelectedEarnCode(String selectedEarnCode) { 100 this.selectedEarnCode = selectedEarnCode; 101 } 102 103 public CalendarEntries getPayCalendarDates() { 104 return payCalendarDates; 105 } 106 107 public void setPayCalendarDates(CalendarEntries payCalendarDates) { 108 this.payCalendarDates = payCalendarDates; 109 } 110 111 public String getCalNav() { 112 return calNav; 113 } 114 115 public void setCalNav(String calNav) { 116 this.calNav = calNav; 117 } 118 119 public java.util.Date getBeginPeriodDateTime() { 120 return getPayCalendarDates().getBeginPeriodDateTime(); 121 } 122 123 public java.util.Date getEndPeriodDateTime() { 124 return getPayCalendarDates().getEndPeriodDateTime(); 125 } 126 127 public String getDocumentId() { 128 return documentId; 129 } 130 131 public void setDocumentId(String documentId) { 132 this.documentId = documentId; 133 } 134 135 public String getPrevDocumentId() { 136 return prevDocumentId; 137 } 138 139 public void setPrevDocumentId(String prevDocumentId) { 140 this.prevDocumentId = prevDocumentId; 141 } 142 143 public String getNextDocumentId() { 144 return nextDocumentId; 145 } 146 147 public void setNextDocumentId(String nextDocumentId) { 148 this.nextDocumentId = nextDocumentId; 149 } 150 151 public String getTransferAccrualCategory() { 152 return transferAccrualCategory; 153 } 154 155 public void setTransferAccrualCategory(String transferAccrualCategory) { 156 this.transferAccrualCategory = transferAccrualCategory; 157 } 158 159 public List<BalanceTransfer> getForfeitures() { 160 return forfeitures; 161 } 162 163 public void setForfeitures(List<BalanceTransfer> forfeitures) { 164 this.forfeitures = forfeitures; 165 } 166 }