use of com.google.common.eventbus.AllowConcurrentEvents in project killbill by killbill.
the class InvoiceListener method handleChildrenInvoiceAdjustmentEvent.
@AllowConcurrentEvents
@Subscribe
public void handleChildrenInvoiceAdjustmentEvent(final DefaultInvoiceAdjustmentEvent event) {
try {
final InternalCallContext context = internalCallContextFactory.createInternalCallContext(event.getSearchKey2(), event.getSearchKey1(), "AdjustParentInvoice", CallOrigin.INTERNAL, UserType.SYSTEM, event.getUserToken());
final Account account = accountApi.getAccountById(event.getAccountId(), context);
// catch children invoices and populate the parent summary invoice
if (isChildrenAccountAndPaymentDelegated(account)) {
dispatcher.processParentInvoiceForAdjustments(account, event.getInvoiceId(), context);
}
} catch (InvoiceApiException e) {
log.error(e.getMessage());
} catch (AccountApiException e) {
log.error(e.getMessage());
}
}
use of com.google.common.eventbus.AllowConcurrentEvents in project killbill by killbill.
the class InvoiceTagHandler method process_AUTO_INVOICING_OFF_removal.
@AllowConcurrentEvents
@Subscribe
public void process_AUTO_INVOICING_OFF_removal(final ControlTagDeletionInternalEvent event) {
if (event.getTagDefinition().getName().equals(ControlTagType.AUTO_INVOICING_OFF.toString()) && event.getObjectType() == ObjectType.ACCOUNT) {
final UUID accountId = event.getObjectId();
final InternalCallContext context = internalCallContextFactory.createInternalCallContext(event.getSearchKey2(), event.getSearchKey1(), "InvoiceTagHandler", CallOrigin.INTERNAL, UserType.SYSTEM, event.getUserToken());
processUnpaid_AUTO_INVOICING_OFF_invoices(accountId, context);
}
}
use of com.google.common.eventbus.AllowConcurrentEvents in project killbill by killbill.
the class PaymentTagHandler method process_AUTO_PAY_OFF_removal.
@AllowConcurrentEvents
@Subscribe
public void process_AUTO_PAY_OFF_removal(final ControlTagDeletionInternalEvent event) {
if (event.getTagDefinition().getName().equals(ControlTagType.AUTO_PAY_OFF.toString()) && event.getObjectType() == ObjectType.ACCOUNT) {
final UUID accountId = event.getObjectId();
processUnpaid_AUTO_PAY_OFF_payments(accountId, event.getSearchKey1(), event.getSearchKey2(), event.getUserToken());
}
}
Aggregations