| java.lang.Object edu.iu.uis.eden.routetemplate.RuleServiceImpl
Inner Class :public class RuleDelegationSorter implements Comparator | |
Method Summary | |
public void | delete(Long ruleBaseValuesId) | public void | deleteRuleResponsibilityById(Long ruleResponsibilityId) | public Element | export(ExportDataSet dataSet) | public List | fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType, boolean ignoreCache) | public List | fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType) | public List | fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType, Timestamp effectiveDate) | public List | fetchAllRules(boolean currentRules) | public List | findByRouteHeaderId(Long routeHeaderId) | public RuleResponsibility | findByRuleResponsibilityId(Long ruleResponsibilityId) | public RuleBaseValues | findDefaultRuleByRuleTemplateId(Long ruleTemplateId) | public RuleBaseValues | findRuleBaseValuesById(Long ruleBaseValuesId) | public List | findRuleBaseValuesByResponsibilityReviewer(String reviewerName, String type) | public RuleResponsibility | findRuleResponsibility(Long responsibilityId) | protected void | flushDocumentTypeFromCache(String documentTypeName) | protected void | flushListFromCache(String ruleTemplateName, String documentTypeName) | public ActionRequestService | getActionRequestService() | protected String | getDocumentTypeRuleCacheGroupName(String documentTypeName) | public DocumentTypeService | getDocumentTypeService() | protected List<RuleBaseValues> | getListFromCache(String ruleTemplateName, String documentTypeName) | public RuleBaseValues | getParentRule(Long ruleBaseValuesId) | public RuleBaseValues | getParentRule(RuleBaseValues rule) | protected String | getRuleCacheKey(String ruleTemplateName, String docTypeName) Returns the key of the rule cache. | public RuleDAO | getRuleDAO() | public String | getRuleDocmentTypeName(List rules) This configuration is currently stored in a application constant named "Rule.Config.CustomDocTypes",
long term we should come up with a better solution. | public RuleResponsibilityDAO | getRuleResponsibilityDAO() | public RuleTemplateService | getRuleTemplateService() | public WorkgroupService | getWorkgroupService() | public Long | isLockedForRouting(Long currentRuleBaseValuesId) Determines if the given rule is locked for routing. | public void | loadXml(InputStream inputStream, WorkflowUser user) | public void | makeCurrent(Long routeHeaderId) | public void | notifyCacheOfDocumentTypeChange(DocumentType documentType) | protected void | notifyCacheOfDocumentTypeChangeFromParent(DocumentType documentType) Flushes rules cached for the given DocumentType and then recursivley flushes rules cached
for all children DocumentTypes. | protected void | notifyCacheOfDocumentTypeChangeFromRoot(DocumentType rootDocumentType, DocumentType documentType) Flushes rules cached from the root of the DocumentType hierarchy (at the given root DocumentType). | public void | notifyCacheOfRuleChange(RuleBaseValues rule, DocumentType documentType) | protected void | putListInCache(String ruleTemplateName, String documentTypeName, List<RuleBaseValues> rules) | public Long | route2(Long routeHeaderId, MyRules2 myRules, WorkflowUser user, String annotation, boolean blanketApprove) | public Long | routeRuleWithDelegate(Long routeHeaderId, RuleBaseValues parentRule, RuleBaseValues delegateRule, WorkflowUser user, String annotation, boolean blanketApprove) | public void | save2(RuleBaseValues ruleBaseValues) | public void | save2(RuleBaseValues ruleBaseValues, RuleDelegation ruleDelegation, boolean saveDelegations) | public void | saveDeactivationDate(RuleBaseValues rule) | public List | search(String docTypeName, Long ruleId, Long ruleTemplateId, String ruleDescription, Long workgroupId, String workflowId, String roleName, Boolean delegateRule, Boolean activeInd, Map extensionValues) | public List | search(String docTypeName, String ruleTemplateName, String ruleDescription, GroupId workgroupId, UserId userId, String roleName, Boolean workgroupMember, Boolean delegateRule, Boolean activeInd, Map extensionValues, Collection<String> actionRequestCodes) | public void | setRuleDAO(RuleDAO ruleDAO) | public void | setRuleResponsibilityDAO(RuleResponsibilityDAO ruleResponsibilityDAO) | public void | validate(RuleBaseValues ruleBaseValues, List errors) | public void | validate2(RuleBaseValues ruleBaseValues, RuleDelegation ruleDelegation, List errors) |
delete | public void delete(Long ruleBaseValuesId)(Code) | | |
deleteRuleResponsibilityById | public void deleteRuleResponsibilityById(Long ruleResponsibilityId)(Code) | | |
fetchAllCurrentRulesForTemplateDocCombination | public List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType, boolean ignoreCache)(Code) | | |
fetchAllCurrentRulesForTemplateDocCombination | public List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType)(Code) | | |
fetchAllCurrentRulesForTemplateDocCombination | public List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType, Timestamp effectiveDate)(Code) | | |
fetchAllRules | public List fetchAllRules(boolean currentRules)(Code) | | |
findByRouteHeaderId | public List findByRouteHeaderId(Long routeHeaderId)(Code) | | |
findRuleBaseValuesByResponsibilityReviewer | public List findRuleBaseValuesByResponsibilityReviewer(String reviewerName, String type)(Code) | | |
flushDocumentTypeFromCache | protected void flushDocumentTypeFromCache(String documentTypeName)(Code) | | |
flushListFromCache | protected void flushListFromCache(String ruleTemplateName, String documentTypeName)(Code) | | |
getDocumentTypeRuleCacheGroupName | protected String getDocumentTypeRuleCacheGroupName(String documentTypeName)(Code) | | |
getRuleCacheKey | protected String getRuleCacheKey(String ruleTemplateName, String docTypeName)(Code) | | Returns the key of the rule cache.
|
getRuleDocmentTypeName | public String getRuleDocmentTypeName(List rules)(Code) | | This configuration is currently stored in a application constant named "Rule.Config.CustomDocTypes",
long term we should come up with a better solution. The format of this constant is a comma-separated
list of entries of the following form:
<>:<>:<>:<>
Rule type indicates either main or delegation rules. A main rule is indicated by the character 'M' and a
delegate rule is indicated by the character 'D'.
So, if you wanted to route "main" rules made for the "MyDocType" document with the rule template name
"MyRuleTemplate" using the "MyMainRuleDocType" doc type, it would be specified as follows:
MyDocType:MyRuleTemplate:M:MyMainRuleDocType
If you also wanted to route "delegate" rules made for the "MyDocType" document with rule template name
"MyDelegateTemplate" using the "MyDelegateRuleDocType", you would then set the constant as follows:
MyDocType:MyRuleTemplate:M:MyMainRuleDocType,MyDocType:MyDelegateTemplate:D:MyDelegateRuleDocType
TODO this method ended up being a mess, we should get rid of this as soon as we can
|
isLockedForRouting | public Long isLockedForRouting(Long currentRuleBaseValuesId)(Code) | | Determines if the given rule is locked for routing.
In the case of a root rule edit, this method will take the rule id of the rule being edited.
In the case of a new delegate rule or a delegate rule edit, this method will take the id of it's parent.
|
notifyCacheOfDocumentTypeChange | public void notifyCacheOfDocumentTypeChange(DocumentType documentType)(Code) | | |
notifyCacheOfDocumentTypeChangeFromParent | protected void notifyCacheOfDocumentTypeChangeFromParent(DocumentType documentType)(Code) | | Flushes rules cached for the given DocumentType and then recursivley flushes rules cached
for all children DocumentTypes.
|
notifyCacheOfDocumentTypeChangeFromRoot | protected void notifyCacheOfDocumentTypeChangeFromRoot(DocumentType rootDocumentType, DocumentType documentType)(Code) | | Flushes rules cached from the root of the DocumentType hierarchy (at the given root DocumentType). Stops
when it hits the given DocumentType. This method exists because of the nature of
DocumentTypeService.findRootDocumentType(...). Whenever we have a modification to child document type
and we call findRootDocumentType(...) on it, we end up getting back a version of the root document type
which is cached in the OJB transaction cache and doesn't have the appropriate child document type attached.
A better way to handle this would be to go into the DocumentType service and fix how it versions document
types in versionAndSave to prevent this issue from occurring.
If such a fix was made then we could simply pass the root DocumentType into notifyCacheOfDocumentTypeChange
and be gauranteed that we will see all appropriate children as we call getChildrenDocTypes().
One last note, we don't necesarily have to stop this cache flusing at the given DocumentType but there's
no reason to duplicate the work that is going to be done in notifyCacheOfDocumentTypeChangeFromParent.
|
search | public List search(String docTypeName, String ruleTemplateName, String ruleDescription, GroupId workgroupId, UserId userId, String roleName, Boolean workgroupMember, Boolean delegateRule, Boolean activeInd, Map extensionValues, Collection<String> actionRequestCodes) throws EdenUserNotFoundException(Code) | | |
|
|