本文整理匯總了Java中org.kuali.rice.kew.rule.WorkflowRuleAttribute.validateRuleData方法的典型用法代碼示例。如果您正苦於以下問題:Java WorkflowRuleAttribute.validateRuleData方法的具體用法?Java WorkflowRuleAttribute.validateRuleData怎麽用?Java WorkflowRuleAttribute.validateRuleData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.kuali.rice.kew.rule.WorkflowRuleAttribute
的用法示例。
在下文中一共展示了WorkflowRuleAttribute.validateRuleData方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getRuleFields
import org.kuali.rice.kew.rule.WorkflowRuleAttribute; //導入方法依賴的package包/類
@Override
public WorkflowRuleAttributeFields getRuleFields(Map<String, String> parameters,
ExtensionDefinition extensionDefinition,
boolean required)
throws RiceIllegalArgumentException {
if (parameters == null) {
parameters = new HashMap<String, String>();
}
WorkflowRuleAttribute attribute = loadAttribute(extensionDefinition);
attribute.setRequired(required);
List<RemotableAttributeError> errors = attribute.validateRuleData(parameters);
List<RemotableAttributeField> fields = FieldUtils.convertRowsToAttributeFields(attribute.getRuleRows());
List<RuleExtensionValue> ruleExtensionValues = attribute.getRuleExtensionValues();
Map<String, String> ruleExtensionValuesMap = new HashMap<String, String>();
for (RuleExtensionValue ruleExtensionValue : ruleExtensionValues) {
ruleExtensionValuesMap.put(ruleExtensionValue.getKey(), ruleExtensionValue.getValue());
}
return WorkflowRuleAttributeFields.create(errors, fields, ruleExtensionValuesMap);
}
示例2: getRoutingDataFields
import org.kuali.rice.kew.rule.WorkflowRuleAttribute; //導入方法依賴的package包/類
@Override
public WorkflowRuleAttributeFields getRoutingDataFields( Map<String, String> parameters,
ExtensionDefinition extensionDefinition,
boolean required)
throws RiceIllegalArgumentException {
if (parameters == null) {
parameters = new HashMap<String, String>();
}
WorkflowRuleAttribute attribute = loadAttribute(extensionDefinition);
attribute.setRequired(required);
List<RemotableAttributeError> allErrors = attribute.validateRoutingData(parameters);
List<RemotableAttributeError> ruleDataErrors = attribute.validateRuleData(parameters);
for (RemotableAttributeError error : ruleDataErrors) {
allErrors.add(error);
}
List<RemotableAttributeField> fields = FieldUtils.convertRowsToAttributeFields(attribute.getRoutingDataRows());
List<RuleExtensionValue> ruleExtensionValues = attribute.getRuleExtensionValues();
Map<String, String> ruleExtensionValuesMap = new HashMap<String, String>();
for (RuleExtensionValue ruleExtensionValue : ruleExtensionValues) {
ruleExtensionValuesMap.put(ruleExtensionValue.getKey(), ruleExtensionValue.getValue());
}
return WorkflowRuleAttributeFields.create(allErrors, fields, ruleExtensionValuesMap);
}
示例3: getSearchFields
import org.kuali.rice.kew.rule.WorkflowRuleAttribute; //導入方法依賴的package包/類
@Override
public WorkflowRuleAttributeFields getSearchFields(Map<String, String> parameters,
ExtensionDefinition extensionDefinition,
boolean required)
throws RiceIllegalArgumentException {
if (parameters == null) {
parameters = new HashMap<String, String>();
}
WorkflowRuleAttribute attribute = loadAttribute(extensionDefinition);
attribute.setRequired(required);
List<RemotableAttributeError> errors;
List<Row> searchRows;
if (attribute instanceof WorkflowRuleSearchAttribute) {
errors = ((WorkflowRuleSearchAttribute)attribute).validateSearchData(parameters);
searchRows = ((WorkflowRuleSearchAttribute)attribute).getSearchRows();
} else {
errors = attribute.validateRuleData(parameters);
searchRows = attribute.getRuleRows();
}
List<RemotableAttributeField> fields = FieldUtils.convertRowsToAttributeFields(searchRows);
List<RuleExtensionValue> ruleExtensionValues = attribute.getRuleExtensionValues();
Map<String, String> ruleExtensionValuesMap = new HashMap<String, String>();
for (RuleExtensionValue ruleExtensionValue : ruleExtensionValues) {
ruleExtensionValuesMap.put(ruleExtensionValue.getKey(), ruleExtensionValue.getValue());
}
return WorkflowRuleAttributeFields.create(errors, fields, ruleExtensionValuesMap);
}