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.lm;
17  
18  import java.util.HashMap;
19  import java.util.LinkedHashMap;
20  import java.util.Map;
21  
22  
23  public class LMConstants {
24  	public static final String SERVICE_TIME_YEAR = "year";
25  	public static final String SERVICE_TIME_MONTHS = "month";
26  
27      public static final class ACCRUAL_EARN_INTERVAL_CODE{
28          public static final String DAILY = "D";
29          public static final String WEEKLY = "W";
30          public static final String SEMI_MONTHLY = "S";
31          public static final String MONTHLY = "M";
32          public static final String YEARLY = "Y";
33          public static final String NO_ACCRUAL = "N";
34          public static final String PAY_CAL = "P";
35      }
36  
37  	public static final class ACCRUAL_EARN_INTERVAL{
38  		public static final String DAILY = "daily";
39  		public static final String WEEKLY = "weekly";
40  		public static final String SEMI_MONTHLY = "semimonthly";
41  		public static final String MONTHLY = "monthly";
42  		public static final String YEARLY = "yearly";
43  		public static final String NO_ACCRUAL = "noaccrual";
44  		public static final String PAY_CAL = "paycalendar";
45  	}
46  	
47  	// KPME-1347 Kagata
48  	public static final Map<String, String> ACCRUAL_EARN_INTERVAL_MAP = new HashMap<String, String>(7);
49  	public static final String MAX_CARRY_OVER_ADJUSTMENT = "Max carry over adjustment";
50      static {
51      	ACCRUAL_EARN_INTERVAL_MAP.put(ACCRUAL_EARN_INTERVAL_CODE.DAILY, "Daily");
52      	ACCRUAL_EARN_INTERVAL_MAP.put(ACCRUAL_EARN_INTERVAL_CODE.WEEKLY, "Weekly");
53      	ACCRUAL_EARN_INTERVAL_MAP.put(ACCRUAL_EARN_INTERVAL_CODE.SEMI_MONTHLY, "Semi-Monthly");
54      	ACCRUAL_EARN_INTERVAL_MAP.put(ACCRUAL_EARN_INTERVAL_CODE.MONTHLY, "Monthly");
55      	ACCRUAL_EARN_INTERVAL_MAP.put(ACCRUAL_EARN_INTERVAL_CODE.YEARLY, "Yearly");
56      	ACCRUAL_EARN_INTERVAL_MAP.put(ACCRUAL_EARN_INTERVAL_CODE.NO_ACCRUAL, "No Accrual");
57      	ACCRUAL_EARN_INTERVAL_MAP.put(ACCRUAL_EARN_INTERVAL_CODE.PAY_CAL, "Pay Calendar");
58      }
59      
60  	
61  	// Action history
62  	public static final class ACTION{
63  		public static final String DELETE = "D";
64  		public static final String ADD = "A";
65  		public static final String MODIFIED = "M";
66  	}
67  	
68  	// Request status
69  	public static final class REQUEST_STATUS{
70  		public static final String PLANNED="P";
71  		public static final String REQUESTED="R";
72  		public static final String APPROVED="A";
73  		public static final String DISAPPROVED = "D";
74  		public static final String DEFERRED="F";
75  		public static final String USAGE = "U";
76  	}
77  	
78  	 public static final Map<String, String> REQUEST_STATUS_STRINGS = new HashMap<String, String>(6);
79  
80  	    static {
81  	    	REQUEST_STATUS_STRINGS.put(REQUEST_STATUS.PLANNED, "Planned");
82  	    	REQUEST_STATUS_STRINGS.put(REQUEST_STATUS.REQUESTED, "Requested");
83  	    	REQUEST_STATUS_STRINGS.put(REQUEST_STATUS.APPROVED, "Approved"); 
84  	    	REQUEST_STATUS_STRINGS.put(REQUEST_STATUS.DISAPPROVED, "Disapproved");
85  	    	REQUEST_STATUS_STRINGS.put(REQUEST_STATUS.DEFERRED, "Deferred");
86  	    	REQUEST_STATUS_STRINGS.put(REQUEST_STATUS.USAGE, "Usage");
87  	    }
88  	    
89  	 public static final Map<String, String> ROUND_OPTION_MAP = new HashMap<String, String>(2);
90  	 static {
91  		 ROUND_OPTION_MAP.put("T", "Traditional");
92  		 ROUND_OPTION_MAP.put("R", "Truncate");
93  	 }
94  	 
95  	 public static final class RECORD_METHOD {
96  		 public static final String TIME = "T";
97  		 public static final String HOUR = "H";
98  		 public static final String AMOUNT = "A";
99  		 public static final String DAY = "D";
100 	 }
101 	 
102 	 public static final Map<String, String> RECORD_METHOD_MAP = new HashMap<String, String>(2);
103 	 static {
104 		 RECORD_METHOD_MAP.put(RECORD_METHOD.TIME, "Time");
105 		 RECORD_METHOD_MAP.put(RECORD_METHOD.HOUR, "Hours");
106 		 RECORD_METHOD_MAP.put(RECORD_METHOD.AMOUNT, "Amount");
107 		 RECORD_METHOD_MAP.put(RECORD_METHOD.DAY, "Days");
108 	 }
109 	
110 	 public static final Map<String, String> ACCRUAL_BALANCE_ACTION_MAP = new LinkedHashMap<String, String>(2);
111 	 static {
112 		 ACCRUAL_BALANCE_ACTION_MAP.put(ACCRUAL_BALANCE_ACTION.NONE, "None");
113 		 ACCRUAL_BALANCE_ACTION_MAP.put(ACCRUAL_BALANCE_ACTION.USAGE, "Usage");
114 		 ACCRUAL_BALANCE_ACTION_MAP.put(ACCRUAL_BALANCE_ACTION.ADJUSTMENT, "Adjustment");
115 	 }
116 
117      public static final class ACCRUAL_BALANCE_ACTION {
118         public static final String NONE = "N";
119         public static final String USAGE = "U";
120         public static final String ADJUSTMENT = "A";
121     }
122 	 
123 	 
124 	 public static final String LEAVE_CALENDAR_TYPE = "leaveCalendar";
125 	 
126 	 public static final class LEAVE_BLOCK_TYPE {
127 		 public static final String LEAVE_CALENDAR = "LC";
128 		 public static final String TIME_CALENDAR = "TC";
129 		 public static final String ACCRUAL_SERVICE = "AS";
130 		 public static final String BALANCE_TRANSFER = "BT";
131          public static final String LEAVE_PAYOUT = "LP";
132 		 public static final String DONATION_MAINT = "DM";
133 		 public static final String LEAVE_ADJUSTMENT_MAINT = "LAM";
134 		 public static final String CARRY_OVER = "CO";
135 		 public static final String CARRY_OVER_ADJUSTMENT = "COA";
136 	 }
137 
138 	 public static final Map<String, String> LEAVE_BLOCK_TYPE_MAP = new HashMap<String, String>(8);
139 	 static {
140 		 	LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.LEAVE_CALENDAR, "Leave Calendar");
141 		 	LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.TIME_CALENDAR, "Time Calendar");
142 	    	LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.ACCRUAL_SERVICE, "Accrual Service");
143 	    	LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.BALANCE_TRANSFER, "Balance Transfer");
144 	    	LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.LEAVE_PAYOUT, "Leave Payout");
145 	    	LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.DONATION_MAINT, "Donation");
146 	    	LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.LEAVE_ADJUSTMENT_MAINT, "Leave Adjustment");
147 	    	LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.CARRY_OVER, "Carry Over");
148 	    	LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.CARRY_OVER_ADJUSTMENT, "Carry Over Adjustment");
149 	 }
150 	    
151     public static final class ACTION_AT_MAX_BAL {
152         public static final String LOSE = "L";
153         public static final String TRANSFER = "T";
154         public static final String PAYOUT = "P";
155     }
156 
157     public static final class MAX_BAL_ACTION_FREQ {
158     	//As of revision 3882, constant LEAVE_APPROVE given value LA to remove discrepancy for value
159     	//being set in LM_ACCRUAL_CATEGORY_RULES_T.MAX_BAL_ACTION_FREQ. Constant was defined as "L"
160     	//table value being set is "LA"
161         public static final String LEAVE_APPROVE = "LA";
162         public static final String YEAR_END = "YE";
163 		public static final String ON_DEMAND = "OD";
164     }
165 	 
166 	 public static final String STATUS_CHANGE_EARN_CODE = "Accrual Note";
167 	 
168 	 public static final String RUN_ACCRUAL_FROM_CALENDAR = "run.accrual.from.calendar";   // controls if accrual should be ran from Leave calendar
169 	 
170 	 public static final String INITIATE_LEAVE_REQUEST_ACTION = "kpme.lm.leaveCalendar.initiate.leaveRequest.action";
171 	 public static final class INITIATE_LEAVE_REQUEST_ACTION_OPTIONS {
172 	        public static final String DELETE = "DELETE";
173 	        public static final String APPROVE = "APPROVE";
174 	 }
175 	 
176 	 public static final class TIME_APPROVAL_TYPE {
177 		 public static final String TIME = "time";
178 		 public static final String LEAVE = "leave";
179 		 public static final String ALL = "all";
180 	 }
181 	 
182 	 public static final int DELINQUENT_LEAVE_CALENDARS_LIMIT = 2;
183 	 
184 	 public static final Map<String, String> EARN_CODE_USAGE_LIMIT_MAP = new LinkedHashMap<String, String>(2);
185 	 static {
186 		 EARN_CODE_USAGE_LIMIT_MAP.put("I", "Include");
187 		 EARN_CODE_USAGE_LIMIT_MAP.put("E", "Exclude");
188 	 }
189 	 
190 	 public static final class BALANCE_TRANSFER_TYPE {
191 		 public static final String ACCRUAL_TRIGGERED = "AT";
192 		 public static final String SSTO = "TO";
193 		 public static final String MAINTENANCE = "MT";
194 		 public static final String CARRY_OVER = "CO";
195 	 }
196 	 
197 	public static final class UNUSED_TIME{
198 		public static final String NO_UNUSED = "NUTA";
199         public static final String TRANSFER = "T";
200         public static final String BANK = "B";
201 	}
202 		
203 	public static final Map<String, String> UNUSED_TIME_MAP = new HashMap<String, String>(7);
204     static {
205     	UNUSED_TIME_MAP.put(UNUSED_TIME.NO_UNUSED, "No Unused Time Allowed");
206     	UNUSED_TIME_MAP.put(UNUSED_TIME.TRANSFER, "Transfer");
207     	UNUSED_TIME_MAP.put(UNUSED_TIME.BANK, "Bank");
208     }
209 }