1 /**
2 * Copyright 2005-2012 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 public ResultEvent getResultEvent(int index);
34
35 /**
36 * Return the list of ResultEvents
37 * @return List<ResultEvent> all the results
38 */
39 public List<ResultEvent> getAllResults();
40
41 /**
42 * Return the ResultEvents of the given type
43 * @param type of result events to return
44 * @return List<ResultEvent> of the given type
45 */
46 public List<ResultEvent> getResultsOfType(String type);
47
48 /**
49 * Return the attribute of the given key
50 * @param key to return the attribute of
51 * @return Object that is the attribute for the given key
52 */
53 public Object getAttribute(String key);
54
55 /**
56 * Set the attribute of the given values
57 * @param key to set the given attribute of
58 * @param attribute to set as the given key's attribute
59 */
60 public void setAttribute(String key, Object attribute);
61
62 /**
63 * Add the given {@link ResultEvent}
64 * @param result to add
65 */
66 public void addResult(ResultEvent result);
67 }