Search in sources :

Example 41 with ActionLayout

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;
}
Also used : Document(org.incode.module.document.dom.impl.docs.Document) Action(org.apache.isis.applib.annotation.Action) MemberOrder(org.apache.isis.applib.annotation.MemberOrder) ActionLayout(org.apache.isis.applib.annotation.ActionLayout)

Example 42 with ActionLayout

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();
}
Also used : PaymentBatchManager(org.estatio.module.capex.app.paymentbatch.PaymentBatchManager) Action(org.apache.isis.applib.annotation.Action) MemberOrder(org.apache.isis.applib.annotation.MemberOrder) ActionLayout(org.apache.isis.applib.annotation.ActionLayout)

Example 43 with ActionLayout

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);
}
Also used : IncomingDocViewModel(org.estatio.module.capex.app.document.IncomingDocViewModel) Action(org.apache.isis.applib.annotation.Action) ActionLayout(org.apache.isis.applib.annotation.ActionLayout)

Example 44 with ActionLayout

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();
}
Also used : CreateRetroInvoices(org.estatio.module.lease.migrations.CreateRetroInvoices) FixtureScript(org.apache.isis.applib.fixturescripts.FixtureScript) Action(org.apache.isis.applib.annotation.Action) MemberOrder(org.apache.isis.applib.annotation.MemberOrder) ActionLayout(org.apache.isis.applib.annotation.ActionLayout)

Example 45 with ActionLayout

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;
}
Also used : Invoice(org.estatio.module.invoice.dom.Invoice) InvoiceForLease_sendByEmail(org.estatio.module.lease.dom.invoicing.comms.InvoiceForLease_sendByEmail) Document(org.incode.module.document.dom.impl.docs.Document) EmailAddress(org.incode.module.communications.dom.impl.commchannel.EmailAddress) Action(org.apache.isis.applib.annotation.Action) ActionLayout(org.apache.isis.applib.annotation.ActionLayout)

Aggregations

ActionLayout (org.apache.isis.applib.annotation.ActionLayout)62 Action (org.apache.isis.applib.annotation.Action)61 Document (org.incode.module.document.dom.impl.docs.Document)22 MemberOrder (org.apache.isis.applib.annotation.MemberOrder)14 IncomingInvoice (org.estatio.module.capex.dom.invoice.IncomingInvoice)9 WorksheetSpec (org.isisaddons.module.excel.dom.WorksheetSpec)7 Blob (org.apache.isis.applib.value.Blob)6 ArrayList (java.util.ArrayList)5 WorksheetContent (org.isisaddons.module.excel.dom.WorksheetContent)5 DocumentTemplate (org.incode.module.document.dom.impl.docs.DocumentTemplate)3 DomainObject (org.apache.isis.applib.annotation.DomainObject)2 BudgetItem (org.estatio.module.budget.dom.budgetitem.BudgetItem)2 PartitionItem (org.estatio.module.budget.dom.partioning.PartitionItem)2 IncomingDocViewModel (org.estatio.module.capex.app.document.IncomingDocViewModel)2 Invoice (org.estatio.module.invoice.dom.Invoice)2 Lease (org.estatio.module.lease.dom.Lease)2 Organisation (org.estatio.module.party.dom.Organisation)2 DocumentType (org.incode.module.document.dom.impl.types.DocumentType)2 LocalDate (org.joda.time.LocalDate)2 LocalDateTime (org.joda.time.LocalDateTime)2