org.kuali.kpme.tklm.leave.block.service
Interface LeaveBlockService

All Known Implementing Classes:
LeaveBlockServiceImpl

public interface LeaveBlockService


Method Summary
 void 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)
           
 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)
           
 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> carryOverBlocks, 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)
           
 List<LeaveBlock> saveLeaveBlocks(List<LeaveBlock> leaveBlocks)
           
 void updateLeaveBlock(LeaveBlock leaveBlock, String principalId)
           
 

Method Detail

getLeaveBlock

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLeaveBlock}\' + \'leaveBlockId=\' + #p0")
LeaveBlock getLeaveBlock(String leaveBlockId)

getLeaveBlocksForDocumentId

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLeaveBlocksForDocumentId}\' + \'documentId=\' + #p0")
List<LeaveBlock> getLeaveBlocksForDocumentId(String documentId)

getLeaveBlocks

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLeaveBlocks}\' + \'principalId=\' + #p0 + \'|\' + \'beginDate=\' + #p1 + \'|\' + \'endDate=\' + #p2")
List<LeaveBlock> getLeaveBlocks(String principalId,
                                          org.joda.time.LocalDate beginDate,
                                          org.joda.time.LocalDate endDate)

getLeaveBlocksWithType

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLeaveBlocksWithType}\' + \'principalId=\' + #p0 + \'|\' + \'beginDate=\' + #p1 + \'|\' + \'endDate=\' + #p2 + \'|\' + \'leaveBlockType=\' + #p3")
List<LeaveBlock> getLeaveBlocksWithType(String principalId,
                                                  org.joda.time.LocalDate beginDate,
                                                  org.joda.time.LocalDate endDate,
                                                  String leaveBlockType)

getLeaveBlocksWithAccrualCategory

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLeaveBlocksWithAccrualCategory}\' + \'principalId=\' + #p0 + \'|\' + \'beginDate=\' + #p1 + \'|\' + \'endDate=\' + #p2 + \'|\' + \'accrualCategory=\' + #p3")
List<LeaveBlock> getLeaveBlocksWithAccrualCategory(String principalId,
                                                             org.joda.time.LocalDate beginDate,
                                                             org.joda.time.LocalDate endDate,
                                                             String accrualCategory)

getLeaveBlocksSinceCarryOver

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLeaveBlocksSinceCarryOver}\' + \'principalId=\' + #p0 + \'|\' + \'carryOverBlocks=\' + #p1 + \'|\' + \'endDate=\' + #p2 + \'|\' + \'includeAllAccrualCategories=\' + #p3")
List<LeaveBlock> getLeaveBlocksSinceCarryOver(String principalId,
                                                        Map<String,LeaveBlock> carryOverBlocks,
                                                        org.joda.time.LocalDate endDate,
                                                        boolean includeAllAccrualCategories)

getLastCarryOverBlocks

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLastCarryOverBlocks}\' + \'principalId=\' + #p0 + \'|\' + \'asOfDate=\' + #p1")
Map<String,LeaveBlock> getLastCarryOverBlocks(String principalId,
                                                        org.joda.time.LocalDate asOfDate)

saveLeaveBlocks

@CacheEvict(value="http://kpme.kuali.org/tklm/LeaveBlock",
            allEntries=true)
List<LeaveBlock> saveLeaveBlocks(List<LeaveBlock> leaveBlocks)

saveLeaveBlock

@CacheEvict(value="http://kpme.kuali.org/tklm/LeaveBlock",
            allEntries=true)
@Caching(evict={@CacheEvict(value="http://kpme.kuali.org/tklm/LeaveBlock",allEntries=true),@CacheEvict(value="http://kpme.kuali.org/core/CalendarBlockPermission",key="#p0.blockId")})
LeaveBlock saveLeaveBlock(LeaveBlock leaveBlock,
                                                                   String principalId)

deleteLeaveBlock

@Caching(evict={@CacheEvict(value="http://kpme.kuali.org/tklm/LeaveBlock",allEntries=true),@CacheEvict(value="http://kpme.kuali.org/core/CalendarBlockPermission",key="\'{leave}\' + #p0")})
void deleteLeaveBlock(String leaveBlockId,
                                                    String principalId)
The deletion marks the leave block inactive instead of removing the row from the database.

Parameters:
leaveBlockId -
principalId -

addLeaveBlocks

@CacheEvict(value="http://kpme.kuali.org/tklm/LeaveBlock",
            allEntries=true)
void 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)

updateLeaveBlock

@Caching(evict={@CacheEvict(value="http://kpme.kuali.org/tklm/LeaveBlock",allEntries=true),@CacheEvict(value="http://kpme.kuali.org/core/CalendarBlockPermission",key="#p0.getLmLeaveBlockId()")})
void updateLeaveBlock(LeaveBlock leaveBlock,
                                                    String principalId)

getLeaveBlocks

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLeaveBlocks}\' + \'principalId=\' + #p0 + \'|\' + \'leaveBlocktype=\' + #p1 + \'|\' + \'requestStatus=\' + #p2 + \'|\' + \'currentDate=\' + #p3")
List<LeaveBlock> getLeaveBlocks(String principalId,
                                          String leaveBlockType,
                                          String requestStatus,
                                          org.joda.time.LocalDate currentDate)
Parameters:
principalId -
leaveBlockType -
requestStatus -
currentDate - currentDate to get the records for the future date, pass null when not required
Returns:
List of LeaveBlocks

getLeaveBlocks

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLeaveBlocks}\' + \'principalId=\' + #p0 + \'|\' + \'leaveBlocktype=\' + #p1 + \'|\' + \'requestStatus=\' + #p2 + \'|\' + \'beginDate=\' + #p3 + \'|\' + \'endDate=\' + #p4")
List<LeaveBlock> getLeaveBlocks(String principalId,
                                          String leaveBlockType,
                                          String requestStatus,
                                          org.joda.time.LocalDate beginDate,
                                          org.joda.time.LocalDate endDate)
Parameters:
principalId -
leaveBlockType -
requestStatus -
beginDate -
endDate -
Returns:
List of LeaveBlocks

getLeaveBlocksForDate

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLeaveBlocksForDate}\' + \'principalId=\' + #p0 + \'|\' + \'leaveDate=\' + #p1")
List<LeaveBlock> getLeaveBlocksForDate(String principalId,
                                                 org.joda.time.LocalDate leaveDate)
Get the list of leave blocks from the given leaveDate for the principalId

Parameters:
principalId -
leaveDate -
Returns:
List of LeaveBlocks

getNotAccrualGeneratedLeaveBlocksForDate

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getNotAccrualGeneratedLeaveBlocksForDate}\' + \'principalId=\' + #p0 + \'|\' + \'leaveDate=\' + #p1")
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

Parameters:
principalId -
leaveDate -
Returns:
List of LeaveBlocks

getLeaveBlocksForTimeCalendar

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLeaveBlocksForTimeCalendar}\' + \'principalId=\' + #p0 + \'|\' + \'beginDate=\' + #p1 + \'|\' + \'endDate=\' + #p2 + \'|\' + \'assignmentKeys=\' + #p3")
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

Parameters:
principalId -
beginDate -
endDate -
assignmentKeys -
Returns:
List of leave blocks

getLeaveBlocksForLeaveCalendar

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getLeaveBlocksForLeaveCalendar}\' + \'principalId=\' + #p0 + \'|\' + \'beginDate=\' + #p1 + \'|\' + \'endDate=\' + #p2 + \'|\' + \'assignmentKeys=\' + #p3")
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

Parameters:
principalId -
beginDate -
endDate -
assignmentKeys -
Returns:
List of leave blocks

filterLeaveBlocksForTimeCalendar

List<LeaveBlock> filterLeaveBlocksForTimeCalendar(List<LeaveBlock> lbs,
                                                  List<String> assignmentKeys)
Filter list of leave blocks with given list of assignmentKeys for Time Calendar

Parameters:
lbs -
assignmentKeys -
Returns:
List of leave blocks

filterLeaveBlocksForLeaveCalendar

List<LeaveBlock> filterLeaveBlocksForLeaveCalendar(List<LeaveBlock> lbs,
                                                   List<String> assignmentKeys)
Filter list of leave blocks with given list of assignmentKeys for Leave Calendar

Parameters:
lbs -
assignmentKeys -
Returns:
List of leave blocks

deleteLeaveBlocksForDocumentId

void deleteLeaveBlocksForDocumentId(String documentId)
Delete time blocks for a given document id

Parameters:
documentId -

getAccrualGeneratedLeaveBlocks

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getAccrualGeneratedLeaveBlocks}\' + \'principalId=\' + #p0 + \'|\' + \'beginDate=\' + #p1 + \'|\' + \'endDate=\' + #p2")
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

Parameters:
principalId -
beginDate -
endDate -
Returns:
List of leave blocks

getSSTOLeaveBlocks

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getSSTOLeaveBlocks}\' + \'principalId=\' + #p0 + \'|\' + \'sstoId=\' + #p1 + \'|\' + \'accruleDate=\' + #p2")
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

Parameters:
principalId -
sstoId -
accruledDate -
Returns:

getABELeaveBlocksSinceTime

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getABELeaveBlocksSinceTime}\' + \'principalId=\' + #p0 + \'|\' + \'lastRanTime=\' + #p1")
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)

Parameters:
principalId -
lastRanTime -
Returns:

getTimeCalendarLeaveBlocksForTimeBlockLookup

@Cacheable(value="http://kpme.kuali.org/tklm/LeaveBlock",
           key="\'{getTimeCalendarLeaveBlocksForTimeBlockLookup}\' + \'documentId=\' + #p0 + \'|\' + \'principalId=\' + #p1 + \'|\' + \'userPrincipalId=\' + #p2 + \'|\' + \'fromDate=\' + #p3 + \'|\' + \'toDate=\' + #p4")
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.

Parameters:
documentId - 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 for
userPrincipalId - 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.leaveDate
toDate - optional upper bound date, exclusive. matches against LeaveBlock.leaveDate
Returns:

getLeaveBlocksForLookup

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.

Parameters:
documentId - 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 for
userPrincipalId - 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.leaveDate
toDate - optional upper bound date, exclusive. matches against LeaveBlock.leaveDate
leaveBlockType - optional Leave Block Type, exclusive. matches against LeaveBlock.leaveBlockType
Returns:


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