org.kuali.kfs.fp.batch.service.impl
Class DistributionOfIncomeAndExpenseElectronicPaymentClaimingHelperStrategyImpl

java.lang.Object
  extended by org.kuali.kfs.fp.batch.service.impl.DistributionOfIncomeAndExpenseElectronicPaymentClaimingHelperStrategyImpl
All Implemented Interfaces:
ElectronicPaymentClaimingDocumentGenerationStrategy
Direct Known Subclasses:
YearEndDistributionOfIncomeAndExpenseElectronicPaymentClaimingHelperStrategyImpl

public class DistributionOfIncomeAndExpenseElectronicPaymentClaimingHelperStrategyImpl
extends Object
implements ElectronicPaymentClaimingDocumentGenerationStrategy


Constructor Summary
DistributionOfIncomeAndExpenseElectronicPaymentClaimingHelperStrategyImpl()
           
 
Method Summary
protected  void addAccountingLinesToDocument(DistributionOfIncomeAndExpenseDocument document, List<ElectronicPaymentClaim> electronicPayments)
          Adds an accounting line to the document for each ElectronicPaymentClaim record that is being added
protected  void addDescriptionToDocument(DistributionOfIncomeAndExpenseDocument document)
          Adds the parameterized description to the document, so the doc can be saved
protected  void addNotesToDocument(DistributionOfIncomeAndExpenseDocument claimingDoc, List<ElectronicPaymentClaim> claims, org.kuali.rice.kim.bo.Person user)
          Creates notes for the claims (using the ElectronicPaymentClaimingService) and then adds them to the document
protected  SourceAccountingLine copyAccountingLineToNew(SourceAccountingLine line, SourceAccountingLine newLine)
          Copies an original accounting line to a new accounting line
 String createDocumentFromElectronicPayments(List<ElectronicPaymentClaim> electronicPayments, org.kuali.rice.kim.bo.Person user)
          Creates a document to claim a given list of ElectronicPaymentClaim records.
protected  SourceAccountingLine createNewAccountingLineForDocument(DistributionOfIncomeAndExpenseDocument document)
          Creates a new accounting line, based on what the source accounting line class for the document is
 String getClaimingDocumentWorkflowDocumentType()
          get the workflow document type code of the claiming document
 org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
          Gets the dataDictionaryService attribute.
 String getDocumentLabel()
          Uses the data dictionary to find the label for this document
protected  String getUrlDocType()
           
protected  String getURLForDocument(DistributionOfIncomeAndExpenseDocument doc)
          Builds the URL that can be used to redirect to the correct document
 boolean isDocumentReferenceValid(String referenceDocumentNumber)
          Determines whether the given document number would be considered valid by the system that the document this strategy interacts with
 void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
          Sets the ddService attribute value.
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
          Sets the documentService attribute value.
 void setElectronicPaymentClaimingService(ElectronicPaymentClaimingService electronicPaymentClaimingService)
          Sets the electronicPaymentClaimingService attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
 boolean userMayUseToClaim(org.kuali.rice.kim.bo.Person claimingUser)
          This always returns true if the given user in the claiming workgroup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributionOfIncomeAndExpenseElectronicPaymentClaimingHelperStrategyImpl

public DistributionOfIncomeAndExpenseElectronicPaymentClaimingHelperStrategyImpl()
Method Detail

createDocumentFromElectronicPayments

public String createDocumentFromElectronicPayments(List<ElectronicPaymentClaim> electronicPayments,
                                                   org.kuali.rice.kim.bo.Person user)
Description copied from interface: ElectronicPaymentClaimingDocumentGenerationStrategy
Creates a document to claim a given list of ElectronicPaymentClaim records.

Specified by:
createDocumentFromElectronicPayments in interface ElectronicPaymentClaimingDocumentGenerationStrategy
Parameters:
electronicPayments - a List of ElectronicPaymentClaim records
user - the user doing the claiming
Returns:
the absolute URL that should be redirected to, so that the user can edit the document
See Also:
org.kuali.kfs.sys.service.ElectronicPaymentClaimingDocumentGenerationStrategy#createDocumentFromElectronicPayments(java.util.List)

getURLForDocument

protected String getURLForDocument(DistributionOfIncomeAndExpenseDocument doc)
Builds the URL that can be used to redirect to the correct document

Parameters:
doc - the document to build the URL for
Returns:
the relative URL to redirect to

addNotesToDocument

protected void addNotesToDocument(DistributionOfIncomeAndExpenseDocument claimingDoc,
                                  List<ElectronicPaymentClaim> claims,
                                  org.kuali.rice.kim.bo.Person user)
Creates notes for the claims (using the ElectronicPaymentClaimingService) and then adds them to the document

Parameters:
claimingDoc - the claiming document
claims - the electronic payments being claimed
user - the user doing the claiming

addAccountingLinesToDocument

protected void addAccountingLinesToDocument(DistributionOfIncomeAndExpenseDocument document,
                                            List<ElectronicPaymentClaim> electronicPayments)
Adds an accounting line to the document for each ElectronicPaymentClaim record that is being added

Parameters:
document - the claiming Distribution of Income and Expense document
electronicPayments - the list of ElectronicPaymentClaim records that are being claimed

addDescriptionToDocument

protected void addDescriptionToDocument(DistributionOfIncomeAndExpenseDocument document)
Adds the parameterized description to the document, so the doc can be saved

Parameters:
document - the document to add a description to

createNewAccountingLineForDocument

protected SourceAccountingLine createNewAccountingLineForDocument(DistributionOfIncomeAndExpenseDocument document)
Creates a new accounting line, based on what the source accounting line class for the document is

Parameters:
document - the document that is claiming these payments
Returns:
a new, ready-to-be-filled in accounting line of the class that the given document uses for Source Accounting Lines

copyAccountingLineToNew

protected SourceAccountingLine copyAccountingLineToNew(SourceAccountingLine line,
                                                       SourceAccountingLine newLine)
Copies an original accounting line to a new accounting line

Parameters:
line - the original accounting line
Returns:
an accounting line that copies that accounting line

getClaimingDocumentWorkflowDocumentType

public String getClaimingDocumentWorkflowDocumentType()
Description copied from interface: ElectronicPaymentClaimingDocumentGenerationStrategy
get the workflow document type code of the claiming document

Specified by:
getClaimingDocumentWorkflowDocumentType in interface ElectronicPaymentClaimingDocumentGenerationStrategy
Returns:
the name DistributionOfIncomeAndExpenseDocument workflow document type
See Also:
ElectronicPaymentClaimingDocumentGenerationStrategy.getClaimingDocumentWorkflowDocumentType()

getUrlDocType

protected String getUrlDocType()
Returns:
the class of the document which claims these electronic payments

getDocumentLabel

public String getDocumentLabel()
Uses the data dictionary to find the label for this document

Specified by:
getDocumentLabel in interface ElectronicPaymentClaimingDocumentGenerationStrategy
Returns:
a label
See Also:
ElectronicPaymentClaimingDocumentGenerationStrategy.getDocumentLabel()

userMayUseToClaim

public boolean userMayUseToClaim(org.kuali.rice.kim.bo.Person claimingUser)
This always returns true if the given user in the claiming workgroup.

Specified by:
userMayUseToClaim in interface ElectronicPaymentClaimingDocumentGenerationStrategy
Parameters:
claimingUser - the user attempting to claim ElectronicPaymentClaim records with a document
Returns:
true if the user can use this kind of document to claim ElectronicPaymentClaim records, false otherwise
See Also:
ElectronicPaymentClaimingDocumentGenerationStrategy.userMayUseToClaim(org.kuali.rice.kim.bo.Person)

isDocumentReferenceValid

public boolean isDocumentReferenceValid(String referenceDocumentNumber)
Description copied from interface: ElectronicPaymentClaimingDocumentGenerationStrategy
Determines whether the given document number would be considered valid by the system that the document this strategy interacts with

Specified by:
isDocumentReferenceValid in interface ElectronicPaymentClaimingDocumentGenerationStrategy
Parameters:
referenceDocumentNumber - the document number reference to validate
Returns:
true if the document reference is considered valid, false otherwise
See Also:
ElectronicPaymentClaimingDocumentGenerationStrategy.isDocumentReferenceValid(java.lang.String)

setDataDictionaryService

public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
Sets the ddService attribute value.

Parameters:
ddService - The ddService to set.

getDataDictionaryService

public org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
Gets the dataDictionaryService attribute.

Returns:
Returns the dataDictionaryService.

setDocumentService

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

Parameters:
documentService - The documentService to set.

setElectronicPaymentClaimingService

public void setElectronicPaymentClaimingService(ElectronicPaymentClaimingService electronicPaymentClaimingService)
Sets the electronicPaymentClaimingService attribute value.

Parameters:
electronicPaymentClaimingService - The electronicPaymentClaimingService to set.

setParameterService

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

Parameters:
parameterService - The parameterService to set.


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