Search in sources :

Example 1 with HiddenException

use of org.apache.isis.applib.services.wrapper.HiddenException in project estatio by estatio.

the class InvoiceSummaryAbstract method validate0InvoiceAll.

public String validate0InvoiceAll(final LocalDate invoiceDate) {
    for (Invoice invoice : getInvoices()) {
        try {
            final InvoiceForLease._invoice mixin = mixin(InvoiceForLease._invoice.class, invoice);
            wrapperFactory.wrapNoExecute(mixin).$$(invoiceDate);
        } catch (InvalidException ex) {
            final String reasonMessage = ex.getInteractionEvent() != null ? ex.getInteractionEvent().getReason() : null;
            return titleService.titleOf(invoice) + ": " + (reasonMessage != null ? reasonMessage : ex.getMessage());
        } catch (HiddenException | DisabledException ex) {
        // ignore
        }
    }
    return null;
}
Also used : Invoice(org.estatio.module.invoice.dom.Invoice) InvoiceForLease(org.estatio.module.lease.dom.invoicing.InvoiceForLease) DisabledException(org.apache.isis.applib.services.wrapper.DisabledException) InvalidException(org.apache.isis.applib.services.wrapper.InvalidException) HiddenException(org.apache.isis.applib.services.wrapper.HiddenException)

Aggregations

DisabledException (org.apache.isis.applib.services.wrapper.DisabledException)1 HiddenException (org.apache.isis.applib.services.wrapper.HiddenException)1 InvalidException (org.apache.isis.applib.services.wrapper.InvalidException)1 Invoice (org.estatio.module.invoice.dom.Invoice)1 InvoiceForLease (org.estatio.module.lease.dom.invoicing.InvoiceForLease)1