Class DonationIncomingPaymentHandler
java.lang.Object
ch.tocco.nice2.optional.donationfinance.impl.util.DonationIncomingPaymentHandler
- All Implemented Interfaces:
- IncomingPaymentHandler
@Component
public class DonationIncomingPaymentHandler
extends Object
implements IncomingPaymentHandler
- 
Constructor SummaryConstructorsConstructorDescriptionDonationIncomingPaymentHandler(QueryBuilderFactory queryBuilderFactory, CopyDonationService copyDonationService, Context context, BookIncomingPaymentService bookIncomingPaymentService) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclearRelevantData(Entity incomingPayment) When the affiliation of the incoming payment changes all the previous set relations and field must be clearedvoidfinalizeIncomingPayment(Entity incomingPayment, Entity entity) Same asIncomingPaymentHandler.finalizeIncomingPayment(Entity, String)but receives the relevant entity (e.g.voidfinalizeIncomingPayment(Entity incomingPayment, @Nullable String referenceCode) During the reading process of the esr file this method is called to check if an entity with the passed reference code exists.finalizeVoucher(Entity voucher, Entity incomingPayment) Finalizes the passed voucher entity and returns it.booleanisRelevantRelation(String relationName) Returnstrueif the passed relation name is the name of the relevant relation.booleanrelevantRelationIsSet(Entity incomingPayment) Returnstrueif the relevant relation is set on the incoming payment.
- 
Constructor Details- 
DonationIncomingPaymentHandlerpublic DonationIncomingPaymentHandler(QueryBuilderFactory queryBuilderFactory, CopyDonationService copyDonationService, Context context, @Lazy BookIncomingPaymentService bookIncomingPaymentService) 
 
- 
- 
Method Details- 
relevantRelationIsSetDescription copied from interface:IncomingPaymentHandlerReturnstrueif the relevant relation is set on the incoming payment. The relevant relation is equal to the source of payment (e.g. relDebitor for orders, relDonation for donations).- Specified by:
- relevantRelationIsSetin interface- IncomingPaymentHandler
 
- 
isRelevantRelationDescription copied from interface:IncomingPaymentHandlerReturnstrueif the passed relation name is the name of the relevant relation. The relevant relation is equal to the source of payment (e.g. relDebitor for orders, relDonation for donations).- Specified by:
- isRelevantRelationin interface- IncomingPaymentHandler
 
- 
finalizeVoucherDescription copied from interface:IncomingPaymentHandlerFinalizes the passed voucher entity and returns it. Needs to- set the relation relDebit_account- set the relationrelCredit_account- set the relationrelCurrency- set the specific relation which is checked in theIncomingPaymentHandler.relevantRelationIsSet(Entity)method- Specified by:
- finalizeVoucherin interface- IncomingPaymentHandler
 
- 
finalizeIncomingPaymentpublic void finalizeIncomingPayment(Entity incomingPayment, @Nullable @Nullable String referenceCode) Description copied from interface:IncomingPaymentHandlerDuring the reading process of the esr file this method is called to check if an entity with the passed reference code exists. If so, the entity will be set on the incoming payment (e.g. relDebitor or relDonation). Additionally, a handler can set some more entity-specific data.- Specified by:
- finalizeIncomingPaymentin interface- IncomingPaymentHandler
 
- 
finalizeIncomingPaymentDescription copied from interface:IncomingPaymentHandlerSame asIncomingPaymentHandler.finalizeIncomingPayment(Entity, String)but receives the relevant entity (e.g. Debitor, Donation) as second argument. This method is used if arelevantrelation is set on an existing incoming payment entity.- Specified by:
- finalizeIncomingPaymentin interface- IncomingPaymentHandler
 
- 
clearRelevantDataDescription copied from interface:IncomingPaymentHandlerWhen the affiliation of the incoming payment changes all the previous set relations and field must be cleared- Specified by:
- clearRelevantDatain interface- IncomingPaymentHandler
 
 
-