Interface CollectionView

  • All Known Implementing Classes:
    CollectionViewImpl

    public interface CollectionView
    Interface defining the contract for actual implementations
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  CollectionView.Presenter  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Close the current CollectionView
      void enableEditingMode​(boolean isEditingMode)
      It enable the view to Editing Mode of the Guided collection editor
      com.google.gwt.dom.client.HeadingElement getEditorTitle()  
      com.google.gwt.dom.client.UListElement getElementsContainer()  
      String getExpression()  
      com.google.gwt.dom.client.SpanElement getPropertyTitle()  
      String getValue()
      Actual implementations are meant to call the Presenter to retrieve the json representation of their contents
      void initListStructure​(String key, Map<String,​String> simplePropertiesMap, Map<String,​Map<String,​String>> expandablePropertiesMap, org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type)
      Set the name of the property and the Map to be used to create the skeleton of the current CollectionViewImpl editor showing a List of elements
      void initMapStructure​(String key, Map<String,​String> keyPropertyMap, Map<String,​String> valuePropertyMap, org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type)
      Set the name of the property and the Maps to be used to create the skeleton of the current CollectionViewImpl editor showing a Map of elements
      boolean isExpressionWidget()
      Returns true if the current instance is managing an user defined expression.
      boolean isListWidget()
      Returns true if the current instance will manage a List, false for a Map.
      void setExpression​(String expressionValue)  
      void setFixedHeight​(double value, com.google.gwt.dom.client.Style.Unit px)  
      void setValue​(String jsonString)
      Actual implementations are meant to call the Presenter to be populated by this json representation
      void toggleRowExpansion()  
      void updateRowExpansionStatus​(boolean isShown)
      Updates the expanded status of main collection container to reflect the status of all contained items, when they have the same expanded status
      void updateValue​(String toString)
      Updates the json representation of the values shown by this editor
    • Method Detail

      • setValue

        void setValue​(String jsonString)
        Actual implementations are meant to call the Presenter to be populated by this json representation
        Parameters:
        jsonString -
      • getValue

        String getValue()
        Actual implementations are meant to call the Presenter to retrieve the json representation of their contents
        Returns:
        the json representation of the current content
      • isExpressionWidget

        boolean isExpressionWidget()
        Returns true if the current instance is managing an user defined expression.
      • isListWidget

        boolean isListWidget()
        Returns true if the current instance will manage a List, false for a Map.
        Returns:
      • getElementsContainer

        com.google.gwt.dom.client.UListElement getElementsContainer()
      • getEditorTitle

        com.google.gwt.dom.client.HeadingElement getEditorTitle()
      • getPropertyTitle

        com.google.gwt.dom.client.SpanElement getPropertyTitle()
      • enableEditingMode

        void enableEditingMode​(boolean isEditingMode)
        It enable the view to Editing Mode of the Guided collection editor
        Parameters:
        isEditingMode -
      • getExpression

        String getExpression()
      • setExpression

        void setExpression​(String expressionValue)
      • toggleRowExpansion

        void toggleRowExpansion()
      • updateRowExpansionStatus

        void updateRowExpansionStatus​(boolean isShown)
        Updates the expanded status of main collection container to reflect the status of all contained items, when they have the same expanded status
        Parameters:
        isShown - the current expansion status of the collection
      • updateValue

        void updateValue​(String toString)
        Updates the json representation of the values shown by this editor
        Parameters:
        toString -
      • close

        void close()
        Close the current CollectionView
      • initListStructure

        void initListStructure​(String key,
                               Map<String,​String> simplePropertiesMap,
                               Map<String,​Map<String,​String>> expandablePropertiesMap,
                               org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type)
        Set the name of the property and the Map to be used to create the skeleton of the current CollectionViewImpl editor showing a List of elements
        Parameters:
        key - The key representing the property, i.e Classname#propertyname (e.g Author#books)
        simplePropertiesMap -
        expandablePropertiesMap -
        type -
      • initMapStructure

        void initMapStructure​(String key,
                              Map<String,​String> keyPropertyMap,
                              Map<String,​String> valuePropertyMap,
                              org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type)
        Set the name of the property and the Maps to be used to create the skeleton of the current CollectionViewImpl editor showing a Map of elements
        Parameters:
        key - The key representing the property, i.e Classname#propertyname (e.g Author#books)
        keyPropertyMap -
        valuePropertyMap -
        type -
      • setFixedHeight

        void setFixedHeight​(double value,
                            com.google.gwt.dom.client.Style.Unit px)