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

Java ServiceRegistry2类代码示例

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

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



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

示例1: createTransition

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public IncomingInvoiceApprovalStateTransition createTransition(
        final IncomingInvoice domainObject,
        final IncomingInvoiceApprovalState fromState,
        final IPartyRoleType assignToIfAny,
        final Person personToAssignToIfAny,
        final String taskDescriptionIfAny,
        final ServiceRegistry2 serviceRegistry2) {

    final IncomingInvoiceApprovalStateTransition.Repository repository =
            serviceRegistry2.lookupService(IncomingInvoiceApprovalStateTransition.Repository.class);

    final String taskDescription = Util.taskDescriptionUsing(taskDescriptionIfAny, this);

    return repository.create(domainObject, this, fromState, assignToIfAny, personToAssignToIfAny, taskDescription);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:17,代码来源:IncomingInvoiceApprovalStateTransitionType.java


示例2: createTransition

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public PaymentBatchApprovalStateTransition createTransition(
        final PaymentBatch domainObject,
        final PaymentBatchApprovalState fromState,
        final IPartyRoleType assignToIfAny,
        final Person personToAssignToIfAny,
        final String taskDescriptionIfAny,
        final ServiceRegistry2 serviceRegistry2) {

    final PaymentBatchApprovalStateTransition.Repository repository =
            serviceRegistry2.lookupService(PaymentBatchApprovalStateTransition.Repository.class);

    final String taskDescription = Util.taskDescriptionUsing(taskDescriptionIfAny, this);

    return repository.create(domainObject, this, fromState, assignToIfAny, personToAssignToIfAny, taskDescription);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:17,代码来源:PaymentBatchApprovalStateTransitionType.java


示例3: createTransition

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public OrderApprovalStateTransition createTransition(
        final Order domainObject,
        final OrderApprovalState fromState,
        final IPartyRoleType assignToIfAny,
        final Person personToAssignToIfAny,
        final String taskDescriptionIfAny,
        final ServiceRegistry2 serviceRegistry2) {

    final OrderApprovalStateTransition.Repository repository =
            serviceRegistry2.lookupService(OrderApprovalStateTransition.Repository.class);

    final String taskDescription = Util.taskDescriptionUsing(taskDescriptionIfAny, this);

    return repository.create(domainObject, this, fromState, assignToIfAny, personToAssignToIfAny, taskDescription);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:17,代码来源:OrderApprovalStateTransitionType.java


示例4: canTransitionFromCurrentStateAndIsMatch

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
/**
 * Whether this domain object is in a state such that this transition could occur (subject to any additional
 * {@link StateTransitionType#isGuardSatisfied(Object, ServiceRegistry2) guards} also being satisfied).
 */
@Programmatic
default <
        DO,
        ST extends StateTransition<DO, ST, STT, S>,
        STT extends StateTransitionType<DO, ST, STT, S>,
        S extends State<S>
>  boolean canTransitionFromCurrentStateAndIsMatch(
        final DO domainObject,
        final ServiceRegistry2 serviceRegistry2) {

    final STT transitionType = (STT) this;
    final StateTransitionService stateTransitionService = serviceRegistry2.lookupService(StateTransitionService.class);

    final S currentStateIfAny = stateTransitionService.currentStateOf(domainObject, transitionType);

    return canTransitionFromStateAndIsMatch(domainObject, currentStateIfAny, serviceRegistry2);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:22,代码来源:StateTransitionType.java


示例5: upsertUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
public void upsertUsing(final ServiceRegistry2 serviceRegistry2) {
    final FixedAssetRegistrationTypeRepository repository =
            serviceRegistry2.lookupService(FixedAssetRegistrationTypeRepository.class);
    final RepositoryService  repositoryService =
            serviceRegistry2.lookupService(RepositoryService.class);

    final List<FixedAssetRegistrationType> types = repositoryService.allInstances(FixedAssetRegistrationType.class).stream()
            .filter(this::matches)
            .collect(Collectors.toList());
    switch (types.size()) {
    case 0:
        repository.create(title, implementationClass);
        break;
    case 1:
        final FixedAssetRegistrationType fart = types.get(0);
        fart.setFullyQualifiedClassName(implementationClass.getName());
        break;
    default:
        throw new IllegalArgumentException("Found " + types.size() + " matching " + this);
    }
}
 
开发者ID:estatio,项目名称:estatio,代码行数:22,代码来源:RegistrationModuleSeedService.java


示例6: upsertUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
public void upsertUsing(final ServiceRegistry2 serviceRegistry2) {
    final RepositoryService repositoryService =
            serviceRegistry2.lookupService(RepositoryService.class);

    final List<Applicability> types = repositoryService.allInstances(Applicability.class).stream()
            .filter(this::matches)
            .collect(Collectors.toList());

    final Applicability applicability;
    switch (types.size()) {
    case 0:
        final CategoryRepository categoryRepository =
                serviceRegistry2.lookupService(CategoryRepository.class);

        Taxonomy taxonomy = (Taxonomy) categoryRepository.findByReference(taxonomyReference);
        if(taxonomy == null) {
            final String taxonomyName =
                    Enums.getFriendlyNameOf(this.taxonomyReference);
            taxonomy = categoryRepository.createTaxonomy(taxonomyName);
            taxonomy.setReference(this.taxonomyReference);
        }
        applicability = new Applicability(taxonomy, atPath, appliesTo.getName());
        repositoryService.persistAndFlush(applicability);
        break;
    case 1:
        applicability = types.get(0);
        applicability.setDomainType(appliesTo.getName());
        break;
    default:
        throw new IllegalArgumentException("Found " + types.size() + " matching " + this);
    }
}
 
开发者ID:estatio,项目名称:estatio,代码行数:33,代码来源:ClassificationApplicabilitySeedService.java


示例7: upsertUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
public void upsertUsing(final ServiceRegistry2 serviceRegistry2) {
    final RepositoryService repositoryService =
            serviceRegistry2.lookupService(RepositoryService.class);
    final LinkRepository linkRepository =
            serviceRegistry2.lookupService(LinkRepository.class);

    final List<Link> links = linkRepository.allLinks().stream()
                                .filter(this::matches)
                                .collect(Collectors.toList());
    final Link link;
    switch (links.size()) {
    case 0:
        link = new Link();
        link.setName(name);
        link.setUrlTemplate(urlTemplate);
        link.setClassName(clazz.getName());
        link.setApplicationTenancyPath(atPath);
        repositoryService.persist(link);
        break;
    case 1:
        link = links.get(0);
        link.setUrlTemplate(getUrlTemplate());
        link.setClassName(getClazz().getName());
        break;
    default:
        throw new IllegalArgumentException("Found " + links.size() + " matching " + this);
    }
}
 
开发者ID:estatio,项目名称:estatio,代码行数:29,代码来源:LinkModuleSeedService.java


示例8: createTransition

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public BankAccountVerificationStateTransition createTransition(
        final BankAccount domainObject,
        final BankAccountVerificationState fromState,
        final IPartyRoleType assignToIfAny,
        final Person personToAssignToIfAny,
        final String taskDescriptionIfAny,
        final ServiceRegistry2 serviceRegistry2) {

    final BankAccountVerificationStateTransition.Repository repository =
            serviceRegistry2.lookupService(BankAccountVerificationStateTransition.Repository.class);

    final String taskDescription = Util.taskDescriptionUsing(taskDescriptionIfAny, this);
    return repository.create(domainObject, this, fromState, assignToIfAny, personToAssignToIfAny, taskDescription);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:16,代码来源:BankAccountVerificationStateTransitionType.java


示例9: applyTo

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
/**
 * Allows the type to apply changes to the target domain object if necessary.
 *
 * <p>
 *     For implementations that hold the relevant state entirely in the corresponding {@link StateTransition}, this
 *     method will be a no-op.  However, some implementations might want to "push" the current state onto the
 *     domain object (for convenience or as a performance optimisation); in which case this is the place to do it.
 * </p>
 */
default void applyTo(
        final DO domainObject,
        final Class<ST> stateTransitionClass,
        final ServiceRegistry2 serviceRegistry2) {

    // push the to state into the domain object (if Stateful)
    if(domainObject instanceof Stateful) {
        Stateful stateful = (Stateful) domainObject;
        stateful.setStateOf(stateTransitionClass, this.getToState());
    }
}
 
开发者ID:estatio,项目名称:estatio,代码行数:21,代码来源:StateTransitionType.java


示例10: canTransitionFromStateAndIsMatch

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
/**
 * Whether this domain object could transition from the specified state.
 */
@Programmatic
default <
        DO,
        ST extends StateTransition<DO, ST, STT, S>,
        STT extends StateTransitionType<DO, ST, STT, S>,
        S extends State<S>
>  boolean canTransitionFromStateAndIsMatch(
        final DO domainObject,
        final S startingState,
        final ServiceRegistry2 serviceRegistry2) {
    final STT transitionType = (STT) this;
    return transitionType.canTransition(startingState) &&
            transitionType.isMatch(domainObject, serviceRegistry2);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:18,代码来源:StateTransitionType.java


示例11: createTransition

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public IncomingDocumentCategorisationStateTransition createTransition(
        final Document domainObject,
        final IncomingDocumentCategorisationState fromState,
        final IPartyRoleType assignToIfAny,
        final Person personToAssignToIfAny,
        final String taskDescriptionIfAny, final ServiceRegistry2 serviceRegistry2) {

    final IncomingDocumentCategorisationStateTransition.Repository repository =
            serviceRegistry2.lookupService(IncomingDocumentCategorisationStateTransition.Repository.class);

    final String taskDescription = Util.taskDescriptionUsing(taskDescriptionIfAny, this);

    return repository.create(domainObject, this, fromState, assignToIfAny, personToAssignToIfAny, taskDescription);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:16,代码来源:IncomingDocumentCategorisationStateTransitionType.java


示例12: findUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public Budget findUsing(final ServiceRegistry2 serviceRegistry) {
    final Property property = property_d.findUsing(serviceRegistry);
    final BudgetRepository budgetRepository = serviceRegistry.lookupService(BudgetRepository.class);

    return budgetRepository.findByPropertyAndStartDate(property, startDate);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:8,代码来源:Budget_enum.java


示例13: findUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public Person findUsing(final ServiceRegistry2 serviceRegistry) {
    final PartyRepository partyRepository = serviceRegistry
            .lookupService(PartyRepository.class);
    final Party party = partyRepository.findPartyByReference(ref);
    return (Person) party;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:8,代码来源:Person_enum.java


示例14: findUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public LeaseItem findUsing(final ServiceRegistry2 serviceRegistry) {
    final Lease lease = lease_d.findUsing(serviceRegistry);
    final LocalDate startDate = lease.getStartDate();
    final LeaseItemRepository leaseItemRepository = serviceRegistry.lookupService(LeaseItemRepository.class);
    return leaseItemRepository.findLeaseItem(
            lease, LeaseItemForEntryFeeBuilder.LEASE_ITEM_TYPE, startDate, sequence);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:9,代码来源:LeaseItemForEntryFee_enum.java


示例15: findUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public LeaseItem findUsing(final ServiceRegistry2 serviceRegistry) {
    final Lease lease = lease_d.findUsing(serviceRegistry);
    final LocalDate startDate = lease.getStartDate();
    final LeaseItemRepository leaseItemRepository = serviceRegistry.lookupService(LeaseItemRepository.class);
    return leaseItemRepository.findLeaseItem(
            lease, LeaseItemForMarketingBuilder.LEASE_ITEM_TYPE, startDate, sequence);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:9,代码来源:LeaseItemForMarketing_enum.java


示例16: findUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public LeaseItem findUsing(final ServiceRegistry2 serviceRegistry) {
    final Lease lease = lease_d.findUsing(serviceRegistry);
    final LocalDate startDate = lease.getStartDate();
    final LeaseItemRepository leaseItemRepository = serviceRegistry.lookupService(LeaseItemRepository.class);
    return leaseItemRepository.findLeaseItem(
            lease, LeaseItemForDepositBuilder.LEASE_ITEM_TYPE, startDate, sequence);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:9,代码来源:LeaseItemForDeposit_enum.java


示例17: findUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public LeaseItem findUsing(final ServiceRegistry2 serviceRegistry) {
    final Lease lease = lease_d.findUsing(serviceRegistry);
    final LocalDate startDate = lease.getStartDate();
    final LeaseItemRepository leaseItemRepository = serviceRegistry.lookupService(LeaseItemRepository.class);
    return leaseItemRepository.findLeaseItem(
            lease, LeaseItemForDiscountBuilder.LEASE_ITEM_TYPE, startDate, sequence);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:9,代码来源:LeaseItemForDiscount_enum.java


示例18: findUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public LeaseItem findUsing(final ServiceRegistry2 serviceRegistry) {
    final Lease lease = lease_d.findUsing(serviceRegistry);
    final LocalDate startDate = lease.getStartDate();
    final LeaseItemRepository leaseItemRepository = serviceRegistry.lookupService(LeaseItemRepository.class);
    return leaseItemRepository.findLeaseItem(
            lease, LeaseItemForServiceChargeBuilder.LEASE_ITEM_TYPE, startDate, sequence);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:9,代码来源:LeaseItemForServiceCharge_enum.java


示例19: findUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public LeaseItem findUsing(final ServiceRegistry2 serviceRegistry) {
    final Lease lease = lease_d.findUsing(serviceRegistry);
    final LocalDate startDate = lease.getStartDate();
    final LeaseItemRepository leaseItemRepository = serviceRegistry.lookupService(LeaseItemRepository.class);
    return leaseItemRepository.findLeaseItem(
            lease, LeaseItemForIndexableBuilder.LEASE_ITEM_TYPE, startDate, sequence);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:9,代码来源:LeaseItemForIndexableServiceCharge_enum.java


示例20: findUsing

import org.apache.isis.applib.services.registry.ServiceRegistry2; //导入依赖的package包/类
@Override
public LeaseItem findUsing(final ServiceRegistry2 serviceRegistry) {
    final Lease lease = lease_d.findUsing(serviceRegistry);
    final LocalDate startDate = lease.getStartDate();
    final LeaseItemRepository leaseItemRepository = serviceRegistry.lookupService(LeaseItemRepository.class);
    return leaseItemRepository.findLeaseItem(
            lease, LeaseItemForTurnoverRentBuilder.LEASE_ITEM_TYPE, startDate, sequence);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:9,代码来源:LeaseItemForTurnoverRent_enum.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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