View Javadoc

1   /**
2    * Copyright 2004-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.hr.time.base.web;
17  
18  import java.util.ArrayList;
19  import java.util.HashMap;
20  import java.util.List;
21  import java.util.Map;
22  
23  public class TkCommonCalendarForm extends TkForm {
24  	private static final long serialVersionUID = 1L;
25  	
26  	private List<String> calendarYears = new ArrayList<String>();
27      private Map<String,String> payPeriodsMap = new HashMap<String,String>();
28      
29      private String selectedCalendarYear;
30      private String selectedPayPeriod;
31      private boolean onCurrentPeriod;
32  //    private List<String> warnings;
33  
34      private List<String> errorMessages;
35      private List<String> warningMessages = new ArrayList<String>(); ;        // Messages like: "you might lose leave if you don't act." or "you're over the limit - use / transfer / payout leave or risk forfeiting."  i.e. just warns of an upcoming consequence
36      private List<String> infoMessages = new ArrayList<String>(); ;           // Messages like: "leave was forfeted on this calendar" i.e. reports what happened or presents additional info to user.
37      private List<String> actionMessages = new ArrayList<String>();           // Messages like: "must approve transfer / payout doc ( or take other action ) before this calendar can be approved / submitted." i.e.: messages that informs about a required action.
38  
39  	public List<String> getCalendarYears() {
40  		return calendarYears;
41  	}
42  	public void setCalendarYears(List<String> calendarYears) {
43  		this.calendarYears = calendarYears;
44  	}
45  	
46  	public String getSelectedCalendarYear() {
47  		return selectedCalendarYear;
48  	}
49  	public void setSelectedCalendarYear(String selectedCalendarYear) {
50  		this.selectedCalendarYear = selectedCalendarYear;
51  	}
52  	public String getSelectedPayPeriod() {
53  		return selectedPayPeriod;
54  	}
55  	public void setSelectedPayPeriod(String selectedPayPeriod) {
56  		this.selectedPayPeriod = selectedPayPeriod;
57  	}
58  	public Map<String, String> getPayPeriodsMap() {
59  		return payPeriodsMap;
60  	}
61  	public void setPayPeriodsMap(Map<String, String> payPeriodsMap) {
62  		this.payPeriodsMap = payPeriodsMap;
63  	}
64  	public boolean isOnCurrentPeriod() {
65  		return onCurrentPeriod;
66  	}
67  	public void setOnCurrentPeriod(boolean onCurrentPeriod) {
68  		this.onCurrentPeriod = onCurrentPeriod;
69  	}
70  	
71  //    public List<String> getWarnings() {
72  //        return warnings;
73  //    }
74  //
75  //    public void setWarnings(List<String> warnings) {
76  //        this.warnings = warnings;
77  //    }
78  
79      public List<String> getErrorMessages() {
80          return errorMessages;
81      }
82  
83      public void setErrorMessages(List<String> errorMessages) {
84          this.errorMessages = errorMessages;
85      }
86  
87      public List<String> getWarningMessages() {
88          return warningMessages;
89      }
90  
91      public void setWarningMessages(List<String> warningMessages) {
92          this.warningMessages = warningMessages;
93      }
94  
95      public List<String> getInfoMessages() {
96          return infoMessages;
97      }
98  
99      public void setInfoMessages(List<String> infoMessages) {
100         this.infoMessages = infoMessages;
101     }
102 
103     public List<String> getActionMessages() {
104         return actionMessages;
105     }
106 
107     public void setActionMessages(List<String> actionMessages) {
108         this.actionMessages = actionMessages;
109     }
110 
111     //TODO: create a mehtod to get all existing messages on the form. action/info/warning
112 
113 }