本文整理匯總了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);
}