com.ibm.rational.test.common.schedule.editor.extensions

Interface IOptionProvider



  • public interface IOptionProvider
    This interface allows Contributors to initialize their schedule options when the Schedule has been created via the File->New wizard. Upon completion of the wizard, the wizard code enumerates all implementors of the optionProvider extension point. That extension point requires a class to be identified that implements the IOptionProvider interface.

    Then, for each implementor of the extension point, the setDefaultOptionValues() method is called.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      String[] getFeatureIDs()
      Deprecated. 
      It is no longer necessary to return the supported features in this method. Supported features must be statically declared in the extension declaration using the forFeature element.
      void setDefaultOptionValues(com.ibm.rational.test.common.schedule.Schedule theSchedule)
      Called whenever a test is added to a schedule, so that contributors can initialize their own options and add them to the Schedule.
    • Method Detail

      • setDefaultOptionValues

        void setDefaultOptionValues(com.ibm.rational.test.common.schedule.Schedule theSchedule)
        Called whenever a test is added to a schedule, so that contributors can initialize their own options and add them to the Schedule. The Schedule should be checked to make sure the options do not already exist before adding them. (See example.)

        Example:
        public void setDefaultOptionValues(Schedule theSchedule) { if (theSchedule != null) { MyOptions options = theSchedule.getOptions(MyOptions.class.getName()); if (options == null) { options = MyFactory.createMyOptions(); if (options != null) { options.setValue1("Hi"); options.setValue2("There!"); options.setIntValue(42); theSchedule.addOptions(options); } } } } Note that in the example above, MyOptions is a class the is derived from com.ibm.rational.test.common.models.behavior.CBOption
        Also note that the order in which the optionProvider extensions are called is not guaranteed. Only the "general" Schedule options are guaranteed to exist before any of the optionProvider extensions are called.
      • getFeatureIDs

        String[] getFeatureIDs()
        Deprecated. It is no longer necessary to return the supported features in this method. Supported features must be statically declared in the extension declaration using the forFeature element.
IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2013. All rights reserved.