public TCComponentRevisionRule getRevisionRule() throws TCException{
TCComponentRevisionRule revisionRule = null;
//校验版本规则是否正确
TCComponentRevisionRule[] listAllRules = TCComponentRevisionRule.listAllRules(session);
if(listAllRules != null){
for(TCComponentRevisionRule revRule : listAllRules){
if(revRule.getStringProperty("object_name").equals(revisionRuleName)){
revisionRule = revRule;
break;
}
}
}
if(revisionRule == null){
throw new TCException("The revision rule '" + revisionRuleName + "' dose not exist. Please check the Cust_PTECNEbomChangeReport_RevRule preferences.");
}
return revisionRule;
}