Search in sources :

Example 26 with MemberOrder

use of org.apache.isis.applib.annotation.MemberOrder 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 27 with MemberOrder

use of org.apache.isis.applib.annotation.MemberOrder in project estatio by estatio.

the class PaymentBatchManager method removeAll.

@MemberOrder(name = "newBatches", sequence = "1")
public PaymentBatchManager removeAll() {
    for (PaymentBatch paymentBatch : getNewBatches()) {
        paymentBatch.clearLines();
        paymentBatch.remove();
    }
    return new PaymentBatchManager();
}
Also used : PaymentBatch(org.estatio.module.capex.dom.payment.PaymentBatch) MemberOrder(org.apache.isis.applib.annotation.MemberOrder)

Example 28 with MemberOrder

use of org.apache.isis.applib.annotation.MemberOrder 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 29 with MemberOrder

use of org.apache.isis.applib.annotation.MemberOrder in project estatio by estatio.

the class PaymentBatchMenu method findRecentPaymentBatches.

@Action(semantics = SemanticsOf.SAFE)
@MemberOrder(sequence = "300.15")
public List<PaymentBatch> findRecentPaymentBatches() {
    DateTime now = clockService.nowAsDateTime();
    DateTime threeMonthsAgo = now.minusMonths(3);
    return paymentBatchRepository.findByCreatedOnBetween(threeMonthsAgo, now);
}
Also used : DateTime(org.joda.time.DateTime) Action(org.apache.isis.applib.annotation.Action) MemberOrder(org.apache.isis.applib.annotation.MemberOrder)

Example 30 with MemberOrder

use of org.apache.isis.applib.annotation.MemberOrder in project estatio by estatio.

the class LeaseMenu method verifyLeasesUntil.

@Action(semantics = SemanticsOf.IDEMPOTENT)
@MemberOrder(sequence = "4")
public String verifyLeasesUntil(final LeaseItemType leaseItemType, final LocalDate untilDate) {
    DateTime start = DateTime.now();
    List<Lease> leases = allLeases();
    for (Lease lease : leases) {
        for (LeaseItem leaseItem : lease.getItems()) {
            if (leaseItem.getType().equals(leaseItemType)) {
                leaseItem.verifyUntil(untilDate);
            }
        }
    }
    Period p = new Period(start, DateTime.now());
    return String.format("Verified %d leases in %s", leases.size(), JodaPeriodUtils.asString(p));
}
Also used : Lease(org.estatio.module.lease.dom.Lease) Period(org.joda.time.Period) DateTime(org.joda.time.DateTime) LeaseItem(org.estatio.module.lease.dom.LeaseItem) Action(org.apache.isis.applib.annotation.Action) MemberOrder(org.apache.isis.applib.annotation.MemberOrder)

Aggregations

MemberOrder (org.apache.isis.applib.annotation.MemberOrder)34 Action (org.apache.isis.applib.annotation.Action)29 ActionLayout (org.apache.isis.applib.annotation.ActionLayout)15 Document (org.incode.module.document.dom.impl.docs.Document)5 WorksheetSpec (org.isisaddons.module.excel.dom.WorksheetSpec)4 ArrayList (java.util.ArrayList)3 WorksheetContent (org.isisaddons.module.excel.dom.WorksheetContent)3 ApplicationTenancy (org.isisaddons.module.security.dom.tenancy.ApplicationTenancy)3 Period (org.joda.time.Period)3 FixtureScript (org.apache.isis.applib.fixturescripts.FixtureScript)2 Order (org.estatio.module.capex.dom.order.Order)2 OrderItem (org.estatio.module.capex.dom.order.OrderItem)2 Lease (org.estatio.module.lease.dom.Lease)2 CreateRetroInvoices (org.estatio.module.lease.migrations.CreateRetroInvoices)2 LocalDateInterval (org.incode.module.base.dom.valuetypes.LocalDateInterval)2 DocumentType (org.incode.module.document.dom.impl.types.DocumentType)2 DateTime (org.joda.time.DateTime)2 LocalDate (org.joda.time.LocalDate)2 BigDecimal (java.math.BigDecimal)1 List (java.util.List)1