All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tacitknowledge.simulator.Scenario Maven / Gradle / Ivy

The newest version!
package com.tacitknowledge.simulator;

import com.tacitknowledge.simulator.scripting.ScriptException;

import java.util.Map;

/**
 * Defines the contract for the ConversationScenario.
 *
 * @author Alexandru Dereveanco ([email protected])
 */
public interface Scenario
{
    /**
     * Starts this scenario execution with the provided entry data
     *
     * @param scriptExecutionBeans - Script execution parameters
     * @return the transformed SimulatorPojo object
     * @throws ScriptException    in case there is an exception running the script
     * @throws SimulatorException is case something else bad happens
     */
    Object executeTransformation(Map scriptExecutionBeans) throws ScriptException,
            SimulatorException;

    /**
     * Veryfies if the entry data matches the criteria
     *
     * @param scriptExecutionBeans The beans that need to be available to the script
     * @return True is the data matches the contained criteria, false otherwise
     * @throws ScriptException in case a script execution exception occured
     */
    boolean matchesCondition(Map scriptExecutionBeans) throws ScriptException;


    /**
     * @return script language id
     */
    String getScriptLanguage();

    /**
     * @return The criteria script
     */
    String getCriteriaScript();

    /**
     * @return The transformation script
     */
    String getTransformationScript();
    
    /**
     * last modified date of scenario file
     * @return long
     */
    long getLastModifiedDate();
    
    /**
     * get scenario configuration file path
     * @param lastModifiedDate
     */
    String getConfigurationFilePath();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy