View Javadoc

1   /**
2    * Copyright 2005-2013 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.List;
19  
20  import org.kuali.rice.core.framework.impex.xml.XmlExporter;
21  import org.kuali.rice.core.framework.impex.xml.XmlLoader;
22  import org.kuali.rice.kew.api.rule.Rule;
23  import org.kuali.rice.kew.api.rule.RuleDelegation;
24  import org.kuali.rice.kew.api.rule.RuleTemplate;
25  import org.kuali.rice.kew.rule.RuleBaseValues;
26  import org.kuali.rice.kew.rule.RuleDelegationBo;
27  import org.kuali.rice.kew.rule.bo.RuleTemplateBo;
28  import org.kuali.rice.kew.rule.bo.RuleTemplateAttributeBo;
29  import org.springframework.cache.annotation.CacheEvict;
30  
31  /**
32   * A service providing data access for {@link org.kuali.rice.kew.rule.bo.RuleTemplateBo}s and
33   * {@link org.kuali.rice.kew.rule.bo.RuleTemplateAttributeBo}s.
34   *
35   * @author Kuali Rice Team (rice.collab@kuali.org)
36   */
37  public interface RuleTemplateService extends XmlLoader, XmlExporter {
38      @CacheEvict(value={RuleTemplate.Cache.NAME}, allEntries = true)
39      public void save(RuleTemplateBo ruleTemplate);
40      @CacheEvict(value={RuleTemplate.Cache.NAME}, allEntries = true)
41      public void save(RuleTemplateAttributeBo ruleTemplateAttribute);
42      @CacheEvict(value={RuleTemplate.Cache.NAME, Rule.Cache.NAME, RuleDelegation.Cache.NAME}, allEntries = true)
43      public void saveRuleDefaults(RuleDelegationBo ruleDelegation, RuleBaseValues ruleBaseValues);
44      public RuleTemplateBo findByRuleTemplateId(String ruleTemplateId);
45      public List<RuleTemplateBo> findAll();
46      public List findByRuleTemplate(RuleTemplateBo ruleTemplate);
47      @CacheEvict(value={RuleTemplate.Cache.NAME}, allEntries = true)
48      public void delete(String ruleTemplateId);
49      
50      public void deleteRuleTemplateOption(String ruleTemplateOptionId);
51  //    public void deleteRuleTemplateAttribute(Long ruleTemplateAttributeId, List ruleTemplateAttributes);
52      public RuleTemplateAttributeBo findByRuleTemplateAttributeId(String ruleTemplateAttributeId);
53      public RuleTemplateBo findByRuleTemplateName(String ruleTemplateName);
54      public String getNextRuleTemplateId();
55      
56  }