use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class Order_switchView method act.
@Action(semantics = SemanticsOf.SAFE)
@ActionLayout(contributed = Contributed.AS_ACTION, // not sure why this isn't being picked up from isis-non-changing.properties
cssClassFa = "fa-exchange")
@MemberOrder(sequence = "1")
public IncomingDocAsOrderViewModel act() {
Optional<Document> documentIfAny = lookupAttachedPdfService.lookupOrderPdfFrom(order);
Document document = documentIfAny.get();
final IncomingDocAsOrderViewModel viewModel = new IncomingDocAsOrderViewModel(order, document);
serviceRegistry2.injectServicesInto(viewModel);
viewModel.init();
return viewModel;
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class PaymentBatchMenu method preparePaymentBatches.
@Action(semantics = SemanticsOf.SAFE)
@ActionLayout(cssClassFa = "fa-magic")
@MemberOrder(sequence = "300.10")
public PaymentBatchManager preparePaymentBatches() {
final PaymentBatchManager paymentBatchManager = new PaymentBatchManager();
serviceRegistry2.injectServicesInto(paymentBatchManager);
return new PaymentBatchManager();
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class Task_categoriseDocumentAsOtherInvoice method act.
@Action(domainEvent = ActionDomainEvent.class, semantics = SemanticsOf.IDEMPOTENT)
@ActionLayout(contributed = Contributed.AS_ACTION, cssClassFa = "folder-open-o")
public Object act(final IncomingInvoiceType incomingInvoiceType, @Nullable final String comment, final boolean goToNext) {
final Object nextTaskIfAny = nextTaskOrWarnIfRequired(goToNext);
Object mixinResult = mixin().act(incomingInvoiceType, comment);
if (mixinResult instanceof IncomingDocViewModel) {
IncomingDocViewModel viewModel = (IncomingDocViewModel) mixinResult;
// to support 'goToNext' when finished with the view model
viewModel.setOriginatingTask(task);
}
return coalesce(nextTaskIfAny, mixinResult);
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class EstatioFixtureScripts method createRetroInvoicesForLease.
@Action(restrictTo = RestrictTo.PROTOTYPING)
@ActionLayout(cssClassFa = "fa-bolt")
@MemberOrder(sequence = "3")
public List<FixtureResult> createRetroInvoicesForLease(final Lease lease, @ParameterLayout(named = "Start due date") final LocalDate startDueDate, @ParameterLayout(named = "Nextdue date") final LocalDate nextDueDate) {
final CreateRetroInvoices creator = container.newTransientInstance(CreateRetroInvoices.class);
final FixtureScript.ExecutionContext executionContext = fixtureScripts.newExecutionContext(null);
creator.createLease(lease, startDueDate, nextDueDate, executionContext);
return executionContext.getResults();
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class InvoiceSummaryForPropertyDueDateStatus_sendByEmailAbstract method $$.
@Action(semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE)
@ActionLayout(contributed = Contributed.AS_ACTION)
public InvoiceSummaryForPropertyDueDateStatus $$() throws IOException {
final List<InvoiceAndDocument> invoiceAndDocuments = invoiceAndDocumentsToSend();
for (InvoiceAndDocument invoiceAndDocument : invoiceAndDocuments) {
final Invoice invoice = invoiceAndDocument.getInvoice();
final Document document = invoiceAndDocument.getDocument();
final InvoiceForLease_sendByEmail invoice_sendByEmail = invoice_email(invoice);
final EmailAddress emailAddress = invoice_sendByEmail.default1$$(document);
final String cc = invoice_sendByEmail.default2$$(document);
final String bcc = invoice_sendByEmail.default5$$(document);
invoice_sendByEmail.$$(document, emailAddress, cc, null, null, bcc, null);
}
return this.invoiceSummary;
}
Aggregations