public class RuleServiceInternalImpl extends Object implements RuleServiceInternal
| Modifier and Type | Class and Description |
|---|---|
class |
RuleServiceInternalImpl.RuleDelegationSorter
A comparator implementation which compares RuleBaseValues and puts all delegate rules first.
|
| Constructor and Description |
|---|
RuleServiceInternalImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected RuleBaseValues |
createNewRuleVersion(RuleBaseValues existingRule,
String documentId) |
void |
delete(String ruleBaseValuesId) |
void |
deleteRuleResponsibilityById(String ruleResponsibilityId) |
org.jdom.Element |
export(ExportDataSet dataSet) |
List |
fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName,
String documentType) |
List |
fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName,
String documentType,
Timestamp effectiveDate) |
List |
fetchAllRules(boolean currentRules) |
List<RuleBaseValues> |
findByDocumentId(String documentId) |
RuleResponsibilityBo |
findByRuleResponsibilityId(String ruleResponsibilityId) |
RuleBaseValues |
findDefaultRuleByRuleTemplateId(String ruleTemplateId) |
String |
findResponsibilityIdForRule(String ruleName,
String ruleResponsibilityName,
String ruleResponsibilityType) |
RuleBaseValues |
findRuleBaseValuesById(String ruleBaseValuesId) |
List |
findRuleBaseValuesByResponsibilityReviewer(String reviewerName,
String type) |
List |
findRuleBaseValuesByResponsibilityReviewerTemplateDoc(String ruleTemplateName,
String documentType,
String reviewerName,
String type) |
RuleResponsibilityBo |
findRuleResponsibility(String responsibilityId) |
ActionRequestService |
getActionRequestService() |
DataObjectService |
getDataObjectService() |
DocumentTypeService |
getDocumentTypeService() |
String |
getDuplicateRuleId(RuleBaseValues rule)
Checks if the Rule with the given value is a duplicate of an existing rule in the system.
|
GroupService |
getGroupService() |
RuleBaseValues |
getParentRule(RuleBaseValues rule) |
RuleBaseValues |
getParentRule(String ruleBaseValuesId) |
RuleBaseValues |
getRuleByName(String name)
Returns a Rule based on unique name.
|
protected String |
getRuleByTemplateAndDocTypeCacheKey(String ruleTemplateName,
String docTypeName) |
RuleDAO |
getRuleDAO() |
protected RuleDelegationBo |
getRuleDelegationForDelegateRule(RuleBaseValues rule) |
String |
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.
|
RuleResponsibilityDAO |
getRuleResponsibilityDAO() |
RuleTemplateService |
getRuleTemplateService() |
protected void |
hookUpDelegateRuleToParentRule(RuleBaseValues newParentRule,
RuleBaseValues newDelegationRule,
RuleDelegationBo existingRuleDelegation) |
String |
isLockedForRouting(String currentRuleBaseValuesId)
Determines if the given rule is locked for routing.
|
protected List<RuleBaseValues> |
loadRules(List<String> ruleIds) |
void |
loadXml(InputStream inputStream,
String principalId) |
void |
makeCurrent(List<RuleBaseValues> rules) |
void |
makeCurrent(RuleBaseValues rule,
boolean isRetroactiveUpdatePermitted)
makeCurrent(RuleBaseValues) is the version of makeCurrent which is initiated from the new Routing Rule
Maintenance document.
|
void |
makeCurrent(RuleDelegationBo ruleDelegation,
boolean isRetroactiveUpdatePermitted) |
protected void |
makeCurrent(RuleDelegationBo ruleDelegation,
RuleBaseValues rule,
boolean isRetroactiveUpdatePermitted) |
void |
makeCurrent(String documentId) |
void |
makeCurrent2(List<RuleBaseValues> rules)
TODO consolidate this method with makeCurrent.
|
String |
routeRuleWithDelegate(String documentId,
RuleBaseValues parentRule,
RuleBaseValues delegateRule,
PrincipalContract principal,
String annotation,
boolean blanketApprove) |
void |
save2(RuleBaseValues ruleBaseValues) |
void |
save2(RuleBaseValues ruleBaseValues,
RuleDelegationBo ruleDelegation,
boolean saveDelegations) |
RuleBaseValues |
saveRule(RuleBaseValues rule,
boolean isRetroactiveUpdatePermitted) |
RuleDelegationBo |
saveRuleDelegation(RuleDelegationBo ruleDelegation,
boolean isRetroactiveUpdatePermitted) |
List<RuleDelegationBo> |
saveRuleDelegations(List<RuleDelegationBo> ruleDelegationsToSave,
boolean isRetroactiveUpdatePermitted) |
List<RuleBaseValues> |
saveRules(List<RuleBaseValues> rulesToSave,
boolean isRetroactiveUpdatePermitted) |
List<RuleBaseValues> |
search(String docTypeName,
String ruleId,
String ruleTemplateId,
String ruleDescription,
String groupId,
String principalId,
Boolean delegateRule,
Boolean activeInd,
Map extensionValues,
String workflowIdDirective) |
List<RuleBaseValues> |
searchByTemplate(String docTypeName,
String ruleTemplateName,
String ruleDescription,
String groupId,
String principalId,
Boolean workgroupMember,
Boolean delegateRule,
Boolean activeInd,
Map extensionValues,
Collection<String> actionRequestCodes) |
void |
setDataObjectService(DataObjectService dataObjectService) |
void |
setRuleDAO(RuleDAO ruleDAO) |
void |
setRuleResponsibilityDAO(RuleResponsibilityDAO ruleResponsibilityDAO) |
protected boolean |
shouldChangeRuleInvolvement(String documentId,
RuleBaseValues rule)
If a rule has been modified and is no longer current since the original request was made, we need to
be sure to NOT update the rule.
|
boolean |
supportPrettyPrint() |
void |
validate(RuleBaseValues ruleBaseValues,
List errors) |
void |
validate2(RuleBaseValues ruleBaseValues,
RuleDelegationBo ruleDelegation,
List errors) |
public RuleServiceInternalImpl()
public RuleResponsibilityDAO getRuleResponsibilityDAO()
public RuleBaseValues getRuleByName(String name)
RuleServiceInternalgetRuleByName in interface RuleServiceInternalname - the rule namepublic RuleBaseValues findDefaultRuleByRuleTemplateId(String ruleTemplateId)
findDefaultRuleByRuleTemplateId in interface RuleServiceInternalpublic void setRuleResponsibilityDAO(RuleResponsibilityDAO ruleResponsibilityDAO)
public void save2(RuleBaseValues ruleBaseValues) throws Exception
save2 in interface RuleServiceInternalExceptionpublic void save2(RuleBaseValues ruleBaseValues, RuleDelegationBo ruleDelegation, boolean saveDelegations) throws Exception
Exceptionpublic void makeCurrent(String documentId)
makeCurrent in interface RuleServiceInternalpublic void makeCurrent(List<RuleBaseValues> rules)
public void makeCurrent2(List<RuleBaseValues> rules)
This version will only work for remove/replace operations where rules aren't being added or removed. This is why it doesn't perform some of the functions like checking for delegation rules that were removed from a parent rule.
public void makeCurrent(RuleBaseValues rule, boolean isRetroactiveUpdatePermitted)
makeCurrent in interface RuleServiceInternalpublic void makeCurrent(RuleDelegationBo ruleDelegation, boolean isRetroactiveUpdatePermitted)
makeCurrent in interface RuleServiceInternalprotected void makeCurrent(RuleDelegationBo ruleDelegation, RuleBaseValues rule, boolean isRetroactiveUpdatePermitted)
public RuleBaseValues getParentRule(String ruleBaseValuesId)
getParentRule in interface RuleServiceInternalpublic String routeRuleWithDelegate(String documentId, RuleBaseValues parentRule, RuleBaseValues delegateRule, PrincipalContract principal, String annotation, boolean blanketApprove) throws Exception
routeRuleWithDelegate in interface RuleServiceInternalExceptionpublic void validate(RuleBaseValues ruleBaseValues, List errors)
public void validate2(RuleBaseValues ruleBaseValues, RuleDelegationBo ruleDelegation, List errors)
validate2 in interface RuleServiceInternalpublic List<RuleBaseValues> findByDocumentId(String documentId)
findByDocumentId in interface RuleServiceInternalpublic List<RuleBaseValues> search(String docTypeName, String ruleId, String ruleTemplateId, String ruleDescription, String groupId, String principalId, Boolean delegateRule, Boolean activeInd, Map extensionValues, String workflowIdDirective)
search in interface RuleServiceInternalpublic List<RuleBaseValues> searchByTemplate(String docTypeName, String ruleTemplateName, String ruleDescription, String groupId, String principalId, Boolean workgroupMember, Boolean delegateRule, Boolean activeInd, Map extensionValues, Collection<String> actionRequestCodes)
searchByTemplate in interface RuleServiceInternalpublic void delete(String ruleBaseValuesId)
delete in interface RuleServiceInternalpublic RuleBaseValues findRuleBaseValuesById(String ruleBaseValuesId)
findRuleBaseValuesById in interface RuleServiceInternalpublic RuleResponsibilityBo findRuleResponsibility(String responsibilityId)
findRuleResponsibility in interface RuleServiceInternalpublic List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType)
fetchAllCurrentRulesForTemplateDocCombination in interface RuleServiceInternalpublic List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType, Timestamp effectiveDate)
fetchAllCurrentRulesForTemplateDocCombination in interface RuleServiceInternalpublic List fetchAllRules(boolean currentRules)
fetchAllRules in interface RuleServiceInternalpublic String isLockedForRouting(String currentRuleBaseValuesId)
isLockedForRouting in interface RuleServiceInternalpublic RuleBaseValues getParentRule(RuleBaseValues rule)
public String getRuleDocumentTypeName(List rules)
getRuleDocumentTypeName in interface RuleServiceInternalpublic void setRuleDAO(RuleDAO ruleDAO)
public RuleDAO getRuleDAO()
public void deleteRuleResponsibilityById(String ruleResponsibilityId)
deleteRuleResponsibilityById in interface RuleServiceInternalpublic RuleResponsibilityBo findByRuleResponsibilityId(String ruleResponsibilityId)
findByRuleResponsibilityId in interface RuleServiceInternalpublic List findRuleBaseValuesByResponsibilityReviewer(String reviewerName, String type)
findRuleBaseValuesByResponsibilityReviewer in interface RuleServiceInternalpublic List findRuleBaseValuesByResponsibilityReviewerTemplateDoc(String ruleTemplateName, String documentType, String reviewerName, String type)
findRuleBaseValuesByResponsibilityReviewerTemplateDoc in interface RuleServiceInternalpublic RuleTemplateService getRuleTemplateService()
public DocumentTypeService getDocumentTypeService()
public GroupService getGroupService()
public ActionRequestService getActionRequestService()
public void loadXml(InputStream inputStream, String principalId)
public org.jdom.Element export(ExportDataSet dataSet)
export in interface XmlExporterpublic boolean supportPrettyPrint()
supportPrettyPrint in interface XmlExporterprotected List<RuleBaseValues> loadRules(List<String> ruleIds)
protected boolean shouldChangeRuleInvolvement(String documentId, RuleBaseValues rule)
protected RuleDelegationBo getRuleDelegationForDelegateRule(RuleBaseValues rule)
protected void hookUpDelegateRuleToParentRule(RuleBaseValues newParentRule, RuleBaseValues newDelegationRule, RuleDelegationBo existingRuleDelegation)
protected RuleBaseValues createNewRuleVersion(RuleBaseValues existingRule, String documentId) throws Exception
Exceptionpublic String getDuplicateRuleId(RuleBaseValues rule)
RuleServiceInternalgetDuplicateRuleId in interface RuleServiceInternalpublic RuleBaseValues saveRule(RuleBaseValues rule, boolean isRetroactiveUpdatePermitted)
saveRule in interface RuleServiceInternalpublic List<RuleBaseValues> saveRules(List<RuleBaseValues> rulesToSave, boolean isRetroactiveUpdatePermitted)
saveRules in interface RuleServiceInternalpublic RuleDelegationBo saveRuleDelegation(RuleDelegationBo ruleDelegation, boolean isRetroactiveUpdatePermitted)
saveRuleDelegation in interface RuleServiceInternalpublic List<RuleDelegationBo> saveRuleDelegations(List<RuleDelegationBo> ruleDelegationsToSave, boolean isRetroactiveUpdatePermitted)
saveRuleDelegations in interface RuleServiceInternalpublic String findResponsibilityIdForRule(String ruleName, String ruleResponsibilityName, String ruleResponsibilityType)
findResponsibilityIdForRule in interface RuleServiceInternalprotected String getRuleByTemplateAndDocTypeCacheKey(String ruleTemplateName, String docTypeName)
public DataObjectService getDataObjectService()
public void setDataObjectService(DataObjectService dataObjectService)
Copyright © 2005–2015 The Kuali Foundation. All rights reserved.