001/** 002 * Copyright 2004-2015 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 */ 016package org.kuali.kpme.tklm.common; 017 018import java.util.ArrayList; 019import java.util.HashMap; 020import java.util.LinkedHashMap; 021import java.util.List; 022import java.util.Map; 023 024import org.kuali.kpme.core.util.HrConstants; 025 026 027public class LMConstants { 028 029 public static final class LEAVE_BLOCK_TYPE { 030 public static final String LEAVE_CALENDAR = "LC"; 031 public static final String TIME_CALENDAR = "TC"; 032 public static final String ACCRUAL_SERVICE = "AS"; 033 public static final String BALANCE_TRANSFER = "BT"; 034 public static final String LEAVE_PAYOUT = "LP"; 035 public static final String DONATION_MAINT = "DM"; 036 public static final String LEAVE_ADJUSTMENT_MAINT = "LAM"; 037 public static final String CARRY_OVER = "CO"; 038 public static final String CARRY_OVER_ADJUSTMENT = "COA"; 039 } 040 041 public static final Map<String, String> LEAVE_BLOCK_TYPE_MAP = new LinkedHashMap<String, String>(8); 042 static { 043 LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.LEAVE_CALENDAR, "Leave Calendar"); 044 LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.TIME_CALENDAR, "Time Calendar"); 045 LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.ACCRUAL_SERVICE, "Accrual Service"); 046 LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.BALANCE_TRANSFER, "Balance Transfer"); 047 LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.CARRY_OVER, "Carry Over"); 048 LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.CARRY_OVER_ADJUSTMENT, "Carry Over Adjustment"); 049 LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.DONATION_MAINT, "Donation"); 050 LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.LEAVE_ADJUSTMENT_MAINT, "Leave Adjustment"); 051 LEAVE_BLOCK_TYPE_MAP.put(LEAVE_BLOCK_TYPE.LEAVE_PAYOUT, "Leave Payout"); 052 053 054 } 055 056 public static final String STATUS_CHANGE_EARN_CODE = "Accrual Note"; 057 058 //leave block identification depends on this string. 059 public static final String PAYOUT_FORFEIT_LB_DESCRIPTION = "Forfeited payout amount"; 060 public static final String TRANSFER_FORFEIT_LB_DESCRIPTION = "Forfeited balance transfer amount"; 061 062 public static final String RUN_ACCRUAL_FROM_CALENDAR = "run.accrual.from.calendar"; // controls if accrual should be ran from Leave calendar 063 064 public static final String DISPLAY_YTD_FMLA_LEAVESUMMARY ="kpme.display.ytdfmla.on.leavesummary"; 065 066 public static final String INITIATE_LEAVE_REQUEST_ACTION = "kpme.lm.leaveCalendar.initiate.leaveRequest.action"; 067 068 public static final class INITIATE_LEAVE_REQUEST_ACTION_OPTIONS { 069 public static final String DELETE = "DELETE"; 070 public static final String APPROVE = "APPROVE"; 071 } 072 073 public static final class TIME_APPROVAL_TYPE { 074 public static final String TIME = "time"; 075 public static final String LEAVE = "leave"; 076 public static final String ALL = "all"; 077 } 078 079 public static final int DELINQUENT_LEAVE_CALENDARS_LIMIT = 2; 080 081 public static final class BALANCE_TRANSFER_TYPE { 082 public static final String ACCRUAL_TRIGGERED = "AT"; 083 public static final String SSTO = "TO"; 084 public static final String MAINTENANCE = "MT"; 085 public static final String CARRY_OVER = "CO"; 086 } 087 088 public static final class UNUSED_TIME{ 089 public static final String NO_UNUSED = "NUTA"; 090 public static final String TRANSFER = "T"; 091 public static final String BANK = "B"; 092 } 093 094 public static final Map<String, String> UNUSED_TIME_MAP = new HashMap<String, String>(7); 095 static { 096 UNUSED_TIME_MAP.put(UNUSED_TIME.NO_UNUSED, "No Unused Time Allowed"); 097 UNUSED_TIME_MAP.put(UNUSED_TIME.TRANSFER, "Transfer"); 098 UNUSED_TIME_MAP.put(UNUSED_TIME.BANK, "Bank"); 099 } 100 101 public static final String MAX_CARRY_OVER_ADJUSTMENT = "Max carry over adjustment"; 102 103 public static final List<String> YTD_EARNED_LEAVE_BLOCK_TYPES = new ArrayList<String>(); 104 static { 105 YTD_EARNED_LEAVE_BLOCK_TYPES.add(LMConstants.LEAVE_BLOCK_TYPE.ACCRUAL_SERVICE); 106 YTD_EARNED_LEAVE_BLOCK_TYPES.add(LMConstants.LEAVE_BLOCK_TYPE.BALANCE_TRANSFER); 107 YTD_EARNED_LEAVE_BLOCK_TYPES.add(LMConstants.LEAVE_BLOCK_TYPE.LEAVE_PAYOUT); 108 YTD_EARNED_LEAVE_BLOCK_TYPES.add(LMConstants.LEAVE_BLOCK_TYPE.DONATION_MAINT); 109 YTD_EARNED_LEAVE_BLOCK_TYPES.add(LMConstants.LEAVE_BLOCK_TYPE.CARRY_OVER_ADJUSTMENT); 110 } 111 112 public static final List<String> ADJUSTMENT_YTD_EARNED_LEAVE_BLOCK_TYPES = new ArrayList<String>(); 113 static { 114 ADJUSTMENT_YTD_EARNED_LEAVE_BLOCK_TYPES.add(LMConstants.LEAVE_BLOCK_TYPE.TIME_CALENDAR); 115 ADJUSTMENT_YTD_EARNED_LEAVE_BLOCK_TYPES.add(LMConstants.LEAVE_BLOCK_TYPE.LEAVE_CALENDAR); 116 ADJUSTMENT_YTD_EARNED_LEAVE_BLOCK_TYPES.add(LMConstants.LEAVE_BLOCK_TYPE.LEAVE_ADJUSTMENT_MAINT); 117 } 118 119 120 public static final List<String> USAGE_LEAVE_BLOCK_TYPES = new ArrayList<String>(); 121 static { 122 USAGE_LEAVE_BLOCK_TYPES.add(LMConstants.LEAVE_BLOCK_TYPE.TIME_CALENDAR); 123 USAGE_LEAVE_BLOCK_TYPES.add(LMConstants.LEAVE_BLOCK_TYPE.LEAVE_CALENDAR); 124 USAGE_LEAVE_BLOCK_TYPES.add(LMConstants.LEAVE_BLOCK_TYPE.LEAVE_ADJUSTMENT_MAINT); 125 } 126 127 public static final List<String> PENDING_LEAVE_BLOCK_STATUS = new ArrayList<String>(); 128 static { 129 PENDING_LEAVE_BLOCK_STATUS.add(HrConstants.REQUEST_STATUS.PLANNED); 130 PENDING_LEAVE_BLOCK_STATUS.add(HrConstants.REQUEST_STATUS.REQUESTED); 131 PENDING_LEAVE_BLOCK_STATUS.add(HrConstants.REQUEST_STATUS.APPROVED); 132 } 133}