org.kuali.hr.lm.balancetransfer.service
Class BalanceTransferServiceImpl

java.lang.Object
  extended by org.kuali.hr.lm.balancetransfer.service.BalanceTransferServiceImpl
All Implemented Interfaces:
BalanceTransferService

public class BalanceTransferServiceImpl
extends Object
implements BalanceTransferService


Constructor Summary
BalanceTransferServiceImpl()
           
 
Method Summary
 List<BalanceTransfer> getAllBalanceTransferByEffectiveDate(Date effectiveDate)
           
 List<BalanceTransfer> getAllBalanceTransferForPrincipalIdAsOfDate(String principalId, Date effectiveDate)
           
 List<BalanceTransfer> getAllBalanceTransfersForPrincipalId(String principalId)
           
 BalanceTransfer getBalanceTransferById(String balanceTransferId)
           
 BalanceTransferDao getBalanceTransferDao()
           
 List<BalanceTransfer> getBalanceTransfers(String viewPrincipal, Date beginPeriodDate, Date endPeriodDate)
           
 Map<String,ArrayList<String>> getEligibleTransfers(CalendarEntries calendarEntry, String principalId)
          Determines which accrual categories within the given leave calendar document, are TRANSFERABLE for the given action frequency.
 BalanceTransfer initializeTransfer(String principalId, String accrualCategoryRule, BigDecimal accruedBalance, Date effectiveDate)
          A service that instantiates and returns BalanceTransfer objects that follow the given accrual category rule.
 void saveOrUpdate(BalanceTransfer balanceTransfer)
           
 void setBalanceTransferDao(BalanceTransferDao balanceTransferDao)
           
 void submitToWorkflow(BalanceTransfer balanceTransfer)
           
 BalanceTransfer transfer(BalanceTransfer balanceTransfer)
          Consumes a BalanceTransfer object, creating up to three leave blocks.
 BalanceTransfer transferSsto(BalanceTransfer balanceTransfer)
          transfer system scheduled time off
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BalanceTransferServiceImpl

public BalanceTransferServiceImpl()
Method Detail

getAllBalanceTransfersForPrincipalId

public List<BalanceTransfer> getAllBalanceTransfersForPrincipalId(String principalId)
Specified by:
getAllBalanceTransfersForPrincipalId in interface BalanceTransferService

getAllBalanceTransferForPrincipalIdAsOfDate

public List<BalanceTransfer> getAllBalanceTransferForPrincipalIdAsOfDate(String principalId,
                                                                         Date effectiveDate)
Specified by:
getAllBalanceTransferForPrincipalIdAsOfDate in interface BalanceTransferService

getAllBalanceTransferByEffectiveDate

public List<BalanceTransfer> getAllBalanceTransferByEffectiveDate(Date effectiveDate)
Specified by:
getAllBalanceTransferByEffectiveDate in interface BalanceTransferService

getBalanceTransferById

public BalanceTransfer getBalanceTransferById(String balanceTransferId)
Specified by:
getBalanceTransferById in interface BalanceTransferService

initializeTransfer

public BalanceTransfer initializeTransfer(String principalId,
                                          String accrualCategoryRule,
                                          BigDecimal accruedBalance,
                                          Date effectiveDate)
Description copied from interface: BalanceTransferService
A service that instantiates and returns BalanceTransfer objects that follow the given accrual category rule.

Specified by:
initializeTransfer in interface BalanceTransferService
Parameters:
principalId - The principal this transfer pertains to.
accrualCategoryRule - The accrual category rule that contains the max balance information.
accruedBalance - Holds balance information needed for transfer.
Returns:
A BalanceTransfer object conforming to @param accrualCategoryRule, if one exists. Null otherwise. The transfer amount will be the minimum of: 1.) the accrual category rule's maximum transfer amount, adjusted for the employees FTE. 2.) the number of time units exceeding the maximum balance

transfer

public BalanceTransfer transfer(BalanceTransfer balanceTransfer)
Description copied from interface: BalanceTransferService
Consumes a BalanceTransfer object, creating up to three leave blocks.

Specified by:
transfer in interface BalanceTransferService
Parameters:
balanceTransfer - The BalanceTransfer object to use for transfer.
Returns:
The same BalanceTransfer object, but with associated leave block ids.

getEligibleTransfers

public Map<String,ArrayList<String>> getEligibleTransfers(CalendarEntries calendarEntry,
                                                          String principalId)
                                                   throws Exception
Description copied from interface: BalanceTransferService
Determines which accrual categories within the given leave calendar document, are TRANSFERABLE for the given action frequency. Includes accrual categories for which ACTION_AT_MAX_BALANCE = LOSE.

Specified by:
getEligibleTransfers in interface BalanceTransferService
Returns:
A List of accrualCategoryRuleId's in 's leave summary with MAX_BAL_ACTION_FREQUENCY =
Throws:
Exception

getBalanceTransferDao

public BalanceTransferDao getBalanceTransferDao()

setBalanceTransferDao

public void setBalanceTransferDao(BalanceTransferDao balanceTransferDao)

submitToWorkflow

public void submitToWorkflow(BalanceTransfer balanceTransfer)
                      throws org.kuali.rice.kew.api.exception.WorkflowException
Specified by:
submitToWorkflow in interface BalanceTransferService
Throws:
org.kuali.rice.kew.api.exception.WorkflowException

transferSsto

public BalanceTransfer transferSsto(BalanceTransfer balanceTransfer)
Description copied from interface: BalanceTransferService
transfer system scheduled time off

Specified by:
transferSsto in interface BalanceTransferService
Returns:

getBalanceTransfers

public List<BalanceTransfer> getBalanceTransfers(String viewPrincipal,
                                                 Date beginPeriodDate,
                                                 Date endPeriodDate)
Specified by:
getBalanceTransfers in interface BalanceTransferService

saveOrUpdate

public void saveOrUpdate(BalanceTransfer balanceTransfer)
Specified by:
saveOrUpdate in interface BalanceTransferService


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