View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kew.rule.service;
17  
18  import java.util.Collection;
19  import java.util.List;
20  import java.util.Map;
21  
22  import org.kuali.rice.core.framework.impex.xml.XmlExporter;
23  import org.kuali.rice.core.framework.impex.xml.XmlLoader;
24  import org.kuali.rice.kew.api.rule.RuleDelegation;
25  import org.kuali.rice.kew.rule.RuleDelegationBo;
26  import org.springframework.cache.annotation.Cacheable;
27  
28  /**
29   * A service providing data access for {@link org.kuali.rice.kew.rule.RuleDelegationBo}s.
30   *
31   * @see org.kuali.rice.kew.rule.RuleDelegationBo
32   *
33   * @author Kuali Rice Team (rice.collab@kuali.org)
34   */
35  public interface RuleDelegationService extends XmlLoader, XmlExporter {
36  
37      public List<RuleDelegationBo> findByDelegateRuleId(String ruleId);
38      public void save(RuleDelegationBo ruleDelegation);
39      public void delete(String ruleDelegationId);
40      public List<RuleDelegationBo> findAllCurrentRuleDelegations();
41      public RuleDelegationBo findByRuleDelegationId(String ruleDelegationId);
42      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);
43      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);
44      /**
45       * Returns a List of all RuleDelegations with "current" Rules for the given
46       * responsibility id.
47       * KULRICE-12368:Added the caching annotation to this method so it would use not refetch
48       * the same information repeatedly
49      */
50      @Cacheable(value= RuleDelegation.Cache.NAME, key="'responsibilityId=' + #p0")
51      public List<RuleDelegationBo> findByResponsibilityId(String responsibilityId);
52  }