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.krms.api.engine; 17 18 import java.util.Map; 19 20 import org.joda.time.DateTime; 21 22 /** 23 * Interface for defining ResultEvents 24 * @see EngineResults 25 * @see ResultListener 26 * @author Kuali Rice Team (rice.collab@kuali.org) 27 */ 28 public interface ResultEvent { 29 /** 30 * RULE_EVALUATED 31 */ 32 public static final String RULE_EVALUATED = "Rule Evaluated"; 33 34 /** 35 * PROPOSITION_EVALUATED 36 */ 37 public static final String PROPOSITION_EVALUATED = "Proposition Evaluated"; 38 39 /** 40 * ACTION_EXECUTED 41 */ 42 public static final String ACTION_EXECUTED = "Action Executed"; 43 44 /** 45 * TIMING_EVENT 46 */ 47 public static final String TIMING_EVENT = "Timing Event"; 48 49 /** 50 * Returns the {@link ExecutionEnvironment} of the ResultEvent. 51 * @return {@link ExecutionEnvironment} of the ResultEvent. 52 */ 53 public ExecutionEnvironment getEnvironment(); 54 55 /** 56 * Returns the type of the ResultEvent. 57 * @return String of the type of ResultEvent. 58 */ 59 public String getType(); 60 61 /** 62 * Returns the source of the ResultEvent. 63 * @return source as an Object of the ResultEvent. 64 */ 65 public Object getSource(); 66 67 /** 68 * Returns the org.joda.time.DateTime timestamp of the ResultEvent. 69 * @return org.joda.time.DateTime timestamp of the ResultEvent. 70 */ 71 public DateTime getTimestamp(); 72 73 /** 74 * Returns the Boolean result of the ResultEvent. 75 * @return Boolean result of the ResultEvent. 76 */ 77 public Boolean getResult(); 78 79 /** 80 * Returns the description of the ResultEvent as a String 81 * @return description of the ResultEvent as a String 82 */ 83 public String getDescription(); 84 85 /** 86 * Returns the result details of the ResultEvent as a Map<?,?> 87 * @return result details of the ResultEvent as a Map<?,?> 88 */ 89 public Map<?,?> getResultDetails(); 90 }