當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。