當前位置: 首頁>>代碼示例>>Java>>正文


Java WorkflowRuleAttribute.validateRuleData方法代碼示例

本文整理匯總了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);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:20,代碼來源:WorkflowRuleAttributeHandlerServiceImpl.java

示例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);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:24,代碼來源:WorkflowRuleAttributeHandlerServiceImpl.java

示例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);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:28,代碼來源:WorkflowRuleAttributeHandlerServiceImpl.java


注:本文中的org.kuali.rice.kew.rule.WorkflowRuleAttribute.validateRuleData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。