org.kuali.kfs.module.ld.document.service.impl
Class SalaryTransferPeriodValidationServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.ld.document.service.impl.SalaryTransferPeriodValidationServiceImpl
All Implemented Interfaces:
SalaryTransferPeriodValidationService

@Transactional
public class SalaryTransferPeriodValidationServiceImpl
extends Object
implements SalaryTransferPeriodValidationService

See Also:
SalaryTransferPeriodValidationService

Constructor Summary
SalaryTransferPeriodValidationServiceImpl()
           
 
Method Summary
protected  void addAccountTransferAmount(Map<String,org.kuali.rice.kns.util.KualiDecimal> accountPeriodTransfer, ExpenseTransferAccountingLine transferLine, EffortCertificationReport effortReport)
          Adds the line amount to the given map that contains the total transfer amount for the account and period.
protected  boolean containsNecessaryData(ExpenseTransferAccountingLine transferLine)
          Verfies the given tranfer line contains the necessary data for performing the effort validations.
 void disapproveSalaryExpenseDocument(SalaryExpenseTransferDocument document)
          Disapproves the salary expense document due to effort validation errors.
protected  EffortCertificationReport getClosedReportingPeriod(ExpenseTransferAccountingLine transferLine)
          Checks list of report definitions for a closed period.
protected  List<EffortCertificationReport> getEffortReportDefinitionsForLine(ExpenseTransferAccountingLine transferLine)
          Gets open or closed report definitions for line pay period and pay type.
protected  List<EffortCertificationReport> getOpenReportDefinitions(List<EffortCertificationReport> effortReports)
          Returns the open report periods from the given list of report definitions.
protected  EffortCertificationReport getOpenReportingPeriod(ExpenseTransferAccountingLine transferLine)
          Checks list of report definitions for a open period.
protected  org.kuali.rice.kim.service.PersonService<org.kuali.rice.kim.bo.Person> getPersonService()
           
protected  boolean isCostShareSubAccount(ExpenseTransferAccountingLine transferLine)
          Checks the sub account type code against the values defined for cost share.
protected  EffortCertificationReport isEmployeeWithOpenCertification(ExpenseTransferAccountingLine transferLine, String emplid)
          Finds all open effort reports for the given transfer line, then checks if the given emplid has a certification for one of those open reports.
protected  void putError(String errorKey, ExpenseTransferAccountingLine transferLine, EffortCertificationReport report)
          Determines whether the error should be associated with the source or target lines, and builds up parameters for error message.
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
          Sets the documentService attribute value.
 void setEffortCertificationService(EffortCertificationModuleService effortCertificationService)
          Sets the effortCertificationService attribute value.
 void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
          Sets the kualiConfigurationService attribute value.
 void setNoteService(org.kuali.rice.kns.service.NoteService noteService)
          Sets the noteService attribute value.
 boolean validateTransfers(SalaryExpenseTransferDocument document)
          Checks the transfers that will be made by the expense lines do not impact an effort certification document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SalaryTransferPeriodValidationServiceImpl

public SalaryTransferPeriodValidationServiceImpl()
Method Detail

validateTransfers

public boolean validateTransfers(SalaryExpenseTransferDocument document)
Description copied from interface: SalaryTransferPeriodValidationService
Checks the transfers that will be made by the expense lines do not impact an effort certification document.

Specified by:
validateTransfers in interface SalaryTransferPeriodValidationService
Parameters:
document - - salary expense document to validate
Returns:
boolean indicating whether the transfer are valid (true) or not (false)
See Also:
SalaryTransferPeriodValidationService.validateTransfers(org.kuali.kfs.module.ld.document.SalaryExpenseTransferDocument)

disapproveSalaryExpenseDocument

public void disapproveSalaryExpenseDocument(SalaryExpenseTransferDocument document)
                                     throws Exception
Description copied from interface: SalaryTransferPeriodValidationService
Disapproves the salary expense document due to effort validation errors.

Specified by:
disapproveSalaryExpenseDocument in interface SalaryTransferPeriodValidationService
Parameters:
document - - document to cancel
Throws:
Exception
See Also:
SalaryTransferPeriodValidationService.disapproveSalaryExpenseDocument(org.kuali.kfs.module.ld.document.SalaryExpenseTransferDocument)

getClosedReportingPeriod

protected EffortCertificationReport getClosedReportingPeriod(ExpenseTransferAccountingLine transferLine)
Checks list of report definitions for a closed period.

Parameters:
transferLine - - transfer line to find report definition for
Returns:
closed report or null if one is not found

getOpenReportingPeriod

protected EffortCertificationReport getOpenReportingPeriod(ExpenseTransferAccountingLine transferLine)
Checks list of report definitions for a open period.

Parameters:
transferLine - - transfer line to find report definition for
Returns:
open report or null if one is not found

getOpenReportDefinitions

protected List<EffortCertificationReport> getOpenReportDefinitions(List<EffortCertificationReport> effortReports)
Returns the open report periods from the given list of report definitions.

Parameters:
effortReports - - list of report definitions that are either open or closed
Returns:
open effort report definitions

isCostShareSubAccount

protected boolean isCostShareSubAccount(ExpenseTransferAccountingLine transferLine)
Checks the sub account type code against the values defined for cost share.

Parameters:
transferLine - - line with sub account to check
Returns:
true if sub account is cost share, false otherwise

isEmployeeWithOpenCertification

protected EffortCertificationReport isEmployeeWithOpenCertification(ExpenseTransferAccountingLine transferLine,
                                                                    String emplid)
Finds all open effort reports for the given transfer line, then checks if the given emplid has a certification for one of those open reports.

Parameters:
transferLine - - line to find open reports for
emplid - - emplid to check for certification
Returns:
report which emplid has certification, or null

addAccountTransferAmount

protected void addAccountTransferAmount(Map<String,org.kuali.rice.kns.util.KualiDecimal> accountPeriodTransfer,
                                        ExpenseTransferAccountingLine transferLine,
                                        EffortCertificationReport effortReport)
Adds the line amount to the given map that contains the total transfer amount for the account and period.

Parameters:
accountPeriodTransfer - - map holding the total transfers
effortReport - - open report for transfer line
transferLine - - line with amount to add

getEffortReportDefinitionsForLine

protected List<EffortCertificationReport> getEffortReportDefinitionsForLine(ExpenseTransferAccountingLine transferLine)
Gets open or closed report definitions for line pay period and pay type.

Parameters:
transferLine - - line to pull pay period and type from
Returns:
- open or closed effort reports for period and type

containsNecessaryData

protected boolean containsNecessaryData(ExpenseTransferAccountingLine transferLine)
Verfies the given tranfer line contains the necessary data for performing the effort validations.

Parameters:
transferLine - - line to check

putError

protected void putError(String errorKey,
                        ExpenseTransferAccountingLine transferLine,
                        EffortCertificationReport report)
Determines whether the error should be associated with the source or target lines, and builds up parameters for error message.

Parameters:
errorKey - - key for the error message
transferLine - - transfer line which had error
report - - report which conflicted with line

setDocumentService

public void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
Sets the documentService attribute value.

Parameters:
documentService - The documentService to set.

setEffortCertificationService

public void setEffortCertificationService(EffortCertificationModuleService effortCertificationService)
Sets the effortCertificationService attribute value.

Parameters:
effortCertificationService - The effortCertificationService to set.

setNoteService

public void setNoteService(org.kuali.rice.kns.service.NoteService noteService)
Sets the noteService attribute value.

Parameters:
noteService - The noteService to set.

setKualiConfigurationService

public void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
Sets the kualiConfigurationService attribute value.

Parameters:
kualiConfigurationService - The kualiConfigurationService to set.

getPersonService

protected org.kuali.rice.kim.service.PersonService<org.kuali.rice.kim.bo.Person> getPersonService()
Returns:
Returns the personService.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.