org.kuali.kfs.module.external.kc.service.impl
Class BudgetAdjustmentServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.external.kc.service.impl.BudgetAdjustmentServiceImpl
All Implemented Interfaces:
BudgetAdjustmentService

public class BudgetAdjustmentServiceImpl
extends Object
implements BudgetAdjustmentService


Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Constructor Summary
BudgetAdjustmentServiceImpl()
           
 
Method Summary
protected  boolean checkforEmptyField(BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatusDTO, String fieldName, String value, int lineNumber)
           
protected  org.kuali.rice.kns.document.Document createBADocument(BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatusDTO)
          This method will use the DocumentService to create a new document.
 BudgetAdjustmentCreationStatusDTO createBudgetAdjustment(BudgetAdjustmentParametersDTO budgetAdjustmentParameters)
          This is the web service method that facilitates budget adjustment 1.
protected  BudgetAdjustmentDocument createBudgetAdjustmentObject(BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatus)
          This method creates an account to be used for automatic maintenance document
protected  BudgetAdjustmentSourceAccountingLine createBudgetAdjustmentSourceAccountingLine(BudgetAdjustmentParametersDTO.Details detail, Integer postingYear)
           
protected  BudgetAdjustmentTargetAccountingLine createBudgetAdjustmentTargetAccountingLine(BudgetAdjustmentParametersDTO.Details detail, Integer postingYear)
           
protected  boolean generateIncomeAccountingLine(Integer postingYear, String sponsorType, BudgetAdjustmentDocument baDoc, org.kuali.rice.kns.util.KualiDecimal amount)
           
protected  org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          Gets the businessObjectService attribute.
protected  org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
           
protected  org.kuali.rice.kns.service.DocumentService getDocumentService()
          Gets the documentService attribute.
protected  org.kuali.rice.kns.service.ParameterService getParameterService()
          Gets the parameterService attribute.
protected  boolean isValidParameters(Integer postingFiscalYear, BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatusDTO, BudgetAdjustmentParametersDTO budgetAdjustmentParameters)
           
protected  boolean isValidUser(String principalId)
          This method check to see if the user can create the account maintenance document and set the user session
protected  void populateAccountingLine(BudgetAdjustmentAccountingLine acctLine, Integer postingYear, String chart, String accountNumber, String proj, String objCode, org.kuali.rice.kns.util.KualiDecimal currentBudgetAdjustmentAmount)
           
protected  boolean populateBudgetAdjustmentDocDetails(BudgetAdjustmentParametersDTO parameters, BudgetAdjustmentDocument budgetAdjustmentDocument, BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatus)
           
protected  boolean routeBudgetAdjustmentDocument(BudgetAdjustmentDocument budgetAdjustmentDocument, BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatus)
          This method processes the workflow document actions like save, route and blanket approve depending on the ACCOUNT_AUTO_CREATE_ROUTE system parameter value.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
           
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
          Sets the documentService attribute value.
protected  void setFailStatus(BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatusDTO, String message)
           
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

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

BudgetAdjustmentServiceImpl

public BudgetAdjustmentServiceImpl()
Method Detail

createBudgetAdjustment

public BudgetAdjustmentCreationStatusDTO createBudgetAdjustment(BudgetAdjustmentParametersDTO budgetAdjustmentParameters)
This is the web service method that facilitates budget adjustment 1. Creates a Budget Adjustment Doc using the parameters from KC 2. Returns the status object

Specified by:
createBudgetAdjustment in interface BudgetAdjustmentService
Parameters:
BudgetAdjustmentParametersDTO -
Returns:
BudgetAdjustmentStatusDTO

checkforEmptyField

protected boolean checkforEmptyField(BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatusDTO,
                                     String fieldName,
                                     String value,
                                     int lineNumber)

setFailStatus

protected void setFailStatus(BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatusDTO,
                             String message)

isValidParameters

protected boolean isValidParameters(Integer postingFiscalYear,
                                    BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatusDTO,
                                    BudgetAdjustmentParametersDTO budgetAdjustmentParameters)

createBudgetAdjustmentObject

protected BudgetAdjustmentDocument createBudgetAdjustmentObject(BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatus)
This method creates an account to be used for automatic maintenance document

Parameters:
AccountParametersDTO -
Returns:
Account

populateBudgetAdjustmentDocDetails

protected boolean populateBudgetAdjustmentDocDetails(BudgetAdjustmentParametersDTO parameters,
                                                     BudgetAdjustmentDocument budgetAdjustmentDocument,
                                                     BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatus)

populateAccountingLine

protected void populateAccountingLine(BudgetAdjustmentAccountingLine acctLine,
                                      Integer postingYear,
                                      String chart,
                                      String accountNumber,
                                      String proj,
                                      String objCode,
                                      org.kuali.rice.kns.util.KualiDecimal currentBudgetAdjustmentAmount)

createBudgetAdjustmentSourceAccountingLine

protected BudgetAdjustmentSourceAccountingLine createBudgetAdjustmentSourceAccountingLine(BudgetAdjustmentParametersDTO.Details detail,
                                                                                          Integer postingYear)

createBudgetAdjustmentTargetAccountingLine

protected BudgetAdjustmentTargetAccountingLine createBudgetAdjustmentTargetAccountingLine(BudgetAdjustmentParametersDTO.Details detail,
                                                                                          Integer postingYear)

generateIncomeAccountingLine

protected boolean generateIncomeAccountingLine(Integer postingYear,
                                               String sponsorType,
                                               BudgetAdjustmentDocument baDoc,
                                               org.kuali.rice.kns.util.KualiDecimal amount)

createBADocument

protected org.kuali.rice.kns.document.Document createBADocument(BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatusDTO)
This method will use the DocumentService to create a new document. The documentTypeName is gathered by using MaintenanceDocumentDictionaryService which uses Account class to get the document type name.

Parameters:
AccountCreationStatusDTO -
Returns:
document returns a new document for the account document type or null if there is an exception thrown.

routeBudgetAdjustmentDocument

protected boolean routeBudgetAdjustmentDocument(BudgetAdjustmentDocument budgetAdjustmentDocument,
                                                BudgetAdjustmentCreationStatusDTO budgetAdjustmentCreationStatus)
This method processes the workflow document actions like save, route and blanket approve depending on the ACCOUNT_AUTO_CREATE_ROUTE system parameter value. If the system parameter value is not of save or submit or blanketapprove, put an error message and quit. Throws an document WorkflowException if the specific document action fails to perform.

Parameters:
maintenanceAccountDocument, - errorMessages
Returns:
success returns true if the workflow document action is successful else return false.

isValidUser

protected boolean isValidUser(String principalId)
This method check to see if the user can create the account maintenance document and set the user session

Parameters:
String - principalId
Returns:
boolean

getDocumentService

protected org.kuali.rice.kns.service.DocumentService getDocumentService()
Gets the documentService attribute.

Returns:
Current value of documentService.

setDocumentService

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

Parameters:
documentService -

getParameterService

protected org.kuali.rice.kns.service.ParameterService getParameterService()
Gets the parameterService attribute.

Returns:
Returns the parameterService.

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
Sets the parameterService attribute value.

Parameters:
parameterService - The parameterService to set.

getDataDictionaryService

protected org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()

setDataDictionaryService

public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)

setBusinessObjectService

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

Parameters:
businessObjectService - The businessObjectService to set.

getBusinessObjectService

protected org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
Gets the businessObjectService attribute.

Returns:
Returns the businessObjectService.


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