org.kuali.kfs.module.ec.service.impl
Class EffortCertificationDocumentServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.ec.service.impl.EffortCertificationDocumentServiceImpl
All Implemented Interfaces:
EffortCertificationDocumentService

@Transactional
public class EffortCertificationDocumentServiceImpl
extends Object
implements EffortCertificationDocumentService

To implement the services related to the effort certification document


Field Summary
static org.apache.log4j.Logger LOG
           
 
Constructor Summary
EffortCertificationDocumentServiceImpl()
           
 
Method Summary
protected  void addAccountingLineIntoList(List<LaborLedgerExpenseTransferAccountingLine> accountingLineList, LaborLedgerExpenseTransferAccountingLine accountingLine, EffortCertificationDocument effortCertificationDocument, EffortCertificationDetail detailLine)
          add a new accounting line into the given accounting line list.
protected  void addAdHocRoutePerson(Collection<org.kuali.rice.kns.bo.AdHocRoutePerson> adHocRoutePersonList, Set<org.kuali.rice.kim.bo.Person> priorApprovers, org.kuali.rice.kns.bo.AdHocRoutePerson adHocRoutePerson)
           
 void addRouteLooping(EffortCertificationDocument effortCertificationDocument)
          add the adHoc route recipient into the given document when the effort on any detail line has been changed.
protected  org.kuali.rice.kns.bo.AdHocRoutePerson buildAdHocRouteRecipient(String personUserId, String actionRequest)
          build an adhoc route recipient from the given person user id and action request
protected  List<LaborLedgerExpenseTransferAccountingLine> buildSourceAccountingLines(EffortCertificationDocument effortCertificationDocument)
          build the source accounting lines for a salary expense transfer document from the given effort certification document.
protected  List<LaborLedgerExpenseTransferAccountingLine> buildTargetAccountingLines(EffortCertificationDocument effortCertificationDocument)
          build the target accounting lines for a salary expense transfer document from the given effort certification document.
 boolean createAndRouteEffortCertificationDocument(EffortCertificationDocumentBuild effortCertificationDocumentBuild)
          create an effort certification document from the given document build record, and route it for approval
 boolean generateSalaryExpenseTransferDocument(EffortCertificationDocument effortCertificationDocument)
          generate salary expense transfer document from the given effort certification document
protected  String getActionRequest(String routeLevelName, String expectedRouteLevelName)
          determine the action request according to the current route level and expected route level
protected  org.kuali.rice.kns.util.KualiDecimal getDifference(EffortCertificationDetail detailLine)
          get the difference between the original amount and updated amount of the given detail line
protected  Set<String> getFiscalOfficersIfAmountChanged(EffortCertificationDocument effortCertificationDocument)
          get all fiscal officers of the detail line accounts where the salary amounts are changed
protected  Set<org.kuali.rice.kim.bo.Person> getPriorApprovers(org.kuali.rice.kns.workflow.service.KualiWorkflowDocument workflowDocument)
           
protected  boolean isSameAdHocRoutePerson(org.kuali.rice.kns.bo.AdHocRoutePerson person1, org.kuali.rice.kns.bo.AdHocRoutePerson person2)
           
protected  void populateAccountingLine(EffortCertificationDocument effortCertificationDocument, EffortCertificationDetail detailLine, LaborLedgerExpenseTransferAccountingLine accountingLine)
          populate an accounting line from the given detail line
 boolean populateEffortCertificationDocument(EffortCertificationDocument effortCertificationDocument, EffortCertificationDocumentBuild effortCertificationDocumentBuild)
          populate the given effort certification document with the given effort certification document build
 void processApprovedEffortCertificationDocument(EffortCertificationDocument effortCertificationDocument)
          process the approved effort certification document
 void removeEffortCertificationDetailLines(EffortCertificationDocument effortCertificationDocument)
          delete the detail lines associated with the given effort certification document if they have been persisted
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setContractsAndGrantsModuleService(ContractsAndGrantsModuleService contractsAndGrantsModuleService)
          Sets the contractsAndGrantsModuleService attribute value.
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
          Sets the documentService attribute value.
 void setKualiModuleService(org.kuali.rice.kns.service.KualiModuleService kualiModuleService)
          Sets the kualiModuleService attribute value.
 void setLaborModuleService(LaborModuleService laborModuleService)
          Sets the laborModuleService attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static org.apache.log4j.Logger LOG
Constructor Detail

EffortCertificationDocumentServiceImpl

public EffortCertificationDocumentServiceImpl()
Method Detail

processApprovedEffortCertificationDocument

public void processApprovedEffortCertificationDocument(EffortCertificationDocument effortCertificationDocument)
Description copied from interface: EffortCertificationDocumentService
process the approved effort certification document

Specified by:
processApprovedEffortCertificationDocument in interface EffortCertificationDocumentService
Parameters:
effortCertificationDocument - the approved effort certification document
See Also:
EffortCertificationDocumentService.processApprovedEffortCertificationDocument(org.kuali.kfs.module.ec.document.EffortCertificationDocument)

createAndRouteEffortCertificationDocument

public boolean createAndRouteEffortCertificationDocument(EffortCertificationDocumentBuild effortCertificationDocumentBuild)
Description copied from interface: EffortCertificationDocumentService
create an effort certification document from the given document build record, and route it for approval

Specified by:
createAndRouteEffortCertificationDocument in interface EffortCertificationDocumentService
Parameters:
effortCertificationDocumentBuild - the given effort certification document build
See Also:
EffortCertificationDocumentService.createAndRouteEffortCertificationDocument(org.kuali.kfs.module.ec.businessobject.EffortCertificationDocumentBuild)

populateEffortCertificationDocument

public boolean populateEffortCertificationDocument(EffortCertificationDocument effortCertificationDocument,
                                                   EffortCertificationDocumentBuild effortCertificationDocumentBuild)
Description copied from interface: EffortCertificationDocumentService
populate the given effort certification document with the given effort certification document build

Specified by:
populateEffortCertificationDocument in interface EffortCertificationDocumentService
Parameters:
effortCertificationDocument - the given effort certification document
effortCertificationDocumentBuild - the given effort certification document build
Returns:
true if the given document has been populated sucessfully; otherwise, false
See Also:
EffortCertificationDocumentService.populateEffortCertificationDocument(org.kuali.kfs.module.ec.document.EffortCertificationDocument, org.kuali.kfs.module.ec.businessobject.EffortCertificationDocumentBuild)

removeEffortCertificationDetailLines

public void removeEffortCertificationDetailLines(EffortCertificationDocument effortCertificationDocument)
Description copied from interface: EffortCertificationDocumentService
delete the detail lines associated with the given effort certification document if they have been persisted

Specified by:
removeEffortCertificationDetailLines in interface EffortCertificationDocumentService
Parameters:
effortCertificationDocument - the given effort certification document
See Also:
org.kuali.kfs.module.ec.service.EffortCertificationDocumentService#resetEffortCertificationDetailLines(org.kuali.kfs.module.ec.document.EffortCertificationDocument)

generateSalaryExpenseTransferDocument

public boolean generateSalaryExpenseTransferDocument(EffortCertificationDocument effortCertificationDocument)
Description copied from interface: EffortCertificationDocumentService
generate salary expense transfer document from the given effort certification document

Specified by:
generateSalaryExpenseTransferDocument in interface EffortCertificationDocumentService
Parameters:
effortCertificationDocument - the given effort certification document
Returns:
true if the generation is complete successfully; otherwise, return false
See Also:
EffortCertificationDocumentService.generateSalaryExpenseTransferDocument(org.kuali.kfs.module.ec.document.EffortCertificationDocument)

addRouteLooping

public void addRouteLooping(EffortCertificationDocument effortCertificationDocument)
Description copied from interface: EffortCertificationDocumentService
add the adHoc route recipient into the given document when the effort on any detail line has been changed.

Specified by:
addRouteLooping in interface EffortCertificationDocumentService
Parameters:
effortCertificationDocument - the given effort certification document
See Also:
EffortCertificationDocumentService.addRouteLooping(org.kuali.kfs.module.ec.document.EffortCertificationDocument)

addAdHocRoutePerson

protected void addAdHocRoutePerson(Collection<org.kuali.rice.kns.bo.AdHocRoutePerson> adHocRoutePersonList,
                                   Set<org.kuali.rice.kim.bo.Person> priorApprovers,
                                   org.kuali.rice.kns.bo.AdHocRoutePerson adHocRoutePerson)

isSameAdHocRoutePerson

protected boolean isSameAdHocRoutePerson(org.kuali.rice.kns.bo.AdHocRoutePerson person1,
                                         org.kuali.rice.kns.bo.AdHocRoutePerson person2)

getPriorApprovers

protected Set<org.kuali.rice.kim.bo.Person> getPriorApprovers(org.kuali.rice.kns.workflow.service.KualiWorkflowDocument workflowDocument)

getActionRequest

protected String getActionRequest(String routeLevelName,
                                  String expectedRouteLevelName)
determine the action request according to the current route level and expected route level

Parameters:
routeLevelName - the current route level
expectedRouteLevelName - the expected route level
Returns:
the action request determined from the current route level and expected route level

buildAdHocRouteRecipient

protected org.kuali.rice.kns.bo.AdHocRoutePerson buildAdHocRouteRecipient(String personUserId,
                                                                          String actionRequest)
build an adhoc route recipient from the given person user id and action request

Parameters:
personUserId - the given person user id
actionRequest - the given action request
Returns:
an adhoc route recipient built from the given information

buildSourceAccountingLines

protected List<LaborLedgerExpenseTransferAccountingLine> buildSourceAccountingLines(EffortCertificationDocument effortCertificationDocument)
build the source accounting lines for a salary expense transfer document from the given effort certification document. In the holder, the first item is source accounting line list and the second the target accounting line list.

Parameters:
effortCertificationDocument - the given effort certification document
Returns:
the source accounting lines for a salary expense transfer document built from the given effort certification document

buildTargetAccountingLines

protected List<LaborLedgerExpenseTransferAccountingLine> buildTargetAccountingLines(EffortCertificationDocument effortCertificationDocument)
build the target accounting lines for a salary expense transfer document from the given effort certification document. In the holder, the first item is source accounting line list and the second the target accounting line list.

Parameters:
effortCertificationDocument - the given effort certification document
Returns:
the target accounting lines for a salary expense transfer document built from the given effort certification document

getFiscalOfficersIfAmountChanged

protected Set<String> getFiscalOfficersIfAmountChanged(EffortCertificationDocument effortCertificationDocument)
get all fiscal officers of the detail line accounts where the salary amounts are changed

Parameters:
effortCertificationDocument - the given document that contains the detail lines
Returns:
all fiscal officers of the detail line accounts where the salary amounts are changed

addAccountingLineIntoList

protected void addAccountingLineIntoList(List<LaborLedgerExpenseTransferAccountingLine> accountingLineList,
                                         LaborLedgerExpenseTransferAccountingLine accountingLine,
                                         EffortCertificationDocument effortCertificationDocument,
                                         EffortCertificationDetail detailLine)
add a new accounting line into the given accounting line list. The accounting line is generated from the given detail line

Parameters:
accountingLines - a list of accounting lines
clazz - the specified class of the accounting line
effortCertificationDocument - the given effort certification document that contains the given detail line
detailLine - the given detail line that is used to generate an accounting line

populateAccountingLine

protected void populateAccountingLine(EffortCertificationDocument effortCertificationDocument,
                                      EffortCertificationDetail detailLine,
                                      LaborLedgerExpenseTransferAccountingLine accountingLine)
populate an accounting line from the given detail line

Parameters:
effortCertificationDocument - the given effort certification document that contains the given detail line
detailLine - the given detail line
accountingLine - the accounting line needed to be populated

getDifference

protected org.kuali.rice.kns.util.KualiDecimal getDifference(EffortCertificationDetail detailLine)
get the difference between the original amount and updated amount of the given detail line

Parameters:
detailLine - the given detail line
Returns:
the difference between the original amount and updated amount of the given detail line

setLaborModuleService

public void setLaborModuleService(LaborModuleService laborModuleService)
Sets the laborModuleService attribute value.

Parameters:
laborModuleService - The laborModuleService to set.

setDocumentService

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

Parameters:
documentService - The documentService to set.

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.

Parameters:
businessObjectService - The businessObjectService to set.

setContractsAndGrantsModuleService

public void setContractsAndGrantsModuleService(ContractsAndGrantsModuleService contractsAndGrantsModuleService)
Sets the contractsAndGrantsModuleService attribute value.

Parameters:
contractsAndGrantsModuleService - The contractsAndGrantsModuleService to set.

setKualiModuleService

public void setKualiModuleService(org.kuali.rice.kns.service.KualiModuleService kualiModuleService)
Sets the kualiModuleService attribute value.

Parameters:
kualiModuleService - The kualiModuleService to set.


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