Class RuleServiceInternalImpl
java.lang.Object
org.kuali.rice.kew.rule.service.impl.RuleServiceInternalImpl
- All Implemented Interfaces:
XmlExporter,XmlLoader,RuleServiceInternal
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassA comparator implementation which compares RuleBaseValues and puts all delegate rules first. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddeleteRuleResponsibilityById(String ruleResponsibilityId) org.jdom2.Elementexport(ExportDataSet dataSet) fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType) fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType, Timestamp effectiveDate) fetchAllRules(boolean currentRules) findByDocumentId(String documentId) findByRuleResponsibilityId(String ruleResponsibilityId) findDefaultRuleByRuleTemplateId(String ruleTemplateId) findResponsibilityIdForRule(String ruleName, String ruleResponsibilityName, String ruleResponsibilityType) findRuleBaseValuesById(String ruleBaseValuesId) findRuleBaseValuesByResponsibilityReviewer(String reviewerName, String type) findRuleBaseValuesByResponsibilityReviewerTemplateDoc(String ruleTemplateName, String documentType, String reviewerName, String type) findRuleResponsibility(String responsibilityId) Checks if the Rule with the given value is a duplicate of an existing rule in the system.org.kuali.rice.kim.api.group.GroupServicegetParentRule(String ruleBaseValuesId) getRuleByName(String name) Returns a Rule based on unique name.getRuleDocumentTypeName(List rules) This configuration is currently stored in a system parameter named "CUSTOM_DOCUMENT_TYPES ", long term we should come up with a better solution.isLockedForRouting(String currentRuleBaseValuesId) Determines if the given rule is locked for routing.voidloadXml(InputStream inputStream, String principalId) voidmakeCurrent(String documentId) voidmakeCurrent(List<RuleBaseValues> rules) voidmakeCurrent(RuleBaseValues rule, boolean isRetroactiveUpdatePermitted) makeCurrent(RuleBaseValues) is the version of makeCurrent which is initiated from the new Routing Rule Maintenance document.voidmakeCurrent(RuleDelegationBo ruleDelegation, boolean isRetroactiveUpdatePermitted) protected voidmakeCurrent(RuleDelegationBo ruleDelegation, RuleBaseValues rule, boolean isRetroactiveUpdatePermitted) routeRuleWithDelegate(String documentId, RuleBaseValues parentRule, RuleBaseValues delegateRule, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, String annotation, boolean blanketApprove) voidsave2(RuleBaseValues ruleBaseValues) voidsave2(RuleBaseValues ruleBaseValues, RuleDelegationBo ruleDelegation, boolean saveDelegations) saveRule(RuleBaseValues rule, boolean isRetroactiveUpdatePermitted) saveRuleDelegation(RuleDelegationBo ruleDelegation, boolean isRetroactiveUpdatePermitted) saveRuleDelegations(List<RuleDelegationBo> ruleDelegationsToSave, boolean isRetroactiveUpdatePermitted) saveRules(List<RuleBaseValues> rulesToSave, boolean isRetroactiveUpdatePermitted) search(String docTypeName, String ruleId, String ruleTemplateId, String ruleDescription, String groupId, String principalId, Boolean delegateRule, Boolean activeInd, Map extensionValues, String workflowIdDirective) searchByTemplate(String docTypeName, String ruleTemplateName, String ruleDescription, String groupId, String principalId, Boolean workgroupMember, Boolean delegateRule, Boolean activeInd, Map extensionValues, Collection<String> actionRequestCodes) voidsetDataObjectService(DataObjectService dataObjectService) voidsetRuleDAO(RuleDAO ruleDAO) voidsetRuleResponsibilityDAO(RuleResponsibilityDAO ruleResponsibilityDAO) booleanvoidvalidate(RuleBaseValues ruleBaseValues, List errors) voidvalidate2(RuleBaseValues ruleBaseValues, RuleDelegationBo ruleDelegation, List errors)
-
Constructor Details
-
RuleServiceInternalImpl
public RuleServiceInternalImpl()
-
-
Method Details
-
getRuleResponsibilityDAO
-
getRuleByName
Description copied from interface:RuleServiceInternalReturns a Rule based on unique name. Returns null if name is null.- Specified by:
getRuleByNamein interfaceRuleServiceInternal- Parameters:
name- the rule name- Returns:
- the Rule if found, null if not found or null name
-
findDefaultRuleByRuleTemplateId
- Specified by:
findDefaultRuleByRuleTemplateIdin interfaceRuleServiceInternal
-
setRuleResponsibilityDAO
-
save2
- Specified by:
save2in interfaceRuleServiceInternal- Throws:
Exception
-
save2
public void save2(RuleBaseValues ruleBaseValues, RuleDelegationBo ruleDelegation, boolean saveDelegations) throws Exception - Throws:
Exception
-
makeCurrent
- Specified by:
makeCurrentin interfaceRuleServiceInternal
-
makeCurrent
-
makeCurrent
makeCurrent(RuleBaseValues) is the version of makeCurrent which is initiated from the new Routing Rule Maintenance document. Because of the changes in the data model and the front end here, this method can be much less complicated than the previous 2!- Specified by:
makeCurrentin interfaceRuleServiceInternal
-
makeCurrent
- Specified by:
makeCurrentin interfaceRuleServiceInternal
-
makeCurrent
protected void makeCurrent(RuleDelegationBo ruleDelegation, RuleBaseValues rule, boolean isRetroactiveUpdatePermitted) -
getParentRule
- Specified by:
getParentRulein interfaceRuleServiceInternal
-
routeRuleWithDelegate
public String routeRuleWithDelegate(String documentId, RuleBaseValues parentRule, RuleBaseValues delegateRule, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, String annotation, boolean blanketApprove) throws Exception - Specified by:
routeRuleWithDelegatein interfaceRuleServiceInternal- Throws:
Exception
-
validate
-
validate2
- Specified by:
validate2in interfaceRuleServiceInternal
-
findByDocumentId
- Specified by:
findByDocumentIdin interfaceRuleServiceInternal
-
search
public List<RuleBaseValues> search(String docTypeName, String ruleId, String ruleTemplateId, String ruleDescription, String groupId, String principalId, Boolean delegateRule, Boolean activeInd, Map extensionValues, String workflowIdDirective) - Specified by:
searchin interfaceRuleServiceInternal
-
searchByTemplate
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) - Specified by:
searchByTemplatein interfaceRuleServiceInternal
-
delete
- Specified by:
deletein interfaceRuleServiceInternal
-
findRuleBaseValuesById
- Specified by:
findRuleBaseValuesByIdin interfaceRuleServiceInternal
-
findRuleResponsibility
- Specified by:
findRuleResponsibilityin interfaceRuleServiceInternal
-
fetchAllCurrentRulesForTemplateDocCombination
public List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType) - Specified by:
fetchAllCurrentRulesForTemplateDocCombinationin interfaceRuleServiceInternal
-
fetchAllCurrentRulesForTemplateDocCombination
public List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType, Timestamp effectiveDate) - Specified by:
fetchAllCurrentRulesForTemplateDocCombinationin interfaceRuleServiceInternal
-
fetchAllRules
- Specified by:
fetchAllRulesin interfaceRuleServiceInternal
-
isLockedForRouting
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.- Specified by:
isLockedForRoutingin interfaceRuleServiceInternal
-
getRuleDocumentTypeName
This configuration is currently stored in a system parameter named "CUSTOM_DOCUMENT_TYPES ", 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: <<name of doc type on rule>>:<<rule template name on rule>>:<<type of rule>>:<<name of document type to use for rule routing>> 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- Specified by:
getRuleDocumentTypeNamein interfaceRuleServiceInternal
-
setRuleDAO
-
getRuleDAO
-
deleteRuleResponsibilityById
- Specified by:
deleteRuleResponsibilityByIdin interfaceRuleServiceInternal
-
findByRuleResponsibilityId
- Specified by:
findByRuleResponsibilityIdin interfaceRuleServiceInternal
-
findRuleBaseValuesByResponsibilityReviewer
- Specified by:
findRuleBaseValuesByResponsibilityReviewerin interfaceRuleServiceInternal
-
findRuleBaseValuesByResponsibilityReviewerTemplateDoc
public List findRuleBaseValuesByResponsibilityReviewerTemplateDoc(String ruleTemplateName, String documentType, String reviewerName, String type) - Specified by:
findRuleBaseValuesByResponsibilityReviewerTemplateDocin interfaceRuleServiceInternal
-
getRuleTemplateService
-
getDocumentTypeService
-
getGroupService
public org.kuali.rice.kim.api.group.GroupService getGroupService() -
getActionRequestService
-
loadXml
-
export
- Specified by:
exportin interfaceXmlExporter
-
supportPrettyPrint
public boolean supportPrettyPrint()- Specified by:
supportPrettyPrintin interfaceXmlExporter
-
getDuplicateRuleId
Description copied from interface:RuleServiceInternalChecks if the Rule with the given value is a duplicate of an existing rule in the system.- Specified by:
getDuplicateRuleIdin interfaceRuleServiceInternal- Returns:
- the id of the duplicate rule if one exists, null otherwise
-
saveRule
- Specified by:
saveRulein interfaceRuleServiceInternal
-
saveRules
public List<RuleBaseValues> saveRules(List<RuleBaseValues> rulesToSave, boolean isRetroactiveUpdatePermitted) - Specified by:
saveRulesin interfaceRuleServiceInternal
-
saveRuleDelegation
public RuleDelegationBo saveRuleDelegation(RuleDelegationBo ruleDelegation, boolean isRetroactiveUpdatePermitted) - Specified by:
saveRuleDelegationin interfaceRuleServiceInternal
-
saveRuleDelegations
public List<RuleDelegationBo> saveRuleDelegations(List<RuleDelegationBo> ruleDelegationsToSave, boolean isRetroactiveUpdatePermitted) - Specified by:
saveRuleDelegationsin interfaceRuleServiceInternal
-
findResponsibilityIdForRule
public String findResponsibilityIdForRule(String ruleName, String ruleResponsibilityName, String ruleResponsibilityType) - Specified by:
findResponsibilityIdForRulein interfaceRuleServiceInternal
-
getDataObjectService
-
setDataObjectService
-