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