public class LeaveBlockServiceImpl extends Object implements LeaveBlockService
| Constructor and Description | 
|---|
| LeaveBlockServiceImpl() | 
| Modifier and Type | Method and Description | 
|---|---|
| List<LeaveBlock> | addLeaveBlocks(org.joda.time.DateTime beginDate,
                            org.joda.time.DateTime endDate,
                            CalendarEntry ce,
                            String selectedEarnCode,
                            BigDecimal hours,
                            String description,
                            Assignment selectedAssignment,
                            String spanningWeeks,
                            String leaveBlockType,
                            String principalId,
                            String userPrincipalId) | 
| void | addNote(String documentId,
              String principalId,
              String note,
              String userPrincipalId) | 
| protected BigDecimal | applyInflateMinHoursAndFactor(EarnCode earnCodeObj,
                                                          BigDecimal blockHours) | 
| LeaveBlockBo | buildLeaveBlock(org.joda.time.LocalDate leaveDate,
                              String docId,
                              String principalId,
                              String selectedEarnCode,
                              BigDecimal hours,
                              String description,
                              String accrualCategory,
                              Assignment selectedAssignment,
                              String requestStatus,
                              String leaveBlockType,
                              org.joda.time.DateTime beginDateTime,
                              org.joda.time.DateTime endDateTime) | 
| static List<org.joda.time.Interval> | createDaySpan(org.joda.time.DateTime beginDateTime,
                          org.joda.time.DateTime endDateTime,
                          org.joda.time.DateTimeZone zone) | 
| void | deleteLeaveBlock(String leaveBlockId,
                                String principalId)The deletion marks the leave block inactive instead of removing the row from the database. | 
| void | deleteLeaveBlocksForDocumentId(String documentId)Delete time blocks for a given document id | 
| List<LeaveBlock> | filterLeaveBlocksForLeaveCalendar(List<LeaveBlock> lbs,
                                                                  List<String> assignmentKeys)Filter list of leave blocks with given list of assignmentKeys for Leave Calendar | 
| List<LeaveBlock> | filterLeaveBlocksForTimeCalendar(List<LeaveBlock> lbs,
                                                                List<String> assignmentKeys)Filter list of leave blocks with given list of assignmentKeys for Time Calendar | 
| List<LeaveBlock> | getABELeaveBlocksSinceTime(String principalId,
                                                    org.joda.time.DateTime lastRanDateTime)gets list of leave blocks created for earn codes with eligible-for-accrual=no since the given timestamp
 The leave blocks are normally for absent earn codes (ABE) | 
| List<LeaveBlock> | getAccrualGeneratedLeaveBlocks(String principalId,
                                                            org.joda.time.LocalDate beginDate,
                                                            org.joda.time.LocalDate endDate)Retrieve list of accrual generated leave blocks for given Date range and User | 
| Map<String,LeaveBlock> | getLastCarryOverBlocks(String principalId,
                                            org.joda.time.LocalDate asOfDate) | 
| LeaveBlock | getLeaveBlock(String leaveBlockId) | 
| protected LeaveBlockBo | getLeaveBlockBo(String leaveBlockId) | 
| protected List<LeaveBlockBo> | getLeaveBlockBos(String principalId,
                                org.joda.time.LocalDate beginDate,
                                org.joda.time.LocalDate endDate) | 
| LeaveBlockDao | getLeaveBlockDao() | 
| List<LeaveBlock> | getLeaveBlocks(String principalId,
                            org.joda.time.LocalDate beginDate,
                            org.joda.time.LocalDate endDate) | 
| List<LeaveBlock> | getLeaveBlocks(String principalId,
                            String leaveBlockType,
                            String requestStatus,
                            org.joda.time.LocalDate currentDate) | 
| List<LeaveBlock> | getLeaveBlocks(String principalId,
                            String leaveBlockType,
                            String requestStatus,
                            org.joda.time.LocalDate beginDate,
                            org.joda.time.LocalDate endDate) | 
| List<LeaveBlock> | getLeaveBlocksForDate(String principalId,
                                          org.joda.time.LocalDate leaveDate)Get the list of leave blocks from the given leaveDate for the principalId | 
| List<LeaveBlock> | getLeaveBlocksForDocumentId(String documentId) | 
| List<LeaveBlock> | getLeaveBlocksForLeaveCalendar(String principalId,
                                                            org.joda.time.LocalDate beginDate,
                                                            org.joda.time.LocalDate endDate,
                                                            List<String> assignmentKeys)Get list of leave blocks to display on leave calendar with given dates and principal id
 the leave blocks created from time calendar should have assignments in the list of assignment keys | 
| List<LeaveBlock> | getLeaveBlocksForLookup(String documentId,
                                              String principalId,
                                              String userPrincipalId,
                                              org.joda.time.LocalDate fromDate,
                                              org.joda.time.LocalDate toDate,
                                              String leaveBlockType)retrieves a list of leave blocks of whose optional parameters match those required in Time Block Lookup. | 
| List<LeaveBlock> | getLeaveBlocksForTimeCalendar(String principalId,
                                                          org.joda.time.LocalDate beginDate,
                                                          org.joda.time.LocalDate endDate,
                                                          List<String> assignmentKeys)Get list of leave blocks to display on time sheet with given dates and principal id
 Only get leave blocks with type of leave calendar and time calendar
 the leave blocks should have assignments in the list of assignment keys | 
| List<LeaveBlock> | getLeaveBlocksSinceCarryOver(String principalId,
                                                        Map<String,LeaveBlock> carryOver,
                                                        org.joda.time.LocalDate endDate,
                                                        boolean includeAllAccrualCategories) | 
| List<LeaveBlock> | getLeaveBlocksWithAccrualCategory(String principalId,
                                                                  org.joda.time.LocalDate beginDate,
                                                                  org.joda.time.LocalDate endDate,
                                                                  String accrualCategory) | 
| List<LeaveBlock> | getLeaveBlocksWithType(String principalId,
                                            org.joda.time.LocalDate beginDate,
                                            org.joda.time.LocalDate endDate,
                                            String leaveBlockType) | 
| List<LeaveBlock> | getNotAccrualGeneratedLeaveBlocksForDate(String principalId,
                                                                                org.joda.time.LocalDate leaveDate)Get the list of not-accrual-generated leave blocks from the given leaveDate for the principalId | 
| List<LeaveBlock> | getSSTOLeaveBlocks(String principalId,
                                    String sstoId,
                                    org.joda.time.LocalDate accruledDate)Retrieve list of leave blocks generated with given system scheduled time off id, date and user | 
| List<LeaveBlock> | getTimeCalendarLeaveBlocksForTimeBlockLookup(String documentId,
                                                                                        String principalId,
                                                                                        String userPrincipalId,
                                                                                        org.joda.time.LocalDate fromDate,
                                                                                        org.joda.time.LocalDate toDate)retrieves a list of leave blocks of type "TIME_CALENADAR" whose optional parameters match those required in Time Block Lookup. | 
| LeaveBlock | saveLeaveBlock(LeaveBlock leaveBlock,
                            String principalId) | 
| protected List<LeaveBlockBo> | saveLeaveBlockBos(List<LeaveBlockBo> leaveBlocks) | 
| List<LeaveBlock> | saveLeaveBlocks(List<LeaveBlock> leaveBlocks) | 
| void | setLeaveBlockDao(LeaveBlockDao leaveBlockDao) | 
| void | updateLeaveBlock(LeaveBlock leaveBlock,
                                String principalId) | 
public LeaveBlockServiceImpl()
public LeaveBlock getLeaveBlock(String leaveBlockId)
getLeaveBlock in interface LeaveBlockServiceprotected LeaveBlockBo getLeaveBlockBo(String leaveBlockId)
public LeaveBlockDao getLeaveBlockDao()
public void setLeaveBlockDao(LeaveBlockDao leaveBlockDao)
public List<LeaveBlock> getLeaveBlocksForDocumentId(String documentId)
getLeaveBlocksForDocumentId in interface LeaveBlockServicepublic List<LeaveBlock> getLeaveBlocks(String principalId, org.joda.time.LocalDate beginDate, org.joda.time.LocalDate endDate)
getLeaveBlocks in interface LeaveBlockServiceprotected List<LeaveBlockBo> getLeaveBlockBos(String principalId, org.joda.time.LocalDate beginDate, org.joda.time.LocalDate endDate)
public List<LeaveBlock> getLeaveBlocksWithAccrualCategory(String principalId, org.joda.time.LocalDate beginDate, org.joda.time.LocalDate endDate, String accrualCategory)
getLeaveBlocksWithAccrualCategory in interface LeaveBlockServicepublic List<LeaveBlock> getLeaveBlocksWithType(String principalId, org.joda.time.LocalDate beginDate, org.joda.time.LocalDate endDate, String leaveBlockType)
getLeaveBlocksWithType in interface LeaveBlockServicepublic List<LeaveBlock> getLeaveBlocksSinceCarryOver(String principalId, Map<String,LeaveBlock> carryOver, org.joda.time.LocalDate endDate, boolean includeAllAccrualCategories)
getLeaveBlocksSinceCarryOver in interface LeaveBlockServicepublic Map<String,LeaveBlock> getLastCarryOverBlocks(String principalId, org.joda.time.LocalDate asOfDate)
getLastCarryOverBlocks in interface LeaveBlockServicepublic List<LeaveBlock> saveLeaveBlocks(List<LeaveBlock> leaveBlocks)
saveLeaveBlocks in interface LeaveBlockServiceprotected List<LeaveBlockBo> saveLeaveBlockBos(List<LeaveBlockBo> leaveBlocks)
public void deleteLeaveBlock(String leaveBlockId, String principalId)
LeaveBlockServicedeleteLeaveBlock in interface LeaveBlockServicepublic LeaveBlock saveLeaveBlock(LeaveBlock leaveBlock, String principalId)
saveLeaveBlock in interface LeaveBlockServicepublic List<LeaveBlock> addLeaveBlocks(org.joda.time.DateTime beginDate, org.joda.time.DateTime endDate, CalendarEntry ce, String selectedEarnCode, BigDecimal hours, String description, Assignment selectedAssignment, String spanningWeeks, String leaveBlockType, String principalId, String userPrincipalId)
addLeaveBlocks in interface LeaveBlockServicepublic LeaveBlockBo buildLeaveBlock(org.joda.time.LocalDate leaveDate, String docId, String principalId, String selectedEarnCode, BigDecimal hours, String description, String accrualCategory, Assignment selectedAssignment, String requestStatus, String leaveBlockType, org.joda.time.DateTime beginDateTime, org.joda.time.DateTime endDateTime)
public void updateLeaveBlock(LeaveBlock leaveBlock, String principalId)
updateLeaveBlock in interface LeaveBlockServicepublic void addNote(String documentId, String principalId, String note, String userPrincipalId)
public static List<org.joda.time.Interval> createDaySpan(org.joda.time.DateTime beginDateTime, org.joda.time.DateTime endDateTime, org.joda.time.DateTimeZone zone)
public List<LeaveBlock> getLeaveBlocks(String principalId, String leaveBlockType, String requestStatus, org.joda.time.LocalDate currentDate)
getLeaveBlocks in interface LeaveBlockServicecurrentDate - currentDate to get the records for the future date, pass null when not requiredpublic List<LeaveBlock> getLeaveBlocks(String principalId, String leaveBlockType, String requestStatus, org.joda.time.LocalDate beginDate, org.joda.time.LocalDate endDate)
getLeaveBlocks in interface LeaveBlockServicepublic List<LeaveBlock> getLeaveBlocksForDate(String principalId, org.joda.time.LocalDate leaveDate)
LeaveBlockServicegetLeaveBlocksForDate in interface LeaveBlockServicepublic List<LeaveBlock> getNotAccrualGeneratedLeaveBlocksForDate(String principalId, org.joda.time.LocalDate leaveDate)
LeaveBlockServicegetNotAccrualGeneratedLeaveBlocksForDate in interface LeaveBlockServicepublic List<LeaveBlock> getLeaveBlocksForTimeCalendar(String principalId, org.joda.time.LocalDate beginDate, org.joda.time.LocalDate endDate, List<String> assignmentKeys)
LeaveBlockServicegetLeaveBlocksForTimeCalendar in interface LeaveBlockServicepublic List<LeaveBlock> getLeaveBlocksForLeaveCalendar(String principalId, org.joda.time.LocalDate beginDate, org.joda.time.LocalDate endDate, List<String> assignmentKeys)
LeaveBlockServicegetLeaveBlocksForLeaveCalendar in interface LeaveBlockServicepublic List<LeaveBlock> filterLeaveBlocksForTimeCalendar(List<LeaveBlock> lbs, List<String> assignmentKeys)
LeaveBlockServicefilterLeaveBlocksForTimeCalendar in interface LeaveBlockServicepublic List<LeaveBlock> filterLeaveBlocksForLeaveCalendar(List<LeaveBlock> lbs, List<String> assignmentKeys)
LeaveBlockServicefilterLeaveBlocksForLeaveCalendar in interface LeaveBlockServicepublic void deleteLeaveBlocksForDocumentId(String documentId)
LeaveBlockServicedeleteLeaveBlocksForDocumentId in interface LeaveBlockServicepublic List<LeaveBlock> getAccrualGeneratedLeaveBlocks(String principalId, org.joda.time.LocalDate beginDate, org.joda.time.LocalDate endDate)
LeaveBlockServicegetAccrualGeneratedLeaveBlocks in interface LeaveBlockServicepublic List<LeaveBlock> getSSTOLeaveBlocks(String principalId, String sstoId, org.joda.time.LocalDate accruledDate)
LeaveBlockServicegetSSTOLeaveBlocks in interface LeaveBlockServicepublic List<LeaveBlock> getABELeaveBlocksSinceTime(String principalId, org.joda.time.DateTime lastRanDateTime)
LeaveBlockServicegetABELeaveBlocksSinceTime in interface LeaveBlockServiceprotected BigDecimal applyInflateMinHoursAndFactor(EarnCode earnCodeObj, BigDecimal blockHours)
public List<LeaveBlock> getTimeCalendarLeaveBlocksForTimeBlockLookup(String documentId, String principalId, String userPrincipalId, org.joda.time.LocalDate fromDate, org.joda.time.LocalDate toDate)
LeaveBlockServicegetTimeCalendarLeaveBlocksForTimeBlockLookup in interface LeaveBlockServicedocumentId - This field is not used in persistence criteria. Leave Blocks do not have timesheet document id populated. TODO: Remove param, or set timesheet header ids on leave blocks.principalId - optional principal to find leave blocks foruserPrincipalId - optional principal that made modifications to the leave block - i.e. an admin targeting a specific user.fromDate - optional lower bound date, inclusive. matches against LeaveBlock.leaveDatetoDate - optional upper bound date, exclusive. matches against LeaveBlock.leaveDatepublic List<LeaveBlock> getLeaveBlocksForLookup(String documentId, String principalId, String userPrincipalId, org.joda.time.LocalDate fromDate, org.joda.time.LocalDate toDate, String leaveBlockType)
LeaveBlockServicegetLeaveBlocksForLookup in interface LeaveBlockServicedocumentId - This field is not used in persistence criteria. Leave Blocks do not have timesheet document id populated. TODO: Remove param, or set timesheet header ids on leave blocks.principalId - optional principal to find leave blocks foruserPrincipalId - optional principal that made modifications to the leave block - i.e. an admin targeting a specific user.fromDate - optional lower bound date, inclusive. matches against LeaveBlock.leaveDatetoDate - optional upper bound date, exclusive. matches against LeaveBlock.leaveDateleaveBlockType - optional Leave Block Type, exclusive. matches against LeaveBlock.leaveBlockTypeCopyright © 2004–2014 The Kuali Foundation. All rights reserved.