mocks
Class MockRuleServiceImpl

java.lang.Object
  extended by mocks.MockRuleServiceImpl
All Implemented Interfaces:
RuleService, XmlExporter, XmlLoader

public class MockRuleServiceImpl
extends Object
implements RuleService


Field Summary
(package private)  Map responsibilitiesById
           
(package private)  Map responsibilitiesByKey
           
(package private)  Map responsibilitiesByReviewer
           
(package private)  Map rules
           
(package private)  Map<String,RuleBaseValues> rulesByName
           
(package private)  Map rulesByRouteHeaderId
           
 
Constructor Summary
MockRuleServiceImpl()
           
 
Method Summary
 void addRule(RuleBaseValues rule)
           
 void delete(Long ruleBaseValuesId)
           
 void deleteRuleResponsibilityById(Long ruleResponsibilityId)
           
 org.jdom.Element export(ExportDataSet dataSet)
           
 List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType)
           
 List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType, boolean ignoreCache)
           
 List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName, String documentType, Timestamp effectiveDate)
           
 List fetchAllRules(boolean currentRules)
           
 List findByRouteHeaderId(Long routeHeaderId)
           
 RuleResponsibility findByRuleResponsibilityId(Long ruleResponsibilityId)
           
 RuleBaseValues findDefaultRuleByRuleTemplateId(Long ruleTemplateId)
           
 Long findResponsibilityIdForRule(String ruleName, String ruleResponsibilityName, String ruleResponsibilityType)
           
 RuleBaseValues findRuleBaseValuesById(Long ruleBaseValuesId)
           
 RuleBaseValues findRuleBaseValuesByName(String name)
           
 List findRuleBaseValuesByResponsibilityReviewer(String reviewerName, String type)
           
 List findRuleBaseValuesByResponsibilityReviewerTemplateDoc(String ruleTemplateName, String documentType, String reviewerName, String type)
          This overridden method ...
 RuleResponsibility findRuleResponsibility(Long responsibilityId)
           
 void flushRuleCache()
           
 Long getDuplicateRuleId(RuleBaseValues rule)
           
 RuleBaseValues getParentRule(Long ruleBaseValuesId)
           
 RuleBaseValues getRuleByName(String name)
           
 String getRuleDocmentTypeName(List rules)
           
 Long isLockedForRouting(Long currentRuleBaseValuesId)
           
 void loadXml(InputStream inputStream, String principalId)
           
 void makeCurrent(Long routeHeaderId)
           
 void makeCurrent(RuleBaseValues rule, boolean isRetroactiveUpdatePermitted)
           
 void makeCurrent(RuleDelegation ruleDelegation, boolean isRetroactiveUpdatePermitted)
           
 void notifyCacheOfDocumentTypeChange(DocumentType documentType)
           
 void notifyCacheOfRuleChange(RuleBaseValues rule, DocumentType documentType)
           
 void removeRuleInvolvement(Id entityToBeRemoved, List<Long> ruleIds, Long documentId)
           
 void replaceRuleInvolvement(Id entityToBeReplaced, Id newEntity, List<Long> ruleIds, Long documentId)
           
 Long route2(Long routeHeaderId, MyRules2 myRules, KimPrincipal principal, String annotation, boolean blanketApprove)
           
 Long route2(MyRules2 myRules, KimPrincipal principal, String annotation)
           
 Long routeRuleWithDelegate(Long routeHeaderId, RuleBaseValues parentRule, RuleBaseValues delegateRule, KimPrincipal principal, String annotation, boolean blanketApprove)
           
 void save2(RuleBaseValues ruleBaseValues)
           
 void saveDeactivationDate(RuleBaseValues rule)
           
 RuleBaseValues saveRule(RuleBaseValues rule, boolean isRetroactiveUpdatePermitted)
           
 RuleDelegation saveRuleDelegation(RuleDelegation ruleDelegation, boolean isRetroactiveUpdatePermitted)
           
 List<RuleDelegation> saveRuleDelegations(List<RuleDelegation> ruleDelegationsToSave, boolean isRetroactiveUpdatePermitted)
           
 List<RuleBaseValues> saveRules(List<RuleBaseValues> rulesToSave, boolean isRetroactiveUpdatePermitted)
           
 List search(String docTypeName, Long ruleTemplateId, Long workgroupId, String workflowId, Boolean delegateRule, Boolean activeInd, Map extensionValues)
           
 List search(String docTypeName, Long ruleId, Long ruleTemplateId, String ruleDescription, String workgroupId, String principalId, Boolean delegateRule, Boolean activeInd, Map extensionValues, String workflowIdDirective)
           
 List search(String docTypeName, String ruleTemplateName, String ruleDescription, String groupId, String principalId, Boolean workgroupMember, Boolean delegateRule, Boolean activeInd, Map extensionValues, Collection<String> actionRequestCodes)
           
 void validate2(RuleBaseValues ruleBaseValues, RuleDelegation ruleDelegation, List errors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rules

Map rules

rulesByName

Map<String,RuleBaseValues> rulesByName

responsibilitiesByKey

Map responsibilitiesByKey

responsibilitiesById

Map responsibilitiesById

responsibilitiesByReviewer

Map responsibilitiesByReviewer

rulesByRouteHeaderId

Map rulesByRouteHeaderId
Constructor Detail

MockRuleServiceImpl

public MockRuleServiceImpl()
Method Detail

getParentRule

public RuleBaseValues getParentRule(Long ruleBaseValuesId)
Specified by:
getParentRule in interface RuleService

fetchAllCurrentRulesForTemplateDocCombination

public List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName,
                                                          String documentType,
                                                          boolean ignoreCache)
Specified by:
fetchAllCurrentRulesForTemplateDocCombination in interface RuleService

isLockedForRouting

public Long isLockedForRouting(Long currentRuleBaseValuesId)
Specified by:
isLockedForRouting in interface RuleService

route2

public Long route2(Long routeHeaderId,
                   MyRules2 myRules,
                   KimPrincipal principal,
                   String annotation,
                   boolean blanketApprove)
            throws Exception
Specified by:
route2 in interface RuleService
Throws:
Exception

routeRuleWithDelegate

public Long routeRuleWithDelegate(Long routeHeaderId,
                                  RuleBaseValues parentRule,
                                  RuleBaseValues delegateRule,
                                  KimPrincipal principal,
                                  String annotation,
                                  boolean blanketApprove)
                           throws Exception
Specified by:
routeRuleWithDelegate in interface RuleService
Throws:
Exception

search

public List search(String docTypeName,
                   Long ruleId,
                   Long ruleTemplateId,
                   String ruleDescription,
                   String workgroupId,
                   String principalId,
                   Boolean delegateRule,
                   Boolean activeInd,
                   Map extensionValues,
                   String workflowIdDirective)
Specified by:
search in interface RuleService

search

public List search(String docTypeName,
                   String ruleTemplateName,
                   String ruleDescription,
                   String groupId,
                   String principalId,
                   Boolean workgroupMember,
                   Boolean delegateRule,
                   Boolean activeInd,
                   Map extensionValues,
                   Collection<String> actionRequestCodes)
Specified by:
search in interface RuleService

notifyCacheOfRuleChange

public void notifyCacheOfRuleChange(RuleBaseValues rule,
                                    DocumentType documentType)
Specified by:
notifyCacheOfRuleChange in interface RuleService

flushRuleCache

public void flushRuleCache()
Specified by:
flushRuleCache in interface RuleService

getRuleByName

public RuleBaseValues getRuleByName(String name)
Specified by:
getRuleByName in interface RuleService

addRule

public void addRule(RuleBaseValues rule)

route2

public Long route2(MyRules2 myRules,
                   KimPrincipal principal,
                   String annotation)
            throws Exception
Throws:
Exception

delete

public void delete(Long ruleBaseValuesId)
Specified by:
delete in interface RuleService

findRuleBaseValuesByName

public RuleBaseValues findRuleBaseValuesByName(String name)

findRuleBaseValuesById

public RuleBaseValues findRuleBaseValuesById(Long ruleBaseValuesId)
Specified by:
findRuleBaseValuesById in interface RuleService

search

public List search(String docTypeName,
                   Long ruleTemplateId,
                   Long workgroupId,
                   String workflowId,
                   Boolean delegateRule,
                   Boolean activeInd,
                   Map extensionValues)

findRuleResponsibility

public RuleResponsibility findRuleResponsibility(Long responsibilityId)
Specified by:
findRuleResponsibility in interface RuleService

deleteRuleResponsibilityById

public void deleteRuleResponsibilityById(Long ruleResponsibilityId)
Specified by:
deleteRuleResponsibilityById in interface RuleService

findByRuleResponsibilityId

public RuleResponsibility findByRuleResponsibilityId(Long ruleResponsibilityId)
Specified by:
findByRuleResponsibilityId in interface RuleService

fetchAllCurrentRulesForTemplateDocCombination

public List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName,
                                                          String documentType)
Specified by:
fetchAllCurrentRulesForTemplateDocCombination in interface RuleService

findByRouteHeaderId

public List findByRouteHeaderId(Long routeHeaderId)
Specified by:
findByRouteHeaderId in interface RuleService

makeCurrent

public void makeCurrent(Long routeHeaderId)
Specified by:
makeCurrent in interface RuleService

makeCurrent

public void makeCurrent(RuleBaseValues rule,
                        boolean isRetroactiveUpdatePermitted)
Specified by:
makeCurrent in interface RuleService

makeCurrent

public void makeCurrent(RuleDelegation ruleDelegation,
                        boolean isRetroactiveUpdatePermitted)
Specified by:
makeCurrent in interface RuleService

findRuleBaseValuesByResponsibilityReviewer

public List findRuleBaseValuesByResponsibilityReviewer(String reviewerName,
                                                       String type)
Specified by:
findRuleBaseValuesByResponsibilityReviewer in interface RuleService

fetchAllRules

public List fetchAllRules(boolean currentRules)
Specified by:
fetchAllRules in interface RuleService

saveDeactivationDate

public void saveDeactivationDate(RuleBaseValues rule)

validate2

public void validate2(RuleBaseValues ruleBaseValues,
                      RuleDelegation ruleDelegation,
                      List errors)
               throws Exception
Specified by:
validate2 in interface RuleService
Throws:
Exception

fetchAllCurrentRulesForTemplateDocCombination

public List fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateName,
                                                          String documentType,
                                                          Timestamp effectiveDate)
Specified by:
fetchAllCurrentRulesForTemplateDocCombination in interface RuleService

findDefaultRuleByRuleTemplateId

public RuleBaseValues findDefaultRuleByRuleTemplateId(Long ruleTemplateId)
Specified by:
findDefaultRuleByRuleTemplateId in interface RuleService

save2

public void save2(RuleBaseValues ruleBaseValues)
           throws Exception
Specified by:
save2 in interface RuleService
Throws:
Exception

loadXml

public void loadXml(InputStream inputStream,
                    String principalId)
Specified by:
loadXml in interface XmlLoader

export

public org.jdom.Element export(ExportDataSet dataSet)
Specified by:
export in interface XmlExporter

notifyCacheOfDocumentTypeChange

public void notifyCacheOfDocumentTypeChange(DocumentType documentType)
Specified by:
notifyCacheOfDocumentTypeChange in interface RuleService

getRuleDocmentTypeName

public String getRuleDocmentTypeName(List rules)
Specified by:
getRuleDocmentTypeName in interface RuleService

removeRuleInvolvement

public void removeRuleInvolvement(Id entityToBeRemoved,
                                  List<Long> ruleIds,
                                  Long documentId)
Specified by:
removeRuleInvolvement in interface RuleService

replaceRuleInvolvement

public void replaceRuleInvolvement(Id entityToBeReplaced,
                                   Id newEntity,
                                   List<Long> ruleIds,
                                   Long documentId)
Specified by:
replaceRuleInvolvement in interface RuleService

findRuleBaseValuesByResponsibilityReviewerTemplateDoc

public List findRuleBaseValuesByResponsibilityReviewerTemplateDoc(String ruleTemplateName,
                                                                  String documentType,
                                                                  String reviewerName,
                                                                  String type)
This overridden method ...

Specified by:
findRuleBaseValuesByResponsibilityReviewerTemplateDoc in interface RuleService
See Also:
RuleService.findRuleBaseValuesByResponsibilityReviewerTemplateDoc(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

getDuplicateRuleId

public Long getDuplicateRuleId(RuleBaseValues rule)
Specified by:
getDuplicateRuleId in interface RuleService

findResponsibilityIdForRule

public Long findResponsibilityIdForRule(String ruleName,
                                        String ruleResponsibilityName,
                                        String ruleResponsibilityType)
Specified by:
findResponsibilityIdForRule in interface RuleService

saveRule

public RuleBaseValues saveRule(RuleBaseValues rule,
                               boolean isRetroactiveUpdatePermitted)
Specified by:
saveRule in interface RuleService

saveRuleDelegation

public RuleDelegation saveRuleDelegation(RuleDelegation ruleDelegation,
                                         boolean isRetroactiveUpdatePermitted)
Specified by:
saveRuleDelegation in interface RuleService

saveRuleDelegations

public List<RuleDelegation> saveRuleDelegations(List<RuleDelegation> ruleDelegationsToSave,
                                                boolean isRetroactiveUpdatePermitted)
Specified by:
saveRuleDelegations in interface RuleService

saveRules

public List<RuleBaseValues> saveRules(List<RuleBaseValues> rulesToSave,
                                      boolean isRetroactiveUpdatePermitted)
Specified by:
saveRules in interface RuleService


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.