Rule Designer API

ilog.rules.dvs.excel
Interface IlrExcel2003ScenarioSuiteReader


public interface IlrExcel2003ScenarioSuiteReader

Reads Excel 2003 scenario files.

Call the IlrExcel2003ScenarioSuiteReaderFactory singleton to create an instance of the reader.

A code example showing how the use the reader and the factory is available in the package description ilog.rules.dvs.excel.

To be usable with IlrExcel2003ScenarioSuiteReaderFactory, implementations of this reader must define a constructor which takes an InputStream and an IlrScenarioSuiteExecutionContext instance as parameters. This constructor may throw the IlrExcel2003ScenarioSuiteIOException exception.


Method Summary
 void close()
          Frees the resources used by this reader to access Excel 2003 scenario file data.
 int getScenarioCount()
          Returns the number of scenarios in the file.
 String getScenarioDescription(int theIndexOfTheScenario)
          Returns the description of a scenario in the scenario file.
 Map<String,Object> getScenarioInputParameters(int theIndexOfTheScenario)
          Returns the values of the input parameters for the ruleset to test in a scenario.
 String getScenarioName(int theIndexOfTheScenario)
          Returns the ID of a scenario in the scenario file.
 List<String> getScenarioNames()
          Returns the list of scenario IDs.
 IlrTraceTester getScenarioTraceTester(int theIndexOfTheScenario)
          Deprecated. the returned trace tester won't be able to test collections of complex object when using an XML XOM. Use instead getScenarioTraceTester(int, IlrObjectModelServices), providing an IlrObjectModelServices instance on the B2X layer of the deployed test ruleset.
 IlrTraceTester getScenarioTraceTester(int theIndexOfTheScenario, IlrObjectModelServices theObjectModelServicesInstanceToUseToCreateExpectedValues)
          Returns the trace tester for a scenario.
 IlrRulesetSignature getSignatureOfTheRulesetToTest()
          Returns the signature of the ruleset to test.
 List<IlrTestRule> getTestRules()
          Returns the test rules.
 

Method Detail

getScenarioCount

int getScenarioCount()
                     throws IlrExcel2003ScenarioSuiteIOException,
                            IlrExcel2003ScenarioSuiteDataException
Returns the number of scenarios in the file.

Throws:
IlrExcel2003ScenarioSuiteIOException - when there is an IO error.
IlrExcel2003ScenarioSuiteDataException - when invalid data is found in an Excel 2003 scenario file.
Returns:
The number of scenarios in the file.

getScenarioName

String getScenarioName(int theIndexOfTheScenario)
                       throws IlrExcel2003ScenarioSuiteIOException,
                              IlrExcel2003ScenarioSuiteDataException
Returns the ID of a scenario in the scenario file.

Throws:
IlrExcel2003ScenarioSuiteIOException - when there is an IO error.
IlrExcel2003ScenarioSuiteDataException - when invalid data is found in the Excel 2003 scenario file.
Parameters:
theIndexOfTheScenario - The index of the scenario in the scenario file. Indexing starts at 0.
Returns:
The ID of the scenario.

getScenarioNames

List<String> getScenarioNames()
                              throws IlrExcel2003ScenarioSuiteIOException,
                                     IlrExcel2003ScenarioSuiteDataException
Returns the list of scenario IDs.

Throws:
IlrExcel2003ScenarioSuiteIOException - when there is an IO error.
IlrExcel2003ScenarioSuiteDataException - when invalid data is found in an Excel 2003 scenario file.
Returns:
The list of scenario IDs. The IDs are in the order that the scenarios are defined in the scenario file.

getScenarioDescription

String getScenarioDescription(int theIndexOfTheScenario)
                              throws IlrExcel2003ScenarioSuiteIOException,
                                     IlrExcel2003ScenarioSuiteDataException
Returns the description of a scenario in the scenario file.

Throws:
IlrExcel2003ScenarioSuiteIOException - when there is an IO error.
IlrExcel2003ScenarioSuiteDataException - when invalid data is found in an Excel 2003 scenario file.
Parameters:
theIndexOfTheScenario - The index of the scenario in the scenario file. Indexing starts at 0.
Returns:
The description of the scenario. If there is no description for this scenario, null is returned.

getScenarioInputParameters

Map<String,Object> getScenarioInputParameters(int theIndexOfTheScenario)
                                              throws IlrExcel2003ScenarioSuiteIOException,
                                                     IlrExcel2003ScenarioSuiteDataException
Returns the values of the input parameters for the ruleset to test in a scenario.

Throws:
IlrExcel2003ScenarioSuiteIOException - when there is an IO error.
IlrExcel2003ScenarioSuiteDataException - when invalid data is found in an Excel 2003 scenario file.
Parameters:
theIndexOfTheScenario - The index of the scenario in the scenario file. Indexing starts at 0.
Returns:
The values of the input parameters for the ruleset to test in a scenario. The keys are the input parameter names, and the values contain the corresponding input parameter value.

getScenarioTraceTester

IlrTraceTester getScenarioTraceTester(int theIndexOfTheScenario)
                                      throws IlrExcel2003ScenarioSuiteIOException,
                                             IlrExcel2003ScenarioSuiteDataException
Deprecated. the returned trace tester won't be able to test collections of complex object when using an XML XOM. Use instead getScenarioTraceTester(int, IlrObjectModelServices), providing an IlrObjectModelServices instance on the B2X layer of the deployed test ruleset.

Returns the trace tester for a scenario.

Throws:
IlrExcel2003ScenarioSuiteIOException - when there is an IO error.
IlrExcel2003ScenarioSuiteDataException - when invalid data is found in an Excel 2003 scenario file.
Parameters:
theIndexOfTheScenario - The index of the scenario in the scenario file. Indexing starts at 0.
Returns:
The trace tester for a scenario.

getScenarioTraceTester

IlrTraceTester getScenarioTraceTester(int theIndexOfTheScenario,
                                      IlrObjectModelServices theObjectModelServicesInstanceToUseToCreateExpectedValues)
                                      throws IlrExcel2003ScenarioSuiteIOException,
                                             IlrExcel2003ScenarioSuiteDataException
Returns the trace tester for a scenario.

Since:
7.5
Throws:
IlrExcel2003ScenarioSuiteIOException - when there is an IO error.
IlrExcel2003ScenarioSuiteDataException - when invalid data is found in an Excel 2003 scenario file.
Parameters:
theIndexOfTheScenario - The index of the scenario in the scenario file. Indexing starts at 0.
theObjectModelServicesInstanceToUseToCreateExpectedValues - the IlrObjectModelServices instance to use to create instances of the expected values (based on the B2X layer of the deployed test ruleset)
Returns:
The trace tester for a scenario.

getSignatureOfTheRulesetToTest

IlrRulesetSignature getSignatureOfTheRulesetToTest()
                                                   throws IlrExcel2003ScenarioSuiteIOException,
                                                          IlrExcel2003ScenarioSuiteDataException
Returns the signature of the ruleset to test.

Throws:
IlrExcel2003ScenarioSuiteIOException - when there is an IO error.
IlrExcel2003ScenarioSuiteDataException - when invalid data is found in an Excel 2003 scenario file.
Returns:
The signature of the ruleset to test.

getTestRules

List<IlrTestRule> getTestRules()
                               throws IlrExcel2003ScenarioSuiteIOException,
                                      IlrExcel2003ScenarioSuiteDataException
Returns the test rules.

Throws:
IlrExcel2003ScenarioSuiteIOException - when there is an IO error.
IlrExcel2003ScenarioSuiteDataException - when invalid data is found in an Excel 2003 scenario file.
Returns:
The test rules.

close

void close()
Frees the resources used by this reader to access Excel 2003 scenario file data.


Rule Designer API

© Copyright IBM Corp. 1987, 2013