001/** 002 * Copyright 2005-2016 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.kew.rule.dao; 017 018import java.sql.Timestamp; 019import java.util.Collection; 020import java.util.List; 021import java.util.Map; 022 023import org.kuali.rice.kew.rule.RuleBaseValues; 024import org.kuali.rice.kew.rule.RuleResponsibilityBo; 025 026public interface RuleDAO { 027 028 public void save(RuleBaseValues ruleBaseValues); 029 public void delete(String ruleBaseValuesId); 030 public RuleBaseValues findRuleBaseValuesByName(String name); 031 public RuleBaseValues findRuleBaseValuesById(String ruleBaseValuesId); 032 public RuleResponsibilityBo findRuleResponsibility(String responsibilityId); 033 public List<RuleBaseValues> fetchAllRules(boolean currentRules); 034 public List<RuleBaseValues> fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateId, List documentTypes); 035 public List<RuleBaseValues> fetchAllCurrentRulesForTemplateDocCombination(String ruleTemplateId, List documentTypes, Timestamp effectiveDate); 036 public List<RuleBaseValues> search(String docTypeName, String ruleId, String ruleTemplateId, String ruleDescription, String workgroupId, String workflowId, Boolean delegateRule, Boolean activeInd, Map extensionValues, String workflowIdDirective); 037 public List<RuleBaseValues> search(String docTypeName, String ruleTemplateId, String ruleDescription, Collection<String> workgroupIds, String workflowId, Boolean delegateRule, Boolean activeInd, Map extensionValues, Collection actionRequestCodes); 038 public List<RuleBaseValues> findByDocumentId(String documentId); 039 public List<RuleBaseValues> findRuleBaseValuesByResponsibilityReviewer(String reviewerName, String type); 040 public List<RuleBaseValues> findRuleBaseValuesByResponsibilityReviewerTemplateDoc(String ruleTemplateName, String documentType, String reviewerName, String type); 041 public List<RuleBaseValues> findByPreviousRuleId(String previousVersionId); 042 public void retrieveAllReferences(RuleBaseValues rule); 043 public RuleBaseValues findDefaultRuleByRuleTemplateId(String ruleTemplateId); 044 public RuleBaseValues getParentRule(String ruleBaseValuesId); 045 public List findOldDelegations(RuleBaseValues oldRule, RuleBaseValues newRule); 046 public String findResponsibilityIdForRule(String ruleName, String ruleResponsibilityName, String ruleResponsibilityType); 047}