当前位置: 首页>>代码示例>>Java>>正文


Java Publishing.DISABLED属性代码示例

本文整理汇总了Java中org.apache.isis.applib.annotation.Publishing.DISABLED属性的典型用法代码示例。如果您正苦于以下问题:Java Publishing.DISABLED属性的具体用法?Java Publishing.DISABLED怎么用?Java Publishing.DISABLED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.isis.applib.annotation.Publishing的用法示例。


在下文中一共展示了Publishing.DISABLED属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: downloadExcelExportForCompletedBatches

@Action(
        semantics = SemanticsOf.SAFE,
        command = CommandReification.DISABLED,
        publishing = Publishing.DISABLED
)
public Blob downloadExcelExportForCompletedBatches(
        @Nullable final String documentName,
        final LocalDate startExecutionDate,
        final LocalDate endExecutionDate
) {
    List<PaymentLineForExcelExportV1> lineVms = new ArrayList<>();
    List<PaymentBatch> batchesToExport = getCompletedBatches()
            .stream()
            .filter(
                    x->
                            x.getRequestedExecutionDate().toLocalDate().isAfter(startExecutionDate.minusDays(1))
                    &&
                            x.getRequestedExecutionDate().toLocalDate().isBefore(endExecutionDate.plusDays(1))
            )
            .collect(Collectors.toList());
    for (PaymentBatch batch : batchesToExport){
        lineVms.addAll(batch.paymentLinesForExcelExport());
    }
    String name = documentName!=null ? documentName.concat(".xlsx") : "export.xlsx";
    return excelService.toExcel(lineVms, PaymentLineForExcelExportV1.class, "export", name);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:26,代码来源:PaymentBatchManager.java

示例2: act

@Action(
        semantics = SemanticsOf.IDEMPOTENT,
        command = CommandReification.DISABLED,
        publishing = Publishing.DISABLED
)
public PaymentBatch act(
        final List<IncomingInvoice> incomingInvoices,
        @ParameterLayout(describedAs = "Whether the removed invoices should also be rejected")
        final boolean rejectAlso,
        @ParameterLayout(describedAs = "If rejecting, then explain why so that the error can be fixed")
        @Nullable
        final String rejectionReason) {
    for (IncomingInvoice incomingInvoice : incomingInvoices) {
        paymentBatch.removeLineFor(incomingInvoice);
        if(rejectAlso) {
            stateTransitionService.trigger(
                    incomingInvoice, IncomingInvoiceApprovalStateTransitionType.REJECT, null, rejectionReason);
        }
    }
    return paymentBatch;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:21,代码来源:PaymentBatch.java

示例3: upload

@Action(publishing = Publishing.DISABLED, semantics = SemanticsOf.IDEMPOTENT)
public LeaseTermForServiceChargeBudgetAuditManager upload(
        @Parameter(fileAccept = ".xlsx")
        @ParameterLayout(named = "Excel spreadsheet")
        final Blob spreadsheet) {
    List<LeaseTermForServiceChargeBudgetAuditLineItem> lineItems =
            excelService.fromExcel(spreadsheet, LeaseTermForServiceChargeBudgetAuditLineItem.class, "lease terms");
    for (LeaseTermForServiceChargeBudgetAuditLineItem lineItem : lineItems) {
        final LeaseTermForServiceCharge leaseTerm = lineItem.getLeaseTerm();
        leaseTerm.setAuditedValue(lineItem.getAuditedValue());
        leaseTerm.setBudgetedValue(lineItem.getBudgetedValue());

        final LeaseTermForServiceCharge nextLeaseTerm = (LeaseTermForServiceCharge) leaseTerm.getNext();
        final LeaseTermForServiceCharge nextLeaseTermUploaded = lineItem.getNextLeaseTerm();
        if (nextLeaseTerm != null && nextLeaseTerm == nextLeaseTermUploaded) {
            nextLeaseTerm.setBudgetedValue(lineItem.getNextBudgetedValue());
        }
    }
    return this;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:20,代码来源:LeaseTermForServiceChargeBudgetAuditManager.java

示例4: importBlob

@Action(publishing = Publishing.DISABLED, semantics = SemanticsOf.IDEMPOTENT)
@CollectionLayout(paged = -1)
public List<ChargeImport> importBlob(
        @Parameter(fileAccept = ".xlsx")
        @ParameterLayout(named = "Excel spreadsheet") final Blob spreadsheet) {
    List<ChargeImport> lineItems =
            excelService.fromExcel(spreadsheet, ChargeImport.class, ChargeImport.class.getSimpleName());
    ChargeImport previous = null;
    for (ChargeImport lineItem : lineItems){
        lineItem.importData(previous);
        previous = lineItem;
    }
    return lineItems;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:14,代码来源:ChargeImportManager.java

示例5: importBudget

@Action(publishing = Publishing.DISABLED, semantics = SemanticsOf.IDEMPOTENT)
@ActionLayout()
@CollectionLayout()
public Budget importBudget(
        @Parameter(fileAccept = ".xlsx")
        @ParameterLayout(named = "Excel spreadsheet")
        final Blob spreadsheet) {

    WorksheetSpec spec1 = new WorksheetSpec(BudgetImportExport.class, "budget");
    WorksheetSpec spec2 = new WorksheetSpec(KeyItemImportExportLineItem.class, "keyItems");
    WorksheetSpec spec3 = new WorksheetSpec(BudgetOverrideImportExport.class, "overrides");
    WorksheetSpec spec4 = new WorksheetSpec(ChargeImport.class, "charges");
    List<List<?>> objects =
            excelService.fromExcel(spreadsheet, Arrays.asList(spec1, spec2, spec3, spec4));

    // first upsert charges
    List<ChargeImport> chargeImportLines = (List<ChargeImport>) objects.get(3);
    for (ChargeImport lineItem : chargeImportLines){
        lineItem.importData(null);
    }

    // import budget en items
    List<BudgetImportExport> budgetItemLines = importBudgetAndItems(objects);

    // import keyTables
    importKeyTables(budgetItemLines, objects);

    // import overrides
    importOverrides(objects);

    return getBudget();
}
 
开发者ID:estatio,项目名称:estatio,代码行数:32,代码来源:BudgetImportExportManager.java

示例6: importExportBudget

@Action(
        semantics = SemanticsOf.IDEMPOTENT,
        publishing = Publishing.DISABLED
)
@ActionLayout(contributed = Contributed.AS_ACTION)
public BudgetImportExportManager importExportBudget(Budget budget) {

    return new BudgetImportExportManager(budget);

}
 
开发者ID:estatio,项目名称:estatio,代码行数:10,代码来源:Budget_importExportBudget.java

示例7: reset

@Action(
        semantics = SemanticsOf.IDEMPOTENT_ARE_YOU_SURE,
        command = CommandReification.DISABLED,
        publishing = Publishing.DISABLED
)
public PaymentBatchManager reset() {

    final List<PaymentBatch> newBatches = this.getNewBatches();
    for (PaymentBatch newBatch : newBatches) {
        newBatch.clearLines();
    }
    return new PaymentBatchManager();
}
 
开发者ID:estatio,项目名称:estatio,代码行数:13,代码来源:PaymentBatchManager.java

示例8: nextBatch

@Action(
        semantics = SemanticsOf.SAFE,
        command = CommandReification.DISABLED,
        publishing = Publishing.DISABLED
)
public PaymentBatchManager nextBatch() {
    int selectedBatchIdx = this.getSelectedBatchIdx();
    if (selectedBatchIdx >= 0) {
        int nextBatchIdx = ++selectedBatchIdx;
        if (nextBatchIdx < this.getNewBatches().size()) {
            return new PaymentBatchManager(nextBatchIdx);
        }
    }
    return this;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:15,代码来源:PaymentBatchManager.java

示例9: previousBatch

@Action(
        semantics = SemanticsOf.SAFE,
        command = CommandReification.DISABLED,
        publishing = Publishing.DISABLED
)
public PaymentBatchManager previousBatch() {
    int selectedBatchIdx = this.getSelectedBatchIdx();
    if (selectedBatchIdx >= 0) {
        int previousBatchIdx = --selectedBatchIdx;
        if (previousBatchIdx >= 0) {
            return new PaymentBatchManager(previousBatchIdx);
        }
    }
    return this;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:15,代码来源:PaymentBatchManager.java

示例10: importBlob

@Action(publishing = Publishing.DISABLED, semantics = SemanticsOf.IDEMPOTENT)
@ActionLayout(named = "Import", cssClassFa = "fa-upload")
@MemberOrder(name = "keyItems", sequence = "2")
public List<KeyItemImportExportLineItem> importBlob(
        @Parameter(fileAccept = ".xlsx")
        @ParameterLayout(named = "Excel spreadsheet")
        final Blob spreadsheet) {
    WorksheetSpec spec = new WorksheetSpec(KeyItemImportExportLineItem.class, "keyItems");
    List<KeyItemImportExportLineItem> lineItems =
            excelService.fromExcel(spreadsheet, spec);
    container.informUser(lineItems.size() + " items imported");

    List<KeyItemImportExportLineItem> newItems = new ArrayList<>();
    for (KeyItemImportExportLineItem item : lineItems) {
        item.validate();
        newItems.add(new KeyItemImportExportLineItem(item));
    }
    for (KeyItem keyItem : keyTable.getItems()) {
        Boolean keyItemFound = false;
        for (KeyItemImportExportLineItem lineItem : newItems){
            if (lineItem.getUnitReference().equals(keyItem.getUnit().getReference())){
                keyItemFound = true;
                break;
            }
        }
        if (!keyItemFound) {
            KeyItemImportExportLineItem deletedItem = new KeyItemImportExportLineItem(keyItem);
            deletedItem.setStatus(Status.DELETED);
            newItems.add(deletedItem);
        }
    }
    return newItems;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:33,代码来源:KeyItemImportExportManager.java

示例11: importInvoices

@Action(publishing = Publishing.DISABLED, semantics = SemanticsOf.IDEMPOTENT)
@CollectionLayout(paged = -1)
public List<InvoiceImportLine> importInvoices(
        @Parameter(fileAccept = ".xlsx")
        @ParameterLayout(named = "Excel spreadsheet")
        final Blob spreadsheet) {
    List<InvoiceImportLine> lineItems =
            excelService.fromExcel(spreadsheet, InvoiceImportLine.class, InvoiceImportLine.class.getSimpleName());
    return lineItems;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:10,代码来源:InvoiceImportManager.java

示例12: downloadReviewPdf

@Action(
        semantics = SemanticsOf.SAFE,
        command = CommandReification.DISABLED,
        publishing = Publishing.DISABLED
)
public Blob downloadReviewPdf(
        final PaymentBatch paymentBatch,
        @Nullable final String documentName,
        @ParameterLayout(named = "How many first pages of each invoice's PDF?")
        final Integer numFirstPages,
        @ParameterLayout(named = "How many final pages of each invoice's PDF?")
        final Integer numLastPages) throws IOException {
    final String documentNameToUse = documentName != null ? documentName : paymentBatch.fileNameWithSuffix("pdf");
    return paymentBatch.downloadReviewPdf(documentNameToUse, numFirstPages, numLastPages);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:15,代码来源:PaymentBatchManager.java

示例13: downloadPaymentFile

@Action(
        semantics = SemanticsOf.SAFE,
        command = CommandReification.DISABLED,
        publishing = Publishing.DISABLED
)
public Clob downloadPaymentFile(
        final PaymentBatch paymentBatch,
        @Nullable final String documentName) {
    final String documentNameToUse = documentName != null ? documentName : paymentBatch.fileNameWithSuffix("xml");
    return factoryService.mixin(PaymentBatch.downloadPaymentFile.class, paymentBatch).act(documentNameToUse);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:11,代码来源:PaymentBatchManager.java

示例14: addInvoiceToPayByBankAccount

@Action(
        semantics = SemanticsOf.IDEMPOTENT,
        command = CommandReification.DISABLED,
        publishing = Publishing.DISABLED
)
public PaymentBatchManager addInvoiceToPayByBankAccount(
        final IncomingInvoice incomingInvoice,
        final BankAccount debtorBankAccount) {

    PaymentBatch paymentBatch = paymentBatchRepository.findOrCreateNewByDebtorBankAccount(debtorBankAccount);
    paymentBatch.addLineIfRequired(incomingInvoice);

    return new PaymentBatchManager();
}
 
开发者ID:estatio,项目名称:estatio,代码行数:14,代码来源:PaymentBatchManager.java

示例15: removeInvoice

@Action(
        semantics = SemanticsOf.IDEMPOTENT,
        command = CommandReification.DISABLED,
        publishing = Publishing.DISABLED
)
public PaymentBatchManager removeInvoice(
        final List<IncomingInvoice> incomingInvoices,
        @ParameterLayout(describedAs = "Whether the removed invoices should also be rejected")
        final boolean rejectAlso,
        @ParameterLayout(describedAs = "If rejecting, then explain why so that the error can be fixed")
        @Nullable final String rejectionReason) {
    PaymentBatch_removeInvoice().act(incomingInvoices, rejectAlso, rejectionReason);
    return new PaymentBatchManager();
}
 
开发者ID:estatio,项目名称:estatio,代码行数:14,代码来源:PaymentBatchManager.java


注:本文中的org.apache.isis.applib.annotation.Publishing.DISABLED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。