org.kuali.hr.lm.leaveblock.service
Class LeaveBlockServiceImpl

java.lang.Object
  extended by org.kuali.hr.lm.leaveblock.service.LeaveBlockServiceImpl
All Implemented Interfaces:
LeaveBlockService

public class LeaveBlockServiceImpl
extends Object
implements LeaveBlockService


Constructor Summary
LeaveBlockServiceImpl()
           
 
Method Summary
 void addLeaveBlocks(org.joda.time.DateTime beginDate, org.joda.time.DateTime endDate, CalendarEntries ce, String selectedEarnCode, BigDecimal hours, String description, Assignment selectedAssignment, String spanningWeeks, String leaveBlockType, String principalId)
           
 LeaveBlock buildLeaveBlock(org.joda.time.DateTime leaveDate, String docId, String principalId, String selectedEarnCode, BigDecimal hours, String description, String accrualCategory, Assignment selectedAssignment, String requestStatus, String leaveBlockType, Timestamp beginTimeStamp, Timestamp endTimestamp)
           
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, Timestamp lastRanTime)
          gets list of leave blocks created for earn codes with eligible-for-accrual=no since the given timestamp
 List<LeaveBlock> getAccrualGeneratedLeaveBlocks(String principalId, Date beginDate, Date endDate)
          Retrieve list of accrual generated leave blocks for given Date range and User
 Map<String,LeaveBlock> getLastCarryOverBlocks(String principalId, Date asOfDate)
           
 LeaveBlock getLeaveBlock(String leaveBlockId)
           
 LeaveBlockDao getLeaveBlockDao()
           
 List<LeaveBlock> getLeaveBlocks(String principalId, Date beginDate, Date endDate)
           
 List<LeaveBlock> getLeaveBlocks(String principalId, String leaveBlockType, String requestStatus, Date currentDate)
           
 List<LeaveBlock> getLeaveBlocks(String principalId, String leaveBlockType, String requestStatus, Date beginDate, Date endDate)
           
 List<LeaveBlock> getLeaveBlocksForDate(String principalId, Date leaveDate)
          Get the list of leave blocks from the given leaveDate for the principalId
 List<LeaveBlock> getLeaveBlocksForDocumentId(String documentId)
           
 List<LeaveBlock> getLeaveBlocksForLeaveCalendar(String principalId, Date beginDate, Date 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> getLeaveBlocksForTimeCalendar(String principalId, Date beginDate, Date 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.DateTime endDate, boolean includeAllAccrualCategories)
           
 List<LeaveBlock> getLeaveBlocksWithAccrualCategory(String principalId, Date beginDate, Date endDate, String accrualCategory)
           
 List<LeaveBlock> getLeaveBlocksWithType(String principalId, Date beginDate, Date endDate, String leaveBlockType)
           
 List<LeaveBlock> getNotAccrualGeneratedLeaveBlocksForDate(String principalId, Date leaveDate)
          Get the list of not-accrual-generated leave blocks from the given leaveDate for the principalId
 List<LeaveBlock> getSSTOLeaveBlocks(String principalId, String sstoId, Date accruledDate)
          Retrieve list of leave blocks generated with given system scheduled time off id, date and user
 void saveLeaveBlock(LeaveBlock leaveBlock, String principalId)
           
 void saveLeaveBlocks(List<LeaveBlock> leaveBlocks)
           
 void setLeaveBlockDao(LeaveBlockDao leaveBlockDao)
           
 void updateLeaveBlock(LeaveBlock leaveBlock, String principalId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeaveBlockServiceImpl

public LeaveBlockServiceImpl()
Method Detail

getLeaveBlock

public LeaveBlock getLeaveBlock(String leaveBlockId)
Specified by:
getLeaveBlock in interface LeaveBlockService

getLeaveBlockDao

public LeaveBlockDao getLeaveBlockDao()

setLeaveBlockDao

public void setLeaveBlockDao(LeaveBlockDao leaveBlockDao)

getLeaveBlocksForDocumentId

public List<LeaveBlock> getLeaveBlocksForDocumentId(String documentId)
Specified by:
getLeaveBlocksForDocumentId in interface LeaveBlockService

getLeaveBlocks

public List<LeaveBlock> getLeaveBlocks(String principalId,
                                       Date beginDate,
                                       Date endDate)
Specified by:
getLeaveBlocks in interface LeaveBlockService

getLeaveBlocksWithAccrualCategory

public List<LeaveBlock> getLeaveBlocksWithAccrualCategory(String principalId,
                                                          Date beginDate,
                                                          Date endDate,
                                                          String accrualCategory)
Specified by:
getLeaveBlocksWithAccrualCategory in interface LeaveBlockService

getLeaveBlocksWithType

public List<LeaveBlock> getLeaveBlocksWithType(String principalId,
                                               Date beginDate,
                                               Date endDate,
                                               String leaveBlockType)
Specified by:
getLeaveBlocksWithType in interface LeaveBlockService

getLeaveBlocksSinceCarryOver

public List<LeaveBlock> getLeaveBlocksSinceCarryOver(String principalId,
                                                     Map<String,LeaveBlock> carryOver,
                                                     org.joda.time.DateTime endDate,
                                                     boolean includeAllAccrualCategories)
Specified by:
getLeaveBlocksSinceCarryOver in interface LeaveBlockService

getLastCarryOverBlocks

public Map<String,LeaveBlock> getLastCarryOverBlocks(String principalId,
                                                     Date asOfDate)
Specified by:
getLastCarryOverBlocks in interface LeaveBlockService

saveLeaveBlocks

public void saveLeaveBlocks(List<LeaveBlock> leaveBlocks)
Specified by:
saveLeaveBlocks in interface LeaveBlockService

deleteLeaveBlock

public void deleteLeaveBlock(String leaveBlockId,
                             String principalId)
Description copied from interface: LeaveBlockService
The deletion marks the leave block inactive instead of removing the row from the database.

Specified by:
deleteLeaveBlock in interface LeaveBlockService

saveLeaveBlock

public void saveLeaveBlock(LeaveBlock leaveBlock,
                           String principalId)
Specified by:
saveLeaveBlock in interface LeaveBlockService

addLeaveBlocks

public void addLeaveBlocks(org.joda.time.DateTime beginDate,
                           org.joda.time.DateTime endDate,
                           CalendarEntries ce,
                           String selectedEarnCode,
                           BigDecimal hours,
                           String description,
                           Assignment selectedAssignment,
                           String spanningWeeks,
                           String leaveBlockType,
                           String principalId)
Specified by:
addLeaveBlocks in interface LeaveBlockService

buildLeaveBlock

public LeaveBlock buildLeaveBlock(org.joda.time.DateTime leaveDate,
                                  String docId,
                                  String principalId,
                                  String selectedEarnCode,
                                  BigDecimal hours,
                                  String description,
                                  String accrualCategory,
                                  Assignment selectedAssignment,
                                  String requestStatus,
                                  String leaveBlockType,
                                  Timestamp beginTimeStamp,
                                  Timestamp endTimestamp)

updateLeaveBlock

public void updateLeaveBlock(LeaveBlock leaveBlock,
                             String principalId)
Specified by:
updateLeaveBlock in interface LeaveBlockService

createDaySpan

public static List<org.joda.time.Interval> createDaySpan(org.joda.time.DateTime beginDateTime,
                                                         org.joda.time.DateTime endDateTime,
                                                         org.joda.time.DateTimeZone zone)

getLeaveBlocks

public List<LeaveBlock> getLeaveBlocks(String principalId,
                                       String leaveBlockType,
                                       String requestStatus,
                                       Date currentDate)
Specified by:
getLeaveBlocks in interface LeaveBlockService
currentDate - currentDate to get the records for the future date, pass null when not required
Returns:
List of LeaveBlocks

getLeaveBlocks

public List<LeaveBlock> getLeaveBlocks(String principalId,
                                       String leaveBlockType,
                                       String requestStatus,
                                       Date beginDate,
                                       Date endDate)
Specified by:
getLeaveBlocks in interface LeaveBlockService
Returns:
List of LeaveBlocks

getLeaveBlocksForDate

public List<LeaveBlock> getLeaveBlocksForDate(String principalId,
                                              Date leaveDate)
Description copied from interface: LeaveBlockService
Get the list of leave blocks from the given leaveDate for the principalId

Specified by:
getLeaveBlocksForDate in interface LeaveBlockService
Returns:
List of LeaveBlocks

getNotAccrualGeneratedLeaveBlocksForDate

public List<LeaveBlock> getNotAccrualGeneratedLeaveBlocksForDate(String principalId,
                                                                 Date leaveDate)
Description copied from interface: LeaveBlockService
Get the list of not-accrual-generated leave blocks from the given leaveDate for the principalId

Specified by:
getNotAccrualGeneratedLeaveBlocksForDate in interface LeaveBlockService
Returns:
List of LeaveBlocks

getLeaveBlocksForTimeCalendar

public List<LeaveBlock> getLeaveBlocksForTimeCalendar(String principalId,
                                                      Date beginDate,
                                                      Date endDate,
                                                      List<String> assignmentKeys)
Description copied from interface: LeaveBlockService
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

Specified by:
getLeaveBlocksForTimeCalendar in interface LeaveBlockService
Returns:
List of leave blocks

getLeaveBlocksForLeaveCalendar

public List<LeaveBlock> getLeaveBlocksForLeaveCalendar(String principalId,
                                                       Date beginDate,
                                                       Date endDate,
                                                       List<String> assignmentKeys)
Description copied from interface: LeaveBlockService
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

Specified by:
getLeaveBlocksForLeaveCalendar in interface LeaveBlockService
Returns:
List of leave blocks

filterLeaveBlocksForTimeCalendar

public List<LeaveBlock> filterLeaveBlocksForTimeCalendar(List<LeaveBlock> lbs,
                                                         List<String> assignmentKeys)
Description copied from interface: LeaveBlockService
Filter list of leave blocks with given list of assignmentKeys for Time Calendar

Specified by:
filterLeaveBlocksForTimeCalendar in interface LeaveBlockService
Returns:
List of leave blocks

filterLeaveBlocksForLeaveCalendar

public List<LeaveBlock> filterLeaveBlocksForLeaveCalendar(List<LeaveBlock> lbs,
                                                          List<String> assignmentKeys)
Description copied from interface: LeaveBlockService
Filter list of leave blocks with given list of assignmentKeys for Leave Calendar

Specified by:
filterLeaveBlocksForLeaveCalendar in interface LeaveBlockService
Returns:
List of leave blocks

deleteLeaveBlocksForDocumentId

public void deleteLeaveBlocksForDocumentId(String documentId)
Description copied from interface: LeaveBlockService
Delete time blocks for a given document id

Specified by:
deleteLeaveBlocksForDocumentId in interface LeaveBlockService

getAccrualGeneratedLeaveBlocks

public List<LeaveBlock> getAccrualGeneratedLeaveBlocks(String principalId,
                                                       Date beginDate,
                                                       Date endDate)
Description copied from interface: LeaveBlockService
Retrieve list of accrual generated leave blocks for given Date range and User

Specified by:
getAccrualGeneratedLeaveBlocks in interface LeaveBlockService
Returns:
List of leave blocks

getSSTOLeaveBlocks

public List<LeaveBlock> getSSTOLeaveBlocks(String principalId,
                                           String sstoId,
                                           Date accruledDate)
Description copied from interface: LeaveBlockService
Retrieve list of leave blocks generated with given system scheduled time off id, date and user

Specified by:
getSSTOLeaveBlocks in interface LeaveBlockService
Returns:

getABELeaveBlocksSinceTime

public List<LeaveBlock> getABELeaveBlocksSinceTime(String principalId,
                                                   Timestamp lastRanTime)
Description copied from interface: LeaveBlockService
gets list of leave blocks created for earn codes with eligible-for-accrual=no since the given timestamp

Specified by:
getABELeaveBlocksSinceTime in interface LeaveBlockService
Returns:


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.