org.kuali.kfs.sys.service.impl
Class ElectronicPaymentClaimingServiceImpl

java.lang.Object
  extended by org.kuali.kfs.sys.service.impl.ElectronicPaymentClaimingServiceImpl
All Implemented Interfaces:
ElectronicPaymentClaimingService

public class ElectronicPaymentClaimingServiceImpl
extends Object
implements ElectronicPaymentClaimingService


Field Summary
protected static String CLAIMING_DOC_HELPER_BEAN_NAME
           
protected static String CLAIMING_NOTE_PRELUDE
           
protected static String DI_CLAIMING_DOC_HELPER_BEAN_NAME
           
protected static String ELECTRONIC_FUNDS_CLAIM_SUMMARIES_PER_NOTE_PARAMETER
           
protected static String ELECTRONIC_FUNDS_CLAIMANT_GROUP_PARAMETER
           
protected static String ELECTRONIC_PAYMENT_ADMINISTRATOR_GROUP_PARAM_NAME
           
protected static String ELECTRONIC_PAYMENT_CLAIM_ACCOUNTS_PARAMETER
           
protected static String YEDI_CLAIMING_DOC_HELPER_BEAN_NAME
           
 
Constructor Summary
ElectronicPaymentClaimingServiceImpl()
           
 
Method Summary
 void claimElectronicPayments(List<ElectronicPaymentClaim> payments, String documentNumber)
          Sets the referenceFinancialDocumentNumber on each of the payments passed in with the given document number and then saves them.
protected  String constructNoteText(List<ElectronicPaymentClaim> claims, int startPoint, int maxSummariesPerNote)
          This creates a note for the given point in the list of summaries.
 List<String> constructNoteTextsForClaims(List<ElectronicPaymentClaim> claims)
          Constructs a List of Notes that detail which ElectronicPaymentClaim records have been claimed by a document
protected  ElectronicPaymentClaim createElectronicPayment(AdvanceDepositDocument document, AccountingLine accountingLine)
          Creates an electronic payment claim record to match the given accounting line on the document
 String createPaymentClaimingDocument(List<ElectronicPaymentClaim> claims, ElectronicPaymentClaimingDocumentGenerationStrategy documentCreationHelper, org.kuali.rice.kim.bo.Person user)
          Given a List of ElectronicPaymentClaim records and a ElectronicPaymentClaimingDocumentGenerationStrategy document helper implementation, creates a document that will claim; this method should also do the work of "claiming" each of the given ElectronicPaymentClaim records by filling in their referenceFinancialDocumentNumber field.
protected  String createSummaryLineForClaim(ElectronicPaymentClaim claim)
          Creates a summary line for a note from a claim
 void declaimElectronicPaymentClaimsForDocument(org.kuali.rice.kns.document.Document document)
          Unclaims all ElectronicPaymentClaim records claimed by the given document, by setting the ElectronicPaymentClaim's reference document to null.
 List<ElectronicPaymentClaim> generateElectronicPaymentClaimRecords(AdvanceDepositDocument doc)
          Returns a list of SAVED electronic payment claims from the lines of an AdvanceDepositDocument
 List<ElectronicPaymentClaimingDocumentGenerationStrategy> getClaimingDocumentChoices(org.kuali.rice.kim.bo.Person user)
          Returns a list of which document types the given user can claim Electronic Payment Claims with.
 boolean isAuthorizedForClaimingElectronicPayment(org.kuali.rice.kim.bo.Person user, String workflowDocumentTypeName)
          check whether the given user has permission to claim eletronic payment for the given document type defined in the specified namespace
 boolean representsElectronicFundAccount(AccountingLine accountingLine)
          Determines if the given accounting line represents an electronic payment
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
          Sets the dateTimeService attribute value.
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
          Sets the documentService attribute value.
 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

ELECTRONIC_FUNDS_CLAIMANT_GROUP_PARAMETER

protected static final String ELECTRONIC_FUNDS_CLAIMANT_GROUP_PARAMETER
See Also:
Constant Field Values

ELECTRONIC_PAYMENT_ADMINISTRATOR_GROUP_PARAM_NAME

protected static final String ELECTRONIC_PAYMENT_ADMINISTRATOR_GROUP_PARAM_NAME
See Also:
Constant Field Values

ELECTRONIC_FUNDS_CLAIM_SUMMARIES_PER_NOTE_PARAMETER

protected static final String ELECTRONIC_FUNDS_CLAIM_SUMMARIES_PER_NOTE_PARAMETER
See Also:
Constant Field Values

CLAIMING_NOTE_PRELUDE

protected static final String CLAIMING_NOTE_PRELUDE
See Also:
Constant Field Values

DI_CLAIMING_DOC_HELPER_BEAN_NAME

protected static final String DI_CLAIMING_DOC_HELPER_BEAN_NAME
See Also:
Constant Field Values

YEDI_CLAIMING_DOC_HELPER_BEAN_NAME

protected static final String YEDI_CLAIMING_DOC_HELPER_BEAN_NAME
See Also:
Constant Field Values

CLAIMING_DOC_HELPER_BEAN_NAME

protected static final String CLAIMING_DOC_HELPER_BEAN_NAME
See Also:
Constant Field Values

ELECTRONIC_PAYMENT_CLAIM_ACCOUNTS_PARAMETER

protected static final String ELECTRONIC_PAYMENT_CLAIM_ACCOUNTS_PARAMETER
See Also:
Constant Field Values
Constructor Detail

ElectronicPaymentClaimingServiceImpl

public ElectronicPaymentClaimingServiceImpl()
Method Detail

constructNoteTextsForClaims

public List<String> constructNoteTextsForClaims(List<ElectronicPaymentClaim> claims)
Description copied from interface: ElectronicPaymentClaimingService
Constructs a List of Notes that detail which ElectronicPaymentClaim records have been claimed by a document

Specified by:
constructNoteTextsForClaims in interface ElectronicPaymentClaimingService
Parameters:
claims - the ElectronicPaymentClaim record that will be claimed by a document
Returns:
a List of Notes that will summarize that claiming.
See Also:
org.kuali.kfs.sys.service.ElectronicPaymentClaimingService#constructNotesForClaims(java.util.List)

constructNoteText

protected String constructNoteText(List<ElectronicPaymentClaim> claims,
                                   int startPoint,
                                   int maxSummariesPerNote)
This creates a note for the given point in the list of summaries.

Parameters:
claims - a List of ElectronicPaymentClaim records that are being claimed
startPoint - the point in the list the note is starting at
maxSummariesPerNote - the number of ElectronicPaymentClaim summaries we can have on a note
Returns:
a newly constructed note, that needs to have a user added

createSummaryLineForClaim

protected String createSummaryLineForClaim(ElectronicPaymentClaim claim)
Creates a summary line for a note from a claim

Parameters:
claim - the electronic payment claim to summarize
Returns:
a String with the summary of the claim.

createPaymentClaimingDocument

public String createPaymentClaimingDocument(List<ElectronicPaymentClaim> claims,
                                            ElectronicPaymentClaimingDocumentGenerationStrategy documentCreationHelper,
                                            org.kuali.rice.kim.bo.Person user)
Description copied from interface: ElectronicPaymentClaimingService
Given a List of ElectronicPaymentClaim records and a ElectronicPaymentClaimingDocumentGenerationStrategy document helper implementation, creates a document that will claim; this method should also do the work of "claiming" each of the given ElectronicPaymentClaim records by filling in their referenceFinancialDocumentNumber field.

Specified by:
createPaymentClaimingDocument in interface ElectronicPaymentClaimingService
Parameters:
claims - the List of ElectronicPaymentClaim records to claim with a document
documentCreationHelper - the document helper which will help this method in constructing the claiming document
user - the Person record of the user who is claiming the given electronic payments
Returns:
the URL to redirect to, so the user can edit the document
See Also:
org.kuali.kfs.sys.service.ElectronicPaymentClaimingService#createPaymentClaimingDocument(java.util.List, org.kuali.kfs.sys.service.ElectronicPaymentClaimingDocumentGenerationStrategy)

getClaimingDocumentChoices

public List<ElectronicPaymentClaimingDocumentGenerationStrategy> getClaimingDocumentChoices(org.kuali.rice.kim.bo.Person user)
Description copied from interface: ElectronicPaymentClaimingService
Returns a list of which document types the given user can claim Electronic Payment Claims with.

Specified by:
getClaimingDocumentChoices in interface ElectronicPaymentClaimingService
Parameters:
user - the user attempting to use a document to claim ElectronicPaymentClaim records
Returns:
a list of ElectronicPaymentClaimingDocumentGenerationStrategy document helper implementations
See Also:
ElectronicPaymentClaimingService.getClaimingDocumentChoices(org.kuali.rice.kim.bo.Person)

claimElectronicPayments

public void claimElectronicPayments(List<ElectronicPaymentClaim> payments,
                                    String documentNumber)
Sets the referenceFinancialDocumentNumber on each of the payments passed in with the given document number and then saves them.

Specified by:
claimElectronicPayments in interface ElectronicPaymentClaimingService
Parameters:
payments - a list of payments to claim
docmentNumber - the document number of the claiming document

declaimElectronicPaymentClaimsForDocument

public void declaimElectronicPaymentClaimsForDocument(org.kuali.rice.kns.document.Document document)
Description copied from interface: ElectronicPaymentClaimingService
Unclaims all ElectronicPaymentClaim records claimed by the given document, by setting the ElectronicPaymentClaim's reference document to null.

Specified by:
declaimElectronicPaymentClaimsForDocument in interface ElectronicPaymentClaimingService
Parameters:
document - the document that claimed ElectronicPaymentClaims and now needs to give them back
See Also:
ElectronicPaymentClaimingService.declaimElectronicPaymentClaimsForDocument(org.kuali.rice.kns.document.Document)

isAuthorizedForClaimingElectronicPayment

public boolean isAuthorizedForClaimingElectronicPayment(org.kuali.rice.kim.bo.Person user,
                                                        String workflowDocumentTypeName)
Description copied from interface: ElectronicPaymentClaimingService
check whether the given user has permission to claim eletronic payment for the given document type defined in the specified namespace

Specified by:
isAuthorizedForClaimingElectronicPayment in interface ElectronicPaymentClaimingService
Parameters:
user - the given user being checked
workflowDocumentTypeName - the workflow document type name of the document being claimed
Returns:
true if the user has permisson to claim electronic payment; otherwise, false
See Also:
org.kuali.kfs.sys.service.ElectronicPaymentClaimingService#isAuthorizedForClaimingElectronicPayment(org.kuali.rice.kim.bo.Person, java.lang.String, java.lang.String)

generateElectronicPaymentClaimRecords

public List<ElectronicPaymentClaim> generateElectronicPaymentClaimRecords(AdvanceDepositDocument doc)
Description copied from interface: ElectronicPaymentClaimingService
Returns a list of SAVED electronic payment claims from the lines of an AdvanceDepositDocument

Specified by:
generateElectronicPaymentClaimRecords in interface ElectronicPaymentClaimingService
Parameters:
doc - the document that is generating electronic payment claim records
Returns:
a list of the generated electronic payment claim records
See Also:
ElectronicPaymentClaimingService.generateElectronicPaymentClaimRecords(org.kuali.kfs.fp.document.AdvanceDepositDocument)

representsElectronicFundAccount

public boolean representsElectronicFundAccount(AccountingLine accountingLine)
Determines if the given accounting line represents an electronic payment

Specified by:
representsElectronicFundAccount in interface ElectronicPaymentClaimingService
Parameters:
accountingLine - the accounting line to check
Returns:
true if the accounting line does represent an electronic payment, false otherwise

createElectronicPayment

protected ElectronicPaymentClaim createElectronicPayment(AdvanceDepositDocument document,
                                                         AccountingLine accountingLine)
Creates an electronic payment claim record to match the given accounting line on the document

Parameters:
accountingLine - an accounting line that an electronic payment claim record should be created for
Returns:
the created ElectronicPaymentClaim business object

setBusinessObjectService

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

Parameters:
businessObjectService - The businessObjectService to set.

setDocumentService

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

Parameters:
documentService - The documentService to set.

setParameterService

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

Parameters:
parameterService - The parameterService to set.

setDateTimeService

public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
Sets the dateTimeService attribute value.

Parameters:
dateTimeService - The dateTimeService to set.


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