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.base.web;
017
018 import java.util.ArrayList;
019 import java.util.HashMap;
020 import java.util.List;
021 import java.util.Map;
022
023 public class TkCommonCalendarForm extends TkForm {
024 private static final long serialVersionUID = 1L;
025
026 private List<String> calendarYears = new ArrayList<String>();
027 private Map<String,String> payPeriodsMap = new HashMap<String,String>();
028
029 private String selectedCalendarYear;
030 private String selectedPayPeriod;
031 private boolean onCurrentPeriod;
032 // private List<String> warnings;
033
034 private List<String> errorMessages;
035 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
036 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.
037 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.
038
039 public List<String> getCalendarYears() {
040 return calendarYears;
041 }
042 public void setCalendarYears(List<String> calendarYears) {
043 this.calendarYears = calendarYears;
044 }
045
046 public String getSelectedCalendarYear() {
047 return selectedCalendarYear;
048 }
049 public void setSelectedCalendarYear(String selectedCalendarYear) {
050 this.selectedCalendarYear = selectedCalendarYear;
051 }
052 public String getSelectedPayPeriod() {
053 return selectedPayPeriod;
054 }
055 public void setSelectedPayPeriod(String selectedPayPeriod) {
056 this.selectedPayPeriod = selectedPayPeriod;
057 }
058 public Map<String, String> getPayPeriodsMap() {
059 return payPeriodsMap;
060 }
061 public void setPayPeriodsMap(Map<String, String> payPeriodsMap) {
062 this.payPeriodsMap = payPeriodsMap;
063 }
064 public boolean isOnCurrentPeriod() {
065 return onCurrentPeriod;
066 }
067 public void setOnCurrentPeriod(boolean onCurrentPeriod) {
068 this.onCurrentPeriod = onCurrentPeriod;
069 }
070
071 // public List<String> getWarnings() {
072 // return warnings;
073 // }
074 //
075 // public void setWarnings(List<String> warnings) {
076 // this.warnings = warnings;
077 // }
078
079 public List<String> getErrorMessages() {
080 return errorMessages;
081 }
082
083 public void setErrorMessages(List<String> errorMessages) {
084 this.errorMessages = errorMessages;
085 }
086
087 public List<String> getWarningMessages() {
088 return warningMessages;
089 }
090
091 public void setWarningMessages(List<String> warningMessages) {
092 this.warningMessages = warningMessages;
093 }
094
095 public List<String> getInfoMessages() {
096 return infoMessages;
097 }
098
099 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 }