本文整理汇总了Java中org.kuali.rice.kew.rule.bo.RuleAttribute.to方法的典型用法代码示例。如果您正苦于以下问题:Java RuleAttribute.to方法的具体用法?Java RuleAttribute.to怎么用?Java RuleAttribute.to使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.rule.bo.RuleAttribute
的用法示例。
在下文中一共展示了RuleAttribute.to方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRuleRows
import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
@Override
public WorkflowRuleAttributeRows getRuleRows(Map<String, String> parameters, RuleTemplateAttributeBo ruleTemplateAttribute) {
required(ruleTemplateAttribute, "ruleTemplateAttribute");
if (parameters == null) {
parameters = Collections.emptyMap();
}
RuleAttribute ruleAttribute = ruleTemplateAttribute.getRuleAttribute();
ExtensionDefinition extensionDefinition = RuleAttribute.to(ruleAttribute);
WorkflowRuleAttributeHandlerService handler = getHandler(extensionDefinition);
WorkflowRuleAttributeFields fields = handler.getRuleFields(parameters, extensionDefinition, ruleTemplateAttribute.isRequired());
return new WorkflowRuleAttributeRows(fields);
}
示例2: getRoutingDataRows
import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
@Override
public WorkflowRuleAttributeRows getRoutingDataRows(Map<String, String> parameters, RuleTemplateAttributeBo ruleTemplateAttribute) {
required(ruleTemplateAttribute, "ruleTemplateAttribute");
if (parameters == null) {
parameters = Collections.emptyMap();
}
RuleAttribute ruleAttribute = ruleTemplateAttribute.getRuleAttribute();
ExtensionDefinition extensionDefinition = RuleAttribute.to(ruleAttribute);
WorkflowRuleAttributeHandlerService handler = getHandler(extensionDefinition);
WorkflowRuleAttributeFields fields = handler.getRoutingDataFields(parameters, extensionDefinition, ruleTemplateAttribute.isRequired());
return new WorkflowRuleAttributeRows(fields);
}
示例3: getRoleNames
import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
@Override
public List<RoleName> getRoleNames(RuleTemplateAttributeBo ruleTemplateAttribute) {
required(ruleTemplateAttribute, "ruleTemplateAttribute");
RuleAttribute ruleAttribute = ruleTemplateAttribute.getRuleAttribute();
ExtensionDefinition extensionDefinition = RuleAttribute.to(ruleAttribute);
WorkflowRuleAttributeHandlerService handler = getHandler(extensionDefinition);
return handler.getRoleNames(extensionDefinition);
}
示例4: convertWorkflowAttributeDefinition
import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
/**
* New for Rice 2.0
*/
public static AttributeDefinition convertWorkflowAttributeDefinition(WorkflowAttributeDefinition definition) {
if (definition == null) {
return null;
}
//KULRICE-7643
ExtensionDefinition extensionDefinition = null;
List<RuleAttribute> ruleAttribute = KEWServiceLocator.getRuleAttributeService().findByClassName(definition.getAttributeName());
if (ruleAttribute == null || ruleAttribute.isEmpty()) {
extensionDefinition = KewApiServiceLocator.getExtensionRepositoryService().getExtensionByName(definition.getAttributeName());
}else{
//TODO: Should we do something more intelligent here? Rice 1.x returned only a single entry but we can now have a list
RuleAttribute tmpAttr = ruleAttribute.get(0);
extensionDefinition = RuleAttribute.to(tmpAttr);
if(ruleAttribute.size() > 1){
LOG.warn("AttributeDefinition lookup (findByClassName) returned multiple attribute for the same class name. This should not happen, investigation recommended for classname: "
+ definition.getAttributeName() + " which has " + ruleAttribute.size() + " entries.");
}
}
if (extensionDefinition == null) {
throw new WorkflowRuntimeException("Extension " + definition.getAttributeName() + " not found");
}
/*RuleAttribute ruleAttribute = KEWServiceLocator.getRuleAttributeService().findByName(definition.getAttributeName());
if (ruleAttribute == null) {
throw new WorkflowRuntimeException("Attribute " + definition.getAttributeName() + " not found");
}*/
ObjectDefinition objectDefinition = new ObjectDefinition(extensionDefinition.getResourceDescriptor());
if (definition.getParameters() != null) {
for (String parameter : definition.getParameters()) {
objectDefinition.addConstructorParameter(new DataDefinition(parameter, String.class));
}
}
boolean propertiesAsMap = KewApiConstants.RULE_XML_ATTRIBUTE_TYPE.equals(extensionDefinition.getType()) || KewApiConstants
.SEARCHABLE_XML_ATTRIBUTE_TYPE.equals(extensionDefinition.getType());
if (!propertiesAsMap && definition.getPropertyDefinitions() != null) {
for (org.kuali.rice.kew.api.document.PropertyDefinition propertyDefinition : definition
.getPropertyDefinitions()) {
objectDefinition.addProperty(new PropertyDefinition(propertyDefinition.getName(), new DataDefinition(
propertyDefinition.getValue(), String.class)));
}
}
return new AttributeDefinition(extensionDefinition, objectDefinition);
}
示例5: translateFromRuleAttribute
import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
private ExtensionDefinition translateFromRuleAttribute(RuleAttribute ruleAttribute) {
return RuleAttribute.to(ruleAttribute);
}