ilog.rules.dvs.core.scenarioproviders

Class IlrExcel2003ScenarioProvider

    • Constructor Detail

      • IlrExcel2003ScenarioProvider

        public IlrExcel2003ScenarioProvider()
        Creates a new IlrExcel2003ScenarioProvider instance.
    • Method Detail

      • getScenarioAt

        public IlrScenario getScenarioAt(int theScenarioIndex)
                                  throws IlrScenarioProviderException
        Returns a scenario from the suite.
        Throws:
        IlrScenarioProviderException - if an error occurs while reading the scenario suite.
        Parameters:
        theScenarioIndex - The index of the scenario in the suite. Indexing starts at 0.
        Returns:
        The scenario at theScenarioIndex.
      • getScenarioNames

        public java.util.List<java.lang.String> getScenarioNames()
                                                          throws IlrScenarioProviderException
        Returns the list of scenario names. This list is sorted in the same order that the scenarios are defined in the suite.
        Throws:
        IlrScenarioProviderException - if an error occurs while reading the scenario suite.
        Returns:
        The list of scenario names.
      • getScenarioByName

        public IlrScenario getScenarioByName(java.lang.String theScenarioName)
                                      throws IlrScenarioProviderException
        Returns a scenario from the suite.
        Throws:
        IlrScenarioProviderException - if an error occurs reading the scenario, or if there is no scenario matching theScenarioName in the suite.
        Parameters:
        theScenarioName - The name of the scenario.
      • checkSignatureCompatibility

        public void checkSignatureCompatibility(IlrRulesetSignature theSignatureOfTheRulesetToTest,
                                       IlrRulesetSignature theSignatureOfTheRulesetTheScenarioSuiteWasGeneratedFor)
                                         throws IlrScenarioProviderException
        Tests if the scenario suite can be run against the requested ruleset. To ignore signature checking before test suite execution, override this method with a blank method.

        Use this method to populate a ruleset parameter with the code in the scenario provider rather than the Excel scenario file.

        Delete the columns corresponding to the ruleset parameter from the Excel scenario file so that users do no need to fill them in.

        Throws:
        IlrScenarioProviderException - if the signatures are not compatible.
        Parameters:
        theSignatureOfTheRulesetToTest - The signature of the requested ruleset. Retrieve this value by calling getRulesetSignature() on the context.
        theSignatureOfTheRulesetTheScenarioSuiteWasGeneratedFor - The signature of the ruleset the scenario suite was generated for. This value is read from the scenario suite.
      • getScenarioName

        protected java.lang.String getScenarioName(int theScenarioIndex)
                                            throws IlrScenarioProviderException
        Returns the name of a scenario in the suite.
        Throws:
        IlrScenarioProviderException - if an error occurs while reading the scenario suite.
        Parameters:
        theScenarioIndex - The index of the scenario in the suite. Indexing starts at 0.
        Returns:
        The name of the scenario at theScenarioIndex.
      • getScenarioDescription

        protected java.lang.String getScenarioDescription(int theScenarioIndex)
                                                   throws IlrScenarioProviderException
        Returns the description of a scenario in the suite.
        Throws:
        IlrScenarioProviderException - if an error occurs while reading the scenario suite.
        Parameters:
        theScenarioIndex - The index of the scenario in the suite. Indexing starts at 0.
        Returns:
        The description of the scenario. If no description is found, null is returned.
      • getScenarioInputParameters

        protected java.util.Map<java.lang.String,java.lang.Object> getScenarioInputParameters(int theScenarioIndex)
                                                                                       throws IlrScenarioProviderException
        Returns the values of the input parameters of the ruleset to test for a scenario.
        Throws:
        IlrScenarioProviderException - if an error occurs while reading the scenario suite.
        Parameters:
        theScenarioIndex - The index of the scenario in the suite. Indexing starts at 0.
        Returns:
        The values of the input parameters of the ruleset to test for a scenario. The keys of the returned map are the names of the input parameters, the values are the corresponding input parameter values.
      • getScenarioTraceTester

        protected IlrTraceTester getScenarioTraceTester(int theScenarioIndex)
                                                 throws IlrScenarioProviderException
        Returns the trace tester for a scenario.
        Throws:
        IlrScenarioProviderException - if an error occurs while reading the scenario suite.
        Parameters:
        theScenarioIndex - The index of the scenario in the suite. Indexing starts at 0.
        Returns:
        The trace tester for a scenario.
      • getReader

        protected IlrExcel2003ScenarioSuiteReader getReader()
        Returns the internal Excel scenario suite reader implementation. Use this implementationto read the contents of the scenario file.
        Returns:
        The internal Excel scenario suite reader implementation.

© Copyright IBM Corp. 1987, 2017