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;
}
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();
}
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();
}
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);
}
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));
}
Aggregations