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.krms.api.engine;
17  
18  import java.util.List;
19  
20  /**
21   * Results of an {@link Engine}'s execution
22   *
23   * @see ResultEvent
24   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  public interface EngineResults {
27  
28      /**
29       * Return the ResultEvent for the given index
30       * @param index of the ResultEvent to return
31       * @return {@link ResultEvent} whose index was given
32       *
33       * @deprecated use {@link #getAllResults()} instead, this method will be removed in a future version
34       */
35      @Deprecated
36  	public ResultEvent getResultEvent(int index);
37  
38      /**
39       * Return the list of ResultEvents
40       * @return List<ResultEvent> all the results
41       */
42  	public List<ResultEvent> getAllResults();
43  
44      /**
45       * Return the ResultEvents of the given type
46       * @param type of result events to return
47       * @return List<ResultEvent> of the given type
48       */
49  	public List<ResultEvent> getResultsOfType(String type);
50  
51      /**
52       * Return the attribute of the given key
53       * @param key to return the attribute of
54       * @return Object that is the attribute for the given key
55       */
56  	public Object getAttribute(String key);
57  
58      /**
59       * Set the attribute of the given values
60       * @param key to set the given attribute of
61       * @param attribute to set as the given key's attribute
62       */
63  	public void setAttribute(String key, Object attribute);
64  
65      /**
66       * Add the given {@link ResultEvent}
67       * @param result to add
68       */
69  	public void addResult(ResultEvent result);
70  }