Search in sources :

Example 31 with MemberOrder

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

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

the class BreakOption method changeDates.

@MemberOrder(name = "breakDate", sequence = "1")
public BreakOption changeDates(final LocalDate breakDate, final LocalDate excerciseDate) {
    setBreakDate(breakDate);
    setExerciseDate(excerciseDate);
    LocalDateInterval ldi = new LocalDateInterval(excerciseDate, breakDate, AbstractInterval.IntervalEnding.EXCLUDING_END_DATE);
    final String s = JodaPeriodUtils.asSimpleString(new Period(ldi.asInterval(), PeriodType.yearMonthDay()));
    setNotificationPeriod(s);
    // re-create events
    removeExistingEvents();
    createEvents();
    return this;
}
Also used : Period(org.joda.time.Period) LocalDateInterval(org.incode.module.base.dom.valuetypes.LocalDateInterval) MemberOrder(org.apache.isis.applib.annotation.MemberOrder)

Example 33 with MemberOrder

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

the class BreakOption method changeNotificationPeriod.

@MemberOrder(name = "notificationPeriod", sequence = "1")
public BreakOption changeNotificationPeriod(final String notificationPeriod) {
    final Period p = JodaPeriodUtils.asPeriod(notificationPeriod);
    setExerciseDate(getBreakDate().minus(p));
    setNotificationPeriod(notificationPeriod);
    // re-create events
    removeExistingEvents();
    createEvents();
    return this;
}
Also used : Period(org.joda.time.Period) MemberOrder(org.apache.isis.applib.annotation.MemberOrder)

Example 34 with MemberOrder

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

the class T_createAndAttachDocumentAndRender method $$.

@Action(domainEvent = ActionDomainEvent.class, semantics = SemanticsOf.NON_IDEMPOTENT)
@ActionLayout(contributed = Contributed.AS_ACTION)
@MemberOrder(name = "documents", sequence = "3.1")
public Object $$(final DocumentTemplate template) throws IOException {
    final Document document = documentCreatorService.createDocumentAndAttachPaperclips(domainObject, template);
    render(template, document);
    return document;
}
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)

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