Class CollectionPresenter

    • Constructor Detail

      • CollectionPresenter

        public CollectionPresenter()
    • Method Detail

      • setValue

        public void setValue​(String jsonString)
        Description copied from interface: CollectionView.Presenter
        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
        Specified by:
        setValue in interface CollectionView.Presenter
      • populateCreateCollection

        protected void populateCreateCollection​(com.google.gwt.json.client.JSONValue value)
        It populates the guided "Create Collection" editor
        Parameters:
        value -
      • onToggleRowExpansion

        public void onToggleRowExpansion​(boolean isShown)
        Description copied from interface: CollectionView.Presenter
        Toggle the expansion of the items included in the collection.
        Specified by:
        onToggleRowExpansion in interface CollectionView.Presenter
        Parameters:
        isShown - the current expansion status of the collection
      • updateRowExpansionStatus

        public void updateRowExpansionStatus​(boolean isShown)
        Description copied from interface: CollectionView.Presenter
        Updates the expanded status of main collection container to reflect the status of all contained items, when they have the same expanded status
        Specified by:
        updateRowExpansionStatus in interface CollectionView.Presenter
        Parameters:
        isShown - the current expansion status of the collection
      • save

        public void save()
        Description copied from interface: CollectionView.Presenter
        Actual implementations are meant to retrieve the json representation of the content of the current CollectionEditorView and save it.
        Specified by:
        save in interface CollectionView.Presenter
      • getValueFromCreateCollection

        protected String getValueFromCreateCollection()
        It gets the guided "Create Collection" editor
      • okRemoveCommandMethod

        protected void okRemoveCommandMethod()
      • populateList

        protected void populateList​(com.google.gwt.json.client.JSONValue jsonValue)
      • populateMap

        protected void populateMap​(com.google.gwt.json.client.JSONValue jsonValue)
      • populateExpression

        protected void populateExpression​(com.google.gwt.json.client.JSONValue jsonValue)
      • getJSONObject

        protected com.google.gwt.json.client.JSONObject getJSONObject​(String jsonString)
      • getJSONValue

        protected com.google.gwt.json.client.JSONValue getJSONValue​(String jsonString)
      • getExpressionValue

        protected String getExpressionValue()
      • getListValue

        protected String getListValue()
      • getJSONObject

        protected com.google.gwt.json.client.JSONObject getJSONObject​(Map<String,​String> properties)
        Translates a Map to a JSONObject
        Parameters:
        properties -
        Returns:
      • getSimplePropertiesMap

        protected Map<String,​String> getSimplePropertiesMap​(com.google.gwt.json.client.JSONObject jsonObject)
        Parameters:
        jsonObject -
        Returns:
        a Map with propertyName/propertyValue
      • getExpandablePropertiesValues

        protected Map<String,​Map<String,​String>> getExpandablePropertiesValues​(com.google.gwt.json.client.JSONObject jsonObject)
        Parameters:
        jsonObject -
        Returns:
        a Map where the key is the name of the complex property, and the value is a a Map with the nested propertyName/propertyValue
      • getMapValue

        protected String getMapValue()
        Returns: