001/** 002 * Copyright 2005-2016 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krms.api.engine; 017 018import java.util.List; 019 020/** 021 * Results of an {@link Engine}'s execution 022 * 023 * @see ResultEvent 024 * @author Kuali Rice Team (rice.collab@kuali.org) 025 */ 026public interface EngineResults { 027 028 /** 029 * Return the ResultEvent for the given index 030 * @param index of the ResultEvent to return 031 * @return {@link ResultEvent} whose index was given 032 * 033 * @deprecated use {@link #getAllResults()} instead, this method will be removed in a future version 034 */ 035 @Deprecated 036 public ResultEvent getResultEvent(int index); 037 038 /** 039 * Return the list of ResultEvents 040 * @return List<ResultEvent> all the results 041 */ 042 public List<ResultEvent> getAllResults(); 043 044 /** 045 * Return the ResultEvents of the given type 046 * @param type of result events to return 047 * @return List<ResultEvent> of the given type 048 */ 049 public List<ResultEvent> getResultsOfType(String type); 050 051 /** 052 * Return the attribute of the given key 053 * @param key to return the attribute of 054 * @return Object that is the attribute for the given key 055 */ 056 public Object getAttribute(String key); 057 058 /** 059 * Set the attribute of the given values 060 * @param key to set the given attribute of 061 * @param attribute to set as the given key's attribute 062 */ 063 public void setAttribute(String key, Object attribute); 064 065 /** 066 * Add the given {@link ResultEvent} 067 * @param result to add 068 */ 069 public void addResult(ResultEvent result); 070}