本文整理匯總了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;
}
示例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();
}
示例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;
}
示例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();
}
示例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());
}
}
示例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);
}
}
示例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;
}
示例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());
}
}
示例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));
}
示例10: getAttributeObjectDefinition
import org.kuali.rice.kew.rule.bo.RuleAttribute; //導入方法依賴的package包/類
protected ObjectDefinition getAttributeObjectDefinition(RuleAttribute ruleAttribute) {
return new ObjectDefinition(ruleAttribute.getResourceDescriptor(), ruleAttribute.getApplicationId());
}