• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Publishing类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: completed

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@Action(
        domainEvent =CompletedDomainEvent.class,
        publishing = Publishing.ENABLED,
        invokeOn = InvokeOn.OBJECT_AND_COLLECTION
)
public ToDoItem completed() {
    setComplete(true);
    
    //
    // remainder of method just demonstrates the use of the ActionInvocationContext service
    //
    @SuppressWarnings("unused")
    final List<Object> allObjects = actionInvocationContext.getDomainObjects();

    LOG.debug("completed: "
            + actionInvocationContext.getIndex() +
            " [" + actionInvocationContext.getSize() + "]"
            + (actionInvocationContext.isFirst() ? " (first)" : "")
            + (actionInvocationContext.isLast() ? " (last)" : ""));

    // if invoked as a regular action, return this object;
    // otherwise return null (so go back to the list)
    return actionInvocationContext.getInvokedOn() == InvokedOn.COLLECTION? null: this;
}
 
开发者ID:isisaddons,项目名称:isis-app-todoapp,代码行数:25,代码来源:ToDoItem.java


示例2: completeBatch

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@Action(
        semantics = SemanticsOf.IDEMPOTENT_ARE_YOU_SURE,
        command = CommandReification.DISABLED,
        publishing = Publishing.DISABLED
)
public PaymentBatchManager completeBatch(
        final DateTime requestedExecutionDate,
        @Nullable final String comment) {
    // use the wrapper factory to generate events
    wrapperFactory.wrap(PaymentBatch_complete()).act(requestedExecutionDate, comment);

    // rather than return this manager, create a new one (force page reload)
    final PaymentBatchManager paymentBatchManager = new PaymentBatchManager();
    serviceRegistry2.injectServicesInto(paymentBatchManager);
    return new PaymentBatchManager(paymentBatchManager.getSelectedBatchIdx());

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


示例3: downloadExcelExportForCompletedBatches

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@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,代码行数:27,代码来源:PaymentBatchManager.java


示例4: act

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@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,代码行数:22,代码来源:PaymentBatch.java


示例5: uploadIndexValues

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@Action(publishing = Publishing.DISABLED, semantics = SemanticsOf.IDEMPOTENT)
@MemberOrder(sequence="2")
public List<IndexValueMaintLineItem> uploadIndexValues(
        @Parameter(fileAccept = ".xlsx")
        @ParameterLayout(named = "Excel spreadsheet")
        final Blob spreadsheet,
        final Country country) {

    final ApplicationTenancy applicationTenancy = estatioApplicationTenancyRepository.findOrCreateTenancyFor(country);

    List<IndexValueMaintLineItem> lineItems = 
            excelService.fromExcel(spreadsheet, IndexValueMaintLineItem.class, IndexValueMaintLineItem.class.getSimpleName());
    for (IndexValueMaintLineItem lineItem : lineItems) {
        lineItem.setAtPath(applicationTenancy.getPath());
    }
    return lineItems;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:18,代码来源:IndexValuesMaintenanceMenu.java


示例6: upload

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@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,代码行数:21,代码来源:LeaseTermForServiceChargeBudgetAuditManager.java


示例7: updateName

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@Action(
        command = CommandReification.ENABLED,
        publishing = Publishing.ENABLED,
        semantics = SemanticsOf.IDEMPOTENT,
        domainEvent = UpdateNameDomainEvent.class
)
public SimpleObject updateName(@ParameterLayout(named="Name") final String name) {
    setName(name);
    return this;
}
 
开发者ID:Stephen-Cameron-Data-Services,项目名称:isis-agri,代码行数:11,代码来源:SimpleObject.java


示例8: getNotes

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@Property(
        command = CommandReification.ENABLED,
        publishing = Publishing.ENABLED,
        domainEvent = NotesDomainEvent.class
)
public String getNotes() {
    return notes;
}
 
开发者ID:Stephen-Cameron-Data-Services,项目名称:isis-agri,代码行数:9,代码来源:SimpleObject.java


示例9: updateSomeStringOptionalWithMultiChoices

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@Action(semantics=SemanticsOf.IDEMPOTENT, publishing = Publishing.ENABLED)
public TextObject updateSomeStringOptionalWithMultiChoices(
        // @Nullable
        @ParameterLayout(named = "Choose some string(s)")
        final List<String> strings) {
    final String asStr = SeparatorUtil.asStr(strings);
    setSomeStringOptionalWithMultiChoices(asStr);
    return this;
}
 
开发者ID:isisaddons,项目名称:isis-app-kitchensink,代码行数:10,代码来源:TextObject.java


示例10: updateSomeStringOptionalWithMultiAutoComplete

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@Action(semantics=SemanticsOf.IDEMPOTENT, publishing = Publishing.ENABLED)
public TextObject updateSomeStringOptionalWithMultiAutoComplete(
        @Nullable
        final List<String> strings) {
    setSomeStringOptionalWithMultiAutoComplete(SeparatorUtil.asStr(strings));
    return this;
}
 
开发者ID:isisaddons,项目名称:isis-app-kitchensink,代码行数:8,代码来源:TextObject.java


示例11: importBlob

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@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,代码行数:15,代码来源:ChargeImportManager.java


示例12: importBudget

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@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,代码行数:33,代码来源:BudgetImportExportManager.java


示例13: importExportBudget

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@Action(
        semantics = SemanticsOf.IDEMPOTENT,
        publishing = Publishing.DISABLED
)
@ActionLayout(contributed = Contributed.AS_ACTION)
public BudgetImportExportManager importExportBudget(Budget budget) {

    return new BudgetImportExportManager(budget);

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


示例14: reset

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@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,代码行数:14,代码来源:PaymentBatchManager.java


示例15: nextBatch

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@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,代码行数:16,代码来源:PaymentBatchManager.java


示例16: previousBatch

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@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,代码行数:16,代码来源:PaymentBatchManager.java


示例17: selectBatch

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@Action(
        semantics = SemanticsOf.SAFE,
        command = CommandReification.DISABLED,
        publishing = Publishing.DISABLED
)
public PaymentBatchManager selectBatch(final PaymentBatch paymentBatch) {
    final int selectedBatchIdx = getNewBatches().indexOf(paymentBatch);
    return new PaymentBatchManager(selectedBatchIdx);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:10,代码来源:PaymentBatchManager.java


示例18: downloadReviewPdf

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@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,代码行数:16,代码来源:PaymentBatchManager.java


示例19: downloadPaymentFile

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@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,代码行数:12,代码来源:PaymentBatchManager.java


示例20: addInvoiceToPayByBankAccount

import org.apache.isis.applib.annotation.Publishing; //导入依赖的package包/类
@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,代码行数:15,代码来源:PaymentBatchManager.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java QuartzSchedulerResources类代码示例发布时间:2022-05-22
下一篇:
Java Options类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap