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