Class FeatureManager


  • public class FeatureManager
    extends java.lang.Object
    This class represents default feature manager. It can be extended to set another behavior of features in JT Harness. The method isEnabled may be overridden to change behavior.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean[] featureToggles  
      static int NO_TREE_WITHOUT_WD
      Should the harness display test tree for test suite without working directory
      static int SHOW_DOCS_FOR_TEST
      Should harness display Documentation tab for single test
      static int SHOW_TEMPLATE_UPDATE
      Show "check for template update" menu.
      static int SINGLE_TEST_MANAGER
      Can this test suite be opened more than once within a harness? False allows any number of instances of the test suite to be opened.
      static int TEMPLATE_CREATION
      Can templates be created?
      static int TEMPLATE_LOADING
      Can someone load any template they want, even if WD_WITHOUT_TEMPLATE is enabled?
      static int TEMPLATE_USAGE
      Can templates be used?
      static int WD_WITHOUT_TEMPLATE
      Ability to support only work directories with templates attached.
    • Constructor Summary

      Constructors 
      Constructor Description
      FeatureManager()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEnabled​(int feature)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TEMPLATE_LOADING

        public static final int TEMPLATE_LOADING
        Can someone load any template they want, even if WD_WITHOUT_TEMPLATE is enabled?
        See Also:
        Constant Field Values
      • TEMPLATE_USAGE

        public static final int TEMPLATE_USAGE
        Can templates be used?
        See Also:
        Constant Field Values
      • TEMPLATE_CREATION

        public static final int TEMPLATE_CREATION
        Can templates be created?
        See Also:
        Constant Field Values
      • SHOW_TEMPLATE_UPDATE

        public static final int SHOW_TEMPLATE_UPDATE
        Show "check for template update" menu.
        See Also:
        Constant Field Values
      • SINGLE_TEST_MANAGER

        public static final int SINGLE_TEST_MANAGER
        Can this test suite be opened more than once within a harness? False allows any number of instances of the test suite to be opened.
        See Also:
        Constant Field Values
      • WD_WITHOUT_TEMPLATE

        public static final int WD_WITHOUT_TEMPLATE
        Ability to support only work directories with templates attached.
        See Also:
        Constant Field Values
      • SHOW_DOCS_FOR_TEST

        public static final int SHOW_DOCS_FOR_TEST
        Should harness display Documentation tab for single test
        See Also:
        Constant Field Values
      • NO_TREE_WITHOUT_WD

        public static final int NO_TREE_WITHOUT_WD
        Should the harness display test tree for test suite without working directory
        See Also:
        Constant Field Values
      • featureToggles

        protected boolean[] featureToggles
    • Constructor Detail

      • FeatureManager

        public FeatureManager()
    • Method Detail

      • isEnabled

        public boolean isEnabled​(int feature)
        Parameters:
        feature - one of TEMPLATE_USAGE, TEMPLATE_CREATION, AUTOPROPAGATE, SINGLE_TEST_MANAGER
        Returns:
        true if this feature enabled, false otherwise