View Javadoc

1   /**
2    * Copyright 2005-2014 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.engine.node.service;
17  
18  import java.util.List;
19  
20  import org.kuali.rice.kew.engine.node.Branch;
21  
22  /**
23   * A service providing data access for {@link Branch} instances.
24   *
25   * @author Kuali Rice Team (rice.collab@kuali.org)
26   */
27  public interface BranchService {
28      public void save(Branch branch);    
29      public void deleteBranchStates(List statesToBeDeleted);
30      /**
31       * Responsible for inspecting the branch hierarchy/scope and returning a value
32       * for the variable name if it exists somewere in scope. 
33       * @param branch the lowermost scope to start resolution
34       * @return a value for the key if it exists somewere in scope
35       */
36      public String getScopedVariableValue(Branch branch, String name);
37      /**
38       * Responsible for setting a value in the branch hierarchy/scope.  If the variable name
39       * exists in a scope, it will be updated as opposed to created in a lower scope.  
40       * @param branch the lowermost scope to start resolution
41       * @param value the value to set for the variable
42       * @return the replaced value of the variable, if the variable was already defined, or null otherwise
43       */
44      public String setScopedVariableValue(Branch branch, String name, String value);
45  }