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


Java KrmsServiceLocatorInternal.getService方法代码示例

本文整理汇总了Java中org.kuali.rice.krms.impl.util.KrmsServiceLocatorInternal.getService方法的典型用法代码示例。如果您正苦于以下问题:Java KrmsServiceLocatorInternal.getService方法的具体用法?Java KrmsServiceLocatorInternal.getService怎么用?Java KrmsServiceLocatorInternal.getService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.krms.impl.util.KrmsServiceLocatorInternal的用法示例。


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

示例1: createEventAttributeDefinition

import org.kuali.rice.krms.impl.util.KrmsServiceLocatorInternal; //导入方法依赖的package包/类
private KrmsAttributeDefinitionBo createEventAttributeDefinition() {
    KrmsAttributeDefinitionService service = KrmsServiceLocatorInternal.getService("krmsAttributeDefinitionService");
    assertNotNull(service);

    KrmsAttributeDefinition krmsAttributeDefinition = krmsAttributeDefinitionService.getAttributeDefinitionByNameAndNamespace(
            EVENT_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE);
    if (krmsAttributeDefinition == null) {
        KrmsAttributeDefinition.Builder krmsAttributeDefinitionBuilder = KrmsAttributeDefinition.Builder.create(null, EVENT_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE);
        krmsAttributeDefinitionBuilder.setLabel("Event");
        krmsAttributeDefinitionBuilder.setActive(true);
        krmsAttributeDefinition = krmsAttributeDefinitionService.createAttributeDefinition(krmsAttributeDefinitionBuilder.build());
    }

    assertNotNull(krmsAttributeDefinition.getId());

    return KrmsAttributeDefinitionBo.from(krmsAttributeDefinition);
}
 
开发者ID:kuali,项目名称:rice,代码行数:18,代码来源:ValidationIntegrationTest.java

示例2: createPeopleFlowAttributeDefinition

import org.kuali.rice.krms.impl.util.KrmsServiceLocatorInternal; //导入方法依赖的package包/类
/**
 * Create an attribute definition for "peopleFlow" using given attribute and label
 */
private KrmsAttributeDefinition createPeopleFlowAttributeDefinition(String attribute, String label) {
    KrmsAttributeDefinitionService service = KrmsServiceLocatorInternal.getService("krmsAttributeDefinitionService");
    assertNotNull(service);
    KrmsAttributeDefinitionBo attributeDefinitionBo = new KrmsAttributeDefinitionBo();
    attributeDefinitionBo.setNamespace(KrmsConstants.KRMS_NAMESPACE);
    attributeDefinitionBo.setName(attribute);
    attributeDefinitionBo.setLabel(label);
    attributeDefinitionBo.setActive(true);
    attributeDefinitionBo = dataObjectService.save(attributeDefinitionBo, PersistenceOption.FLUSH);
    assertNotNull(attributeDefinitionBo.getId());
    return KrmsAttributeDefinitionBo.to(attributeDefinitionBo);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:16,代码来源:KewToRulesEngineIntegrationTest.java

示例3: createEventAttributeDefinition

import org.kuali.rice.krms.impl.util.KrmsServiceLocatorInternal; //导入方法依赖的package包/类
/**
 * Create an attribute definition for "Event" which is used to define the triggering event on an agenda.
 */
private KrmsAttributeDefinitionBo createEventAttributeDefinition() {
    KrmsAttributeDefinitionService service = KrmsServiceLocatorInternal.getService("krmsAttributeDefinitionService");
    assertNotNull(service);
    KrmsAttributeDefinitionBo attributeDefinitionBo = new KrmsAttributeDefinitionBo();
    attributeDefinitionBo.setNamespace(KrmsConstants.KRMS_NAMESPACE);
    attributeDefinitionBo.setName(EVENT_ATTRIBUTE);
    attributeDefinitionBo.setLabel("Event");
    attributeDefinitionBo.setActive(true);
    attributeDefinitionBo = dataObjectService.save(attributeDefinitionBo, PersistenceOption.FLUSH);
    assertNotNull(attributeDefinitionBo.getId());
    return attributeDefinitionBo;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:16,代码来源:KewToRulesEngineIntegrationTest.java

示例4: loadAgenda

import org.kuali.rice.krms.impl.util.KrmsServiceLocatorInternal; //导入方法依赖的package包/类
@Override
public Agenda loadAgenda(AgendaDefinition agendaDefinition) {

    if (agendaDefinition == null) { throw new RiceIllegalArgumentException("agendaDefinition must not be null"); }
    RepositoryToEngineTranslatorImpl repositoryToEngineTranslator = KrmsServiceLocatorInternal.getService(
            "repositoryToEngineTranslator");
    if (repositoryToEngineTranslator == null) {
        return null;
    }
    
    Map<String, String> existingAttributes = new HashMap<String, String>(agendaDefinition.getAttributes());
    existingAttributes.put("name", agendaDefinition.getName());
    
    return new BasicAgenda(existingAttributes, new LazyAgendaTree(agendaDefinition, repositoryToEngineTranslator));
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:16,代码来源:AgendaTypeServiceBase.java


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