本文整理汇总了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));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}