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.service; 017 018import java.util.Collection; 019import java.util.List; 020import java.util.Map; 021 022import org.kuali.rice.core.framework.impex.xml.XmlExporter; 023import org.kuali.rice.core.framework.impex.xml.XmlLoader; 024import org.kuali.rice.kew.api.rule.RuleDelegation; 025import org.kuali.rice.kew.rule.RuleDelegationBo; 026import org.springframework.cache.annotation.Cacheable; 027 028/** 029 * A service providing data access for {@link org.kuali.rice.kew.rule.RuleDelegationBo}s. 030 * 031 * @see org.kuali.rice.kew.rule.RuleDelegationBo 032 * 033 * @author Kuali Rice Team (rice.collab@kuali.org) 034 */ 035public interface RuleDelegationService extends XmlLoader, XmlExporter { 036 037 public List<RuleDelegationBo> findByDelegateRuleId(String ruleId); 038 public void save(RuleDelegationBo ruleDelegation); 039 public void delete(String ruleDelegationId); 040 public List<RuleDelegationBo> findAllCurrentRuleDelegations(); 041 public RuleDelegationBo findByRuleDelegationId(String ruleDelegationId); 042 public List<RuleDelegationBo> search(String parentRuleBaseVaueId, String parentResponsibilityId, String docTypeName, String ruleId, String ruleTemplateId, String ruleDescription, String groupId, String principalId, String delegationType, Boolean activeInd, Map extensionValues, String workflowIdDirective); 043 public List<RuleDelegationBo> searchByTemplate(String parentRuleBaseVaueId, String parentResponsibilityId, String docTypeName, String ruleTemplateName, String ruleDescription, String groupId, String principalId, Boolean workgroupMember, String delegationType, Boolean activeInd, Map extensionValues, Collection<String> actionRequestCodes); 044 /** 045 * Returns a List of all RuleDelegations with "current" Rules for the given 046 * responsibility id. 047 * KULRICE-12368:Added the caching annotation to this method so it would use not refetch 048 * the same information repeatedly 049 */ 050 @Cacheable(value= RuleDelegation.Cache.NAME, key="'responsibilityId=' + #p0") 051 public List<RuleDelegationBo> findByResponsibilityId(String responsibilityId); 052}