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