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.Map;
019
020import org.joda.time.DateTime;
021
022/**
023 * Interface for defining ResultEvents
024 * @see EngineResults
025 * @see ResultListener
026 * @author Kuali Rice Team (rice.collab@kuali.org)
027 */
028public interface ResultEvent {
029    /**
030     * RULE_EVALUATED
031     */
032    public static final String RULE_EVALUATED = "Rule Evaluated";
033
034    /**
035     * PROPOSITION_EVALUATED
036     */
037    public static final String PROPOSITION_EVALUATED = "Proposition Evaluated";
038
039    /**
040     * ACTION_EXECUTED
041     */
042    public static final String ACTION_EXECUTED = "Action Executed";
043
044    /**
045     * TIMING_EVENT
046     */
047    public static final String TIMING_EVENT = "Timing Event";
048
049    /**
050     * Returns the {@link ExecutionEnvironment} of the ResultEvent.
051     * @return {@link ExecutionEnvironment} of the ResultEvent.
052     */
053        public ExecutionEnvironment getEnvironment();
054
055    /**
056     * Returns the type of the ResultEvent.
057     * @return String of the type of ResultEvent.
058     */
059        public String getType();
060
061    /**
062     * Returns the source of the ResultEvent.
063     * @return source as an Object of the ResultEvent.
064     */
065        public Object getSource();
066
067    /**
068     * Returns the org.joda.time.DateTime timestamp of the ResultEvent.
069     * @return org.joda.time.DateTime timestamp of the ResultEvent.
070     */
071        public DateTime getTimestamp();
072
073    /**
074     * Returns the Boolean result of the ResultEvent.
075     * @return Boolean result of the ResultEvent.
076     */
077        public Boolean getResult();
078
079    /**
080     * Returns the description of the ResultEvent as a String
081     * @return description of the ResultEvent as a String
082     */
083        public String getDescription();
084
085    /**
086     * Returns the result details of the ResultEvent as a Map<?,?>
087     * @return result details of the ResultEvent as a Map<?,?>
088     */
089        public Map<?,?> getResultDetails();
090}