Class AbstractDataManagementStrategy

    • Constructor Detail

      • AbstractDataManagementStrategy

        public AbstractDataManagementStrategy()
    • Method Detail

      • setModel

        public void setModel​(org.drools.scenariosimulation.api.model.ScenarioSimulationModel model)
        Specified by:
        setModel in interface DataManagementStrategy
      • getSimpleClassFactModelTree

        public static org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree getSimpleClassFactModelTree​(String classSimpleName,
                                                                                                                                     String fullClassName)
        It creates a FactModelTree for a Simple Class Fact.
        Parameters:
        classSimpleName - The class simple name (eg. for 'com.Test' is 'Test'. For 'com.Test.Nested' is 'Test.Nested')
        fullClassName - The class simple name (eg. for 'com.Test' or 'com.Test$Nested')
        Returns:
      • getPropertiesToHide

        public <T extends org.drools.scenariosimulation.api.model.AbstractScesimModel<E>,​E extends org.drools.scenariosimulation.api.model.AbstractScesimData> Map<String,​List<List<String>>> getPropertiesToHide​(AbstractScesimGridModel<T,​E> abstractScesimGridModel)
        This method returns a Map with the properties of a given Type (Fact, class, other dmn defined) instance, to be hidden from the right panel. key: the name of the Fact class (ex. Author), value: list of properties to hide from right panel If click happen on an already assigned property, all all the properties of given type should be shown; if, instead, click is on an unassigned property, the already assigned properties must be hidden. (e.g. inside GIVEN there is an "Author" group; if clicking on "books" property header, the value of the Map returned by this method is an empty List; if click is on an unassigned property column, the value of the Map returned by this method is a List. with all the already assigned Author's properties)
        Parameters:
        abstractScesimGridModel -
        Returns:
      • getPropertiesToHide

        protected <T extends org.drools.scenariosimulation.api.model.AbstractScesimModel<E>,​E extends org.drools.scenariosimulation.api.model.AbstractScesimData> List<List<String>> getPropertiesToHide​(ScenarioGridColumn selectedColumn,
                                                                                                                                                                                                               AbstractScesimGridModel<T,​E> abstractScesimGridModel)
        This method returns a List with the properties of a given Type (Fact, class, other dmn defined) instance, to be hidden from the right panel for the selected column.

        If click happen on an already assigned property, all all the properties of given type should be shown; if, instead, click is on an unassigned property, the already assigned properties must be hidden. (e.g. inside GIVEN there is an "Author" group; if clicking on "books" property header, this method returns an empty List; if click is on an unassigned property column, this method returns a List. with all the already assigned Author's properties)

        Parameters:
        selectedColumn -
        abstractScesimGridModel -
        Returns:
      • getInstanceMap

        public SortedMap<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> getInstanceMap​(SortedMap<String,​org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree> sourceMap)
        Returns a Map of the instances as defined in the grid and the mapped FactModelTree
        Parameters:
        sourceMap -
        Returns: