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


Java RuleAttribute.getResourceDescriptor方法代碼示例

本文整理匯總了Java中org.kuali.rice.kew.rule.bo.RuleAttribute.getResourceDescriptor方法的典型用法代碼示例。如果您正苦於以下問題:Java RuleAttribute.getResourceDescriptor方法的具體用法?Java RuleAttribute.getResourceDescriptor怎麽用?Java RuleAttribute.getResourceDescriptor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.kuali.rice.kew.rule.bo.RuleAttribute的用法示例。


在下文中一共展示了RuleAttribute.getResourceDescriptor方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: isMatch

import org.kuali.rice.kew.rule.bo.RuleAttribute; //導入方法依賴的package包/類
public boolean isMatch(DocumentContent docContent) {
    for (RuleTemplateAttributeBo ruleTemplateAttribute : getRuleTemplate().getActiveRuleTemplateAttributes()) {
        if (!ruleTemplateAttribute.isWorkflowAttribute()) {
            continue;
        }
        WorkflowRuleAttribute routingAttribute = ruleTemplateAttribute.getWorkflowAttribute();

        RuleAttribute ruleAttribute = ruleTemplateAttribute.getRuleAttribute();
        if (ruleAttribute.getType().equals(KewApiConstants.RULE_XML_ATTRIBUTE_TYPE)) {
            ((GenericXMLRuleAttribute) routingAttribute).setExtensionDefinition(RuleAttribute.to(ruleAttribute));
        }
        String className = ruleAttribute.getResourceDescriptor();
        List<RuleExtension> editedRuleExtensions = new ArrayList<RuleExtension>();
        for (RuleExtensionBo extension : getRuleExtensions()) {
            if (extension.getRuleTemplateAttribute().getRuleAttribute().getResourceDescriptor().equals(className)) {
                editedRuleExtensions.add(RuleExtensionBo.to(extension));
            }
        }
        if (!routingAttribute.isMatch(docContent, editedRuleExtensions)) {
            return false;
        }
    }
    return true;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:25,代碼來源:RuleBaseValues.java

示例2: findByRuleAttribute

import org.kuali.rice.kew.rule.bo.RuleAttribute; //導入方法依賴的package包/類
public List<RuleAttribute> findByRuleAttribute(RuleAttribute ruleAttribute) {
    QueryByCriteria.Builder builder =
                QueryByCriteria.Builder.create();

    List<Predicate> predicates = new ArrayList<Predicate>();
    if (ruleAttribute.getName() != null) {
        predicates.add(likeIgnoreCase("name",ruleAttribute.getName()));
    }

    if (ruleAttribute.getResourceDescriptor() != null) {
        predicates.add(likeIgnoreCase("resourceDescriptor",ruleAttribute.getResourceDescriptor()));
    }
    if (ruleAttribute.getType() != null) {
        predicates.add(likeIgnoreCase("type",ruleAttribute.getType()));
    }
    Predicate[] preds = predicates.toArray(new Predicate[predicates.size()]);
    builder.setPredicates(preds);
    QueryResults<RuleAttribute> results = getDataObjectService().findMatching(RuleAttribute.class, builder.build());
    return results.getResults();

}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:22,代碼來源:RuleAttributeDAOJpa.java

示例3: isMatch

import org.kuali.rice.kew.rule.bo.RuleAttribute; //導入方法依賴的package包/類
public boolean isMatch(DocumentContent docContent) {
    for (RuleTemplateAttributeBo ruleTemplateAttribute : getRuleTemplate().getActiveRuleTemplateAttributes()) {
        if (!ruleTemplateAttribute.isWorkflowAttribute()) {
            continue;
        }
        WorkflowRuleAttribute routingAttribute = (WorkflowRuleAttribute) ruleTemplateAttribute.getWorkflowAttribute();

        RuleAttribute ruleAttribute = ruleTemplateAttribute.getRuleAttribute();
        if (ruleAttribute.getType().equals(KewApiConstants.RULE_XML_ATTRIBUTE_TYPE)) {
            ((GenericXMLRuleAttribute) routingAttribute).setExtensionDefinition(RuleAttribute.to(ruleAttribute));
        }
        String className = ruleAttribute.getResourceDescriptor();
        List<RuleExtension> editedRuleExtensions = new ArrayList<RuleExtension>();
        for (RuleExtensionBo extension : getRuleExtensions()) {
            if (extension.getRuleTemplateAttribute().getRuleAttribute().getResourceDescriptor().equals(className)) {
                editedRuleExtensions.add(RuleExtensionBo.to(extension));
            }
        }
        if (!routingAttribute.isMatch(docContent, editedRuleExtensions)) {
            return false;
        }
    }
    return true;
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:25,代碼來源:RuleBaseValues.java

示例4: findByRuleAttribute

import org.kuali.rice.kew.rule.bo.RuleAttribute; //導入方法依賴的package包/類
public List<RuleAttribute> findByRuleAttribute(RuleAttribute ruleAttribute) {
    Criteria crit = new Criteria("RuleAttribute", "ra");

    if (ruleAttribute.getName() != null) {
        crit.rawJpql("UPPER(RULE_ATTRIB_NM) like '" + ruleAttribute.getName().toUpperCase() + "'");
    }

    if (ruleAttribute.getResourceDescriptor() != null) {
        crit.rawJpql("UPPER(RULE_ATTRIB_CLS_NM) like '" + ruleAttribute.getResourceDescriptor().toUpperCase() + "'");
    }
    if (ruleAttribute.getType() != null) {
        crit.rawJpql("UPPER(RULE_ATTRIB_TYP) like '" + ruleAttribute.getType().toUpperCase() + "'");
    }
    return new QueryByCriteria(entityManager, crit).toQuery().getResultList();

}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:17,代碼來源:RuleAttributeDAOJpaImpl.java

示例5: getAttributeObjectDefinition

import org.kuali.rice.kew.rule.bo.RuleAttribute; //導入方法依賴的package包/類
public ObjectDefinition getAttributeObjectDefinition(RuleAttribute ruleAttribute) {
    if (ruleAttribute.getApplicationId() == null) {
        return new ObjectDefinition(ruleAttribute.getResourceDescriptor(), this.getApplicationId());
    } else {
        return new ObjectDefinition(ruleAttribute.getResourceDescriptor(), ruleAttribute.getApplicationId());
    }
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:8,代碼來源:DocumentType.java

示例6: validate

import org.kuali.rice.kew.rule.bo.RuleAttribute; //導入方法依賴的package包/類
private void validate(RuleAttribute ruleAttribute) {
    LOG.debug("validating ruleAttribute");
    Collection errors = new ArrayList();
    if (ruleAttribute.getName() == null || ruleAttribute.getName().trim().equals("")) {
        errors.add(new WorkflowServiceErrorImpl("Please enter a rule attribute name.", RULE_ATTRIBUTE_NAME_REQUIRED));
        LOG.error("Rule attribute name is missing");
    } else {
    	ruleAttribute.setName(ruleAttribute.getName().trim());
        if (ruleAttribute.getId() == null) {
            RuleAttribute nameInUse = findByName(ruleAttribute.getName());
            if (nameInUse != null) {
                errors.add(new WorkflowServiceErrorImpl("Rule attribute name already in use", "routetemplate.ruleattribute.name.duplicate"));
                LOG.error("Rule attribute name already in use");
            }
        }
    }
    if (ruleAttribute.getResourceDescriptor() == null || ruleAttribute.getResourceDescriptor().trim().equals("")) {
        errors.add(new WorkflowServiceErrorImpl("Please enter a rule attribute class name.", RULE_ATTRIBUTE_CLASS_REQUIRED));
        LOG.error("Rule attribute class name is missing");
    } else {
    	ruleAttribute.setResourceDescriptor(ruleAttribute.getResourceDescriptor().trim());
    }

    LOG.debug("end validating ruleAttribute");
    if (!errors.isEmpty()) {
        throw new WorkflowServiceErrorException("RuleAttribute Validation Error", errors);
    }
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:29,代碼來源:RuleAttributeServiceImpl.java

示例7: loadRuleAttributeService

import org.kuali.rice.kew.rule.bo.RuleAttribute; //導入方法依賴的package包/類
@Override
public Object loadRuleAttributeService(RuleAttribute attribute, String defaultApplicationId) {
    Object attributeService = null;
    // first check if the class name is a valid and available java class
    String attributeName = attribute.getResourceDescriptor();
    ObjectDefinition attributeObjectDefinition = getAttributeObjectDefinition(attribute, defaultApplicationId);
    attributeService = GlobalResourceLoader.getObject(attributeObjectDefinition);
    if (attributeService == null) {
        // if we can't find a class, try a service
        attributeService = GlobalResourceLoader.getService(QName.valueOf(attributeName));
    }
    return attributeService;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:14,代碼來源:RuleAttributeServiceImpl.java

示例8: getAttributeObjectDefinition

import org.kuali.rice.kew.rule.bo.RuleAttribute; //導入方法依賴的package包/類
protected ObjectDefinition getAttributeObjectDefinition(RuleAttribute ruleAttribute, String defaultApplicationId) {
    if (ruleAttribute.getApplicationId() == null && defaultApplicationId != null) {
        return new ObjectDefinition(ruleAttribute.getResourceDescriptor(), defaultApplicationId);
    } else {
        return new ObjectDefinition(ruleAttribute.getResourceDescriptor(), ruleAttribute.getApplicationId());
    }
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:8,代碼來源:RuleAttributeServiceImpl.java

示例9: findByRuleAttribute

import org.kuali.rice.kew.rule.bo.RuleAttribute; //導入方法依賴的package包/類
public List<RuleAttribute> findByRuleAttribute(RuleAttribute ruleAttribute) {
	Criteria crit = new Criteria();
	if (ruleAttribute.getName() != null) {
		crit.addSql("UPPER(RULE_ATTRIB_NM) like '" + ruleAttribute.getName().toUpperCase() + "'");
	}
	if (ruleAttribute.getResourceDescriptor() != null) {
		crit.addSql("UPPER(RULE_ATTRIB_CLS_NM) like '" + ruleAttribute.getResourceDescriptor().toUpperCase() + "'");
	}
	if (ruleAttribute.getType() != null) {
		crit.addSql("UPPER(RULE_ATTRIB_TYP) like '" + ruleAttribute.getType().toUpperCase() + "'");
	}
	return (List<RuleAttribute>) this.getPersistenceBrokerTemplate().getCollectionByQuery(new QueryByCriteria(RuleAttribute.class, crit));

}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:15,代碼來源:RuleAttributeDAOOjbImpl.java

示例10: getAttributeObjectDefinition

import org.kuali.rice.kew.rule.bo.RuleAttribute; //導入方法依賴的package包/類
protected ObjectDefinition getAttributeObjectDefinition(RuleAttribute ruleAttribute) {
	return new ObjectDefinition(ruleAttribute.getResourceDescriptor(), ruleAttribute.getApplicationId());
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:4,代碼來源:RoleRouteModule.java


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