Class TestToolsPresenter

    • Field Detail

      • dataObjectFieldsMap

        protected Map<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> dataObjectFieldsMap
      • simpleJavaTypeFieldsMap

        protected Map<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> simpleJavaTypeFieldsMap
      • instanceFieldsMap

        protected Map<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> instanceFieldsMap
      • simpleJavaInstanceFieldsMap

        protected Map<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> simpleJavaInstanceFieldsMap
      • hiddenFieldsMap

        protected Map<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> hiddenFieldsMap
      • eventBus

        protected com.google.gwt.event.shared.EventBus eventBus
      • editingColumnEnabled

        protected boolean editingColumnEnabled
      • selectedFieldItemView

        protected FieldItemView selectedFieldItemView
    • Constructor Detail

      • TestToolsPresenter

        public TestToolsPresenter()
    • Method Detail

      • setDataObjectFieldsMap

        protected void setDataObjectFieldsMap​(SortedMap<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> dataObjectFieldsMap)
      • setSimpleJavaTypeFieldsMap

        protected void setSimpleJavaTypeFieldsMap​(SortedMap<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> simpleJavaTypeFieldsMap)
      • setInstanceFieldsMap

        protected void setInstanceFieldsMap​(SortedMap<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> instanceFieldsMap)
      • setSimpleJavaInstanceFieldsMap

        protected void setSimpleJavaInstanceFieldsMap​(SortedMap<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> simpleJavaInstanceFieldsMap)
      • setHiddenFieldsMap

        protected void setHiddenFieldsMap​(SortedMap<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> hiddenFieldsMap)
      • setGridWidget

        protected void setGridWidget​(GridWidget gridWidget)
      • onPerfectMatchSearchedEvent

        public void onPerfectMatchSearchedEvent​(String search,
                                                boolean notEqualsSearch)
        Description copied from interface: TestToolsView.Presenter
        Filter the data in the right panel if they are exactly the same as the given search string, case-sensitive. To be used by filter fired by grid.
        Specified by:
        onPerfectMatchSearchedEvent in interface TestToolsView.Presenter
        notEqualsSearch - set to true to perform a not filter, i.e. to show only results different than filterTerm
      • onEnableEditorTab

        public void onEnableEditorTab()
        Description copied from interface: TestToolsView.Presenter
        By default the Editor Tab is disabled (no user interaction allowed). Use this when click on grid' instance header. Call this method to show all the first-level data models enabled (i.e. double-clickable to map to an instance header/column) and their properties disabled (i.e. not double-clickable)
        Specified by:
        onEnableEditorTab in interface TestToolsView.Presenter
      • onEnableEditorTab

        public void onEnableEditorTab​(String filterTerm,
                                      List<String> propertyNameElements,
                                      boolean notEqualsSearch)
        Description copied from interface: TestToolsView.Presenter
        By default the Editor Tab is disabled (no user interaction allowed). Use this when click on grid' property header. Call this method to show only the data model with the given name, disabled (i.e. not double-clickable) and their properties enabled (i.e. double-clickable to map to a property header/column below the belonging data model instance one)
        Specified by:
        onEnableEditorTab in interface TestToolsView.Presenter
        propertyNameElements - The List to eventually use to select the property in the test tools panel
        notEqualsSearch - set to true to perform a not filter, i.e. to show only results different than filterTerm
      • onModifyColumn

        public void onModifyColumn()
        Description copied from interface: TestToolsView.Presenter
        Method to fire a SetPropertyHeaderScenarioSImulationCommand or SetPropertyHeaderScenarioSImulationCommand, depending on the element currently selected
        Specified by:
        onModifyColumn in interface TestToolsView.Presenter
      • clearFieldsMaps

        protected void clearFieldsMaps()
      • updateInstanceIsAssignedStatus

        protected void updateInstanceIsAssignedStatus​(String key)
        It navigates through the maps, to check if the given key is present or not in the keySet of these maps. If present, then a INSTANCE is already assigned to the selected column. Then, it assigns the search result to its related view.
        Parameters:
        key -
      • getFactModelTreeFromMaps

        protected Optional<org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> getFactModelTreeFromMaps​(String key)
      • isSimple

        protected boolean isSimple​(String key)
      • clearLists

        protected void clearLists()
      • filterTerm

        protected boolean filterTerm​(String key,
                                     String search,
                                     boolean notEqualsSearch)
        It determines if a key (factTitle) is present or not in the search variable.
        Parameters:
        key - It's the title of the fact to search
        search - It represents a concatenation of titles, with ";" as separator
        notEqualsSearch - It establishes the method logic: to check if a key is present or not in search string
        Returns: