Interface CollectionView.Presenter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addListItem​(Map<String,​String> simplePropertiesValues, Map<String,​Map<String,​String>> expandablePropertiesValues)
      Creates a new single item element with values taken from given Map
      void addMapItem​(Map<String,​String> keyPropertiesValues, Map<String,​String> valuePropertiesValues)
      Creates a new key/value item element with values taken from given Map
      void initListStructure​(String key, Map<String,​String> instancePropertyMap, Map<String,​Map<String,​String>> expandablePropertiesMap, CollectionView collectionView)
      Actual implementations should invoke this method first to retrieve information about the collection generic type and the structure of such type
      void initMapStructure​(String key, Map<String,​String> keyPropertyMap, Map<String,​String> valuePropertyMap, CollectionView collectionEditorView)
      Actual implementations should invoke this method first to retrieve information about the collection generic type and the structure of such type
      void onToggleRowExpansion​(boolean isShown)
      Toggle the expansion of the items included in the collection.
      void remove()
      Completely remove the given Collection, i.e. set it to null
      void save()
      Actual implementations are meant to retrieve the json representation of the content of the current CollectionEditorView and save it.
      void setValue​(String jsonString)
      Actual implementations are meant to transform that json representation to a com.google.gwt.json.client.JSONValue and use that to populate the current CollectionEditorView
      void showEditingBox()
      Show the editing box in the current CollectionEditorView
      void toggleEditingStatus​(boolean toDisable)
      Toggles the status of the addItem button
      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
    • Method Detail

      • initListStructure

        void initListStructure​(String key,
                               Map<String,​String> instancePropertyMap,
                               Map<String,​Map<String,​String>> expandablePropertiesMap,
                               CollectionView collectionView)
        Actual implementations should invoke this method first to retrieve information about the collection generic type and the structure of such type
        Parameters:
        key - The key representing the property, i.e classname#propertyname (e.g Author#books)
        instancePropertyMap -
        expandablePropertiesMap -
        collectionView -
      • initMapStructure

        void initMapStructure​(String key,
                              Map<String,​String> keyPropertyMap,
                              Map<String,​String> valuePropertyMap,
                              CollectionView collectionEditorView)
        Actual implementations should invoke this method first to retrieve information about the collection generic type and the structure of such type
        Parameters:
        key - The key representing the property, i.e classname#propertyname (e.g Author#books)
        keyPropertyMap -
        valuePropertyMap -
        collectionEditorView -
      • setValue

        void setValue​(String jsonString)
        Actual implementations are meant to transform that json representation to a com.google.gwt.json.client.JSONValue and use that to populate the current CollectionEditorView
        Parameters:
        jsonString -
      • showEditingBox

        void showEditingBox()
        Show the editing box in the current CollectionEditorView
      • onToggleRowExpansion

        void onToggleRowExpansion​(boolean isShown)
        Toggle the expansion of the items included in the collection.
        Parameters:
        isShown - the current expansion status of the collection
      • 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
      • addListItem

        void addListItem​(Map<String,​String> simplePropertiesValues,
                         Map<String,​Map<String,​String>> expandablePropertiesValues)
        Creates a new single item element with values taken from given Map
        Parameters:
        simplePropertiesValues -
        expandablePropertiesValues -
      • addMapItem

        void addMapItem​(Map<String,​String> keyPropertiesValues,
                        Map<String,​String> valuePropertiesValues)
        Creates a new key/value item element with values taken from given Map
        Parameters:
        keyPropertiesValues -
        valuePropertiesValues -
      • save

        void save()
        Actual implementations are meant to retrieve the json representation of the content of the current CollectionEditorView and save it.
      • remove

        void remove()
        Completely remove the given Collection, i.e. set it to null
      • toggleEditingStatus

        void toggleEditingStatus​(boolean toDisable)
        Toggles the status of the addItem button
        Parameters:
        toDisable -