1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.rule.service;
17
18 import java.sql.Timestamp;
19 import java.util.Collection;
20 import java.util.List;
21 import java.util.Map;
22
23 import org.kuali.rice.core.framework.impex.xml.XmlExporter;
24 import org.kuali.rice.core.framework.impex.xml.XmlLoader;
25 import org.kuali.rice.kew.api.rule.Rule;
26 import org.kuali.rice.kew.rule.RuleBaseValues;
27 import org.kuali.rice.kew.rule.RuleDelegationBo;
28 import org.kuali.rice.kew.rule.RuleResponsibilityBo;
29 import org.kuali.rice.kim.api.identity.principal.PrincipalContract;
30 import org.springframework.cache.annotation.CacheEvict;
31
32
33
34
35
36
37
38
39
40 public interface RuleServiceInternal extends XmlLoader, XmlExporter {
41
42
43
44
45
46
47 public RuleBaseValues getRuleByName(String name);
48
49 public String routeRuleWithDelegate(String documentId, RuleBaseValues parentRule, RuleBaseValues delegateRule, PrincipalContract principal, String annotation, boolean blanketApprove) throws Exception;
50
51 @CacheEvict(value={Rule.Cache.NAME}, allEntries = true)
52 public void save2(RuleBaseValues ruleBaseValues) throws Exception;
53 public void validate2(RuleBaseValues ruleBaseValues, RuleDelegationBo ruleDelegation, List errors) throws Exception;
54 @CacheEvict(value={Rule.Cache.NAME}, allEntries = true)
55 public void delete(String ruleBaseValuesId);
56 public RuleBaseValues findRuleBaseValuesById(String ruleBaseValuesId);
57 public List<RuleBaseValues> search(String docTypeName, String ruleId, String ruleTemplateId, String ruleDescription, String groupId, String principalId, Boolean delegateRule, Boolean activeInd, Map extensionValues, String workflowIdDirective);
58 public List<RuleBaseValues> searchByTemplate(String docTypeName, String ruleTemplateName, String ruleDescription, String groupId, String principalId, Boolean workgroupMember, Boolean delegateRule, Boolean activeInd, Map extensionValues, Collection<String> actionRequestCodes);
59 public RuleResponsibilityBo findRuleResponsibility(String responsibilityId);
60 public void deleteRuleResponsibilityById(String ruleResponsibilityId);
61 public RuleResponsibilityBo findByRuleResponsibilityId(String ruleResponsibilityId);
62 public List<RuleBaseValues> fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType);
63 public List<RuleBaseValues> fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType, Timestamp effectiveDate);
64 public List<RuleBaseValues> findByDocumentId(String documentId);
65 @CacheEvict(value={Rule.Cache.NAME}, allEntries = true)
66 public void makeCurrent(String documentId);
67 @CacheEvict(value={Rule.Cache.NAME}, allEntries = true)
68 public void makeCurrent(RuleBaseValues rule, boolean isRetroactiveUpdatePermitted);
69 @CacheEvict(value={Rule.Cache.NAME}, allEntries = true)
70 public void makeCurrent(RuleDelegationBo ruleDelegation, boolean isRetroactiveUpdatePermitted);
71 public List<RuleBaseValues> findRuleBaseValuesByResponsibilityReviewer(String reviewerName, String type);
72 public List<RuleBaseValues> findRuleBaseValuesByResponsibilityReviewerTemplateDoc(String ruleTemplateName, String documentType, String reviewerName, String type);
73 public String isLockedForRouting(String currentRuleBaseValuesId);
74 public List<RuleBaseValues> fetchAllRules(boolean currentRules);
75 public RuleBaseValues findDefaultRuleByRuleTemplateId(String ruleTemplateId);
76 public RuleBaseValues getParentRule(String ruleBaseValuesId);
77
78
79
80
81
82
83 public String getRuleDocumentTypeName(List<RuleBaseValues> rules);
84
85
86
87
88
89
90 public String getDuplicateRuleId(RuleBaseValues rule);
91 @CacheEvict(value={Rule.Cache.NAME}, allEntries = true)
92 public RuleBaseValues saveRule(RuleBaseValues rule, boolean isRetroactiveUpdatePermitted);
93 @CacheEvict(value={Rule.Cache.NAME}, allEntries = true)
94 public List<RuleBaseValues> saveRules(List<RuleBaseValues> rulesToSave, boolean isRetroactiveUpdatePermitted);
95
96 public RuleDelegationBo saveRuleDelegation(RuleDelegationBo ruleDelegation, boolean isRetroactiveUpdatePermitted);
97
98 public List<RuleDelegationBo> saveRuleDelegations(List<RuleDelegationBo> ruleDelegationsToSave, boolean isRetroactiveUpdatePermitted);
99
100 public String findResponsibilityIdForRule(String ruleName, String ruleResponsibilityName, String ruleResponsibilityType);
101 }