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


Java ContextBo.setName方法代码示例

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


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

示例1: createContext

import org.kuali.rice.krms.impl.repository.ContextBo; //导入方法依赖的package包/类
private ContextBo createContext() {
    // set up a simple default type for the context
    KrmsTypeRepositoryService krmsTypeRepositoryService = KrmsApiServiceLocator.getKrmsTypeRepositoryService();
    KrmsTypeDefinition.Builder typeDefinition = KrmsTypeDefinition.Builder.create(KrmsConstants.KRMS_NAMESPACE, "DefaultContextType");
    KrmsTypeDefinition defaultContextType = krmsTypeRepositoryService.createKrmsType(typeDefinition.build());

    ContextBo contextBo = new ContextBo();
    contextBo.setNamespace(KrmsConstants.KRMS_NAMESPACE);
    contextBo.setName("MyContext");
    contextBo.setTypeId(defaultContextType.getId());

    ContextDefinition contextDefinition = ruleManagementService.getContextByNameAndNamespace("MyContext", KrmsConstants.KRMS_NAMESPACE);

    if (contextDefinition == null) {

        return ContextBo.from(ruleManagementService.createContext(ContextBo.to(contextBo)));
    }

    ruleManagementService.updateContext(ContextBo.to(contextBo));

    return ContextBo.from(ruleManagementService.getContextByNameAndNamespace("MyContext", KrmsConstants.KRMS_NAMESPACE));
}
 
开发者ID:kuali,项目名称:rice,代码行数:23,代码来源:KewToRulesEngineIntegrationTest.java

示例2: processAfterCopy

import org.kuali.rice.krms.impl.repository.ContextBo; //导入方法依赖的package包/类
@Override
public void processAfterCopy(MaintenanceDocument document, Map<String, String[]> requestParameters) {
    ContextBo context = (ContextBo) document.getNewMaintainableObject().getDataObject();

    if (context.getId()== null) {
        context.setId(contextIdIncrementer.getNewId());
    }

    if(context.getName() == null) {
        context.setName(" Copy " + System.currentTimeMillis());
    }

    context.setAgendas(null);
    for (ContextAttributeBo attributeBo : context.getAttributeBos()) {
        attributeBo.setId(null);
        attributeBo.setVersionNumber(null);
    }

    super.processAfterCopy(document,
            requestParameters);
}
 
开发者ID:kuali,项目名称:rice,代码行数:22,代码来源:ContextMaintainable.java

示例3: createContext

import org.kuali.rice.krms.impl.repository.ContextBo; //导入方法依赖的package包/类
private ContextBo createContext() {
    // set up a simple default type for the context
    KrmsTypeRepositoryService krmsTypeRepositoryService = KrmsApiServiceLocator.getKrmsTypeRepositoryService();
    KrmsTypeDefinition.Builder typeDefinition = KrmsTypeDefinition.Builder.create(KrmsConstants.KRMS_NAMESPACE, "DefaultContextType");
    KrmsTypeDefinition defaultContextType = krmsTypeRepositoryService.createKrmsType(typeDefinition.build());

    ContextBo contextBo = new ContextBo();
    contextBo.setNamespace(KrmsConstants.KRMS_NAMESPACE);
    contextBo.setName("MyContext");
    contextBo.setTypeId(defaultContextType.getId());
    return dataObjectService.save(contextBo, PersistenceOption.FLUSH);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:13,代码来源:KewToRulesEngineIntegrationTest.java

示例4: createContext

import org.kuali.rice.krms.impl.repository.ContextBo; //导入方法依赖的package包/类
private ContextBo createContext() {
    KrmsAttributeTypeDefinitionAndBuilders defs = createKrmsAttributeTypeDefinitionAndBuilders(
            "ContextAttributeName", KrmsConstants.KRMS_NAMESPACE, "ContextLabel", true, "ContextTypeName",
            "ContextTypeId", "ContextServiceName", krmsTypeBoService, 1);

    ContextBo contextBo = new ContextBo();
    contextBo.setNamespace(KrmsConstants.KRMS_NAMESPACE);
    contextBo.setName(CONTEXT_NAME);
    contextBo.setTypeId(defs.typeDef.getId());

    return getDataObjectService().save(contextBo, PersistenceOption.FLUSH);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:13,代码来源:ValidationIntegrationTest.java

示例5: createContext

import org.kuali.rice.krms.impl.repository.ContextBo; //导入方法依赖的package包/类
private ContextBo createContext() {
    // set up a simple default type for the context
    KrmsTypeRepositoryService krmsTypeRepositoryService = KrmsApiServiceLocator.getKrmsTypeRepositoryService();
    KrmsTypeDefinition.Builder typeDefinition = KrmsTypeDefinition.Builder.create(KrmsConstants.KRMS_NAMESPACE, "DefaultContextType");
    KrmsTypeDefinition defaultContextType = krmsTypeRepositoryService.createKrmsType(typeDefinition.build());

    ContextBo contextBo = new ContextBo();
    contextBo.setNamespace(KrmsConstants.KRMS_NAMESPACE);
    contextBo.setName("MyContext");
    contextBo.setTypeId(defaultContextType.getId());
    return businessObjectService.save(contextBo);
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:13,代码来源:KewToRulesEngineIntegrationTest.java

示例6: createContext

import org.kuali.rice.krms.impl.repository.ContextBo; //导入方法依赖的package包/类
private ContextBo createContext() {
    KrmsAttributeTypeDefinitionAndBuilders defs = createKrmsAttributeTypeDefinitionAndBuilders(
            "ContextAttributeName", KrmsConstants.KRMS_NAMESPACE, "ContextLabel", true, "ContextTypeName",
            "ContextTypeId", "ContextServiceName", krmsTypeRepositoryService, 1);

    ContextBo contextBo = new ContextBo();
    contextBo.setNamespace(KrmsConstants.KRMS_NAMESPACE);
    contextBo.setName(CONTEXT_NAME);
    contextBo.setTypeId(defs.typeDef.getId());
    return (ContextBo)getBoService().save(contextBo);
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:12,代码来源:ValidationIntegrationTest.java


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