Search in sources :

Example 36 with Document

use of org.incode.module.document.dom.impl.docs.Document in project estatio by estatio.

the class IncomingDocViewModel_viewTask method pendingTask.

private Object pendingTask() {
    final Document document = viewModel.getDocument();
    final IncomingDocumentCategorisationStateTransition pendingTransition = repository.findByDomainObjectAndCompleted(document, false);
    return pendingTransition != null ? pendingTransition.getTask() : null;
}
Also used : IncomingDocumentCategorisationStateTransition(org.estatio.module.capex.dom.documents.categorisation.IncomingDocumentCategorisationStateTransition) Document(org.incode.module.document.dom.impl.docs.Document)

Example 37 with Document

use of org.incode.module.document.dom.impl.docs.Document in project estatio by estatio.

the class IncomingInvoiceDownloadManager method documentNumberFor.

String documentNumberFor(final IncomingInvoiceItem invoiceItem) {
    final IncomingInvoice invoice = (IncomingInvoice) invoiceItem.getInvoice();
    final Optional<Document> documentIfAny = lookupAttachedPdfService.lookupIncomingInvoicePdfFrom(invoice);
    return documentIfAny.map(DocumentAbstract::getName).orElse(null);
}
Also used : IncomingInvoice(org.estatio.module.capex.dom.invoice.IncomingInvoice) Document(org.incode.module.document.dom.impl.docs.Document)

Example 38 with Document

use of org.incode.module.document.dom.impl.docs.Document 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 39 with Document

use of org.incode.module.document.dom.impl.docs.Document in project estatio by estatio.

the class Invoice_DocumentManagement_IntegTest method invoiceDocOf.

Document invoiceDocOf(final Invoice invoice) {
    final List<DocAndCommForInvoiceDoc> viewModels = mixin(Invoice_invoiceDocs.class, invoice).$$();
    assertThat(viewModels).hasSize(1);
    final DocAndCommForInvoiceDoc viewModel = viewModels.get(0);
    final Document document = mixin(DocAndCommForInvoiceDoc_document.class, viewModel).$$();
    assertThat(document).isNotNull();
    return document;
}
Also used : DocAndCommForInvoiceDoc_document(org.estatio.module.lease.dom.invoicing.summary.comms.DocAndCommForInvoiceDoc_document) DocAndCommForInvoiceDoc(org.estatio.module.lease.dom.invoicing.summary.comms.DocAndCommForInvoiceDoc) InvoiceForLease_attachSupportingDocument(org.estatio.module.lease.dom.invoicing.comms.InvoiceForLease_attachSupportingDocument) Document(org.incode.module.document.dom.impl.docs.Document) Invoice_invoiceDocs(org.estatio.module.lease.dom.invoicing.summary.comms.Invoice_invoiceDocs)

Example 40 with Document

use of org.incode.module.document.dom.impl.docs.Document in project estatio by estatio.

the class Invoice_DocumentManagement_IntegTest method prelimLetterOf.

Document prelimLetterOf(final Invoice invoice) {
    final List<DocAndCommForPrelimLetter> viewModels = mixin(Invoice_ForLease_preliminaryLetters.class, invoice).$$();
    assertThat(viewModels).hasSize(1);
    final DocAndCommForPrelimLetter viewModel = viewModels.get(0);
    final Document document = mixin(DocAndCommForPrelimLetter_document.class, viewModel).$$();
    assertThat(document).isNotNull();
    return document;
}
Also used : DocAndCommForPrelimLetter_document(org.estatio.module.lease.dom.invoicing.summary.comms.DocAndCommForPrelimLetter_document) DocAndCommForPrelimLetter(org.estatio.module.lease.dom.invoicing.summary.comms.DocAndCommForPrelimLetter) InvoiceForLease_attachSupportingDocument(org.estatio.module.lease.dom.invoicing.comms.InvoiceForLease_attachSupportingDocument) Document(org.incode.module.document.dom.impl.docs.Document) Invoice_ForLease_preliminaryLetters(org.estatio.module.lease.dom.invoicing.summary.comms.Invoice_ForLease_preliminaryLetters)

Aggregations

Document (org.incode.module.document.dom.impl.docs.Document)57 Action (org.apache.isis.applib.annotation.Action)23 ActionLayout (org.apache.isis.applib.annotation.ActionLayout)22 Programmatic (org.apache.isis.applib.annotation.Programmatic)8 Blob (org.apache.isis.applib.value.Blob)7 IncomingInvoice (org.estatio.module.capex.dom.invoice.IncomingInvoice)7 DocumentAbstract (org.incode.module.document.dom.impl.docs.DocumentAbstract)7 MemberOrder (org.apache.isis.applib.annotation.MemberOrder)5 Paperclip (org.incode.module.document.dom.impl.paperclips.Paperclip)5 IncomingDocumentCategorisationStateTransition (org.estatio.module.capex.dom.documents.categorisation.IncomingDocumentCategorisationStateTransition)4 Bookmark (org.apache.isis.applib.services.bookmark.Bookmark)3 BuyerFinder (org.estatio.module.capex.dom.documents.BuyerFinder)3 Communication (org.incode.module.communications.dom.impl.comms.Communication)3 DocumentTemplate (org.incode.module.document.dom.impl.docs.DocumentTemplate)3 Expectations (org.jmock.Expectations)3 TitleBuffer (org.apache.isis.applib.util.TitleBuffer)2 IncomingDocAsOrderViewModel (org.estatio.module.capex.app.order.IncomingDocAsOrderViewModel)2 Order (org.estatio.module.capex.dom.order.Order)2 BankAccount (org.estatio.module.financial.dom.BankAccount)2 DocumentTypeData (org.estatio.module.invoice.dom.DocumentTypeData)2