Class AbstractDataHandler<D extends AbstractEditorData,​V extends ItemModel>

    • Field Detail

      • SEARCH_PROFILE_PARAM

        protected static final java.lang.String SEARCH_PROFILE_PARAM
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractDataHandler

        public AbstractDataHandler()
    • Method Detail

      • loadData

        public org.zkoss.zul.ListModel<D> loadData​(java.util.Collection<V> initialValue,
                                                   SearchResultData searchResult,
                                                   java.util.Map<java.lang.String,​java.lang.Object> parameters)
        Description copied from interface: DataHandler
        Initializes the data handler with new data.
        Specified by:
        loadData in interface DataHandler<D extends AbstractEditorData,​V extends ItemModel>
        Parameters:
        initialValue - - the initial value
        searchResult - - the search result
        parameters - - the data handler parameters
        Returns:
        the data
      • loadDataFromSearchResult

        protected abstract void loadDataFromSearchResult​(java.util.Map<java.lang.Object,​D> mapping,
                                                         SearchResultData searchResult,
                                                         java.util.Map<java.lang.String,​java.lang.Object> parameters)
      • loadDataFromInitialValue

        protected abstract void loadDataFromInitialValue​(java.util.Map<java.lang.Object,​D> mapping,
                                                         java.util.Collection<V> initialValue,
                                                         java.util.Map<java.lang.String,​java.lang.Object> parameters)
      • getValue

        public java.util.List<V> getValue​(org.zkoss.zul.ListModel<D> data)
        Description copied from interface: DataHandler
        Returns the value.
        Specified by:
        getValue in interface DataHandler<D extends AbstractEditorData,​V extends ItemModel>
        Parameters:
        data - - the data object
        Returns:
        the current value
      • postLoadData

        protected void postLoadData​(java.util.Collection<V> initialValue,
                                    SearchResultData searchResult,
                                    java.util.Map<java.lang.String,​java.lang.Object> parameters,
                                    org.zkoss.zul.ListModelList<D> data)
      • getAttributeValue

        public java.lang.Object getAttributeValue​(D editorData,
                                                  java.lang.String attributeName)
        Description copied from interface: DataHandler
        Extracts an attribute value from a specific editor data object.
        Specified by:
        getAttributeValue in interface DataHandler<D extends AbstractEditorData,​V extends ItemModel>
        Parameters:
        editorData - - the data object
        attributeName - - the attribute name
        Returns:
        the attribute value
      • getAttributeType

        public java.lang.Class<?> getAttributeType​(D editorData,
                                                   java.lang.String attributeName)
        Description copied from interface: DataHandler
        Extracts an attribute class from a specific editor data object.
        Specified by:
        getAttributeType in interface DataHandler<D extends AbstractEditorData,​V extends ItemModel>
        Parameters:
        editorData - - the data object
        attributeName - - the attribute name
        Returns:
        the attribute class
      • setAttributeValue

        public void setAttributeValue​(D editorData,
                                      java.lang.String attributeName,
                                      java.lang.Object attributeValue)
        Description copied from interface: DataHandler
        Sets an attribute value to a specific data object.
        Specified by:
        setAttributeValue in interface DataHandler<D extends AbstractEditorData,​V extends ItemModel>
        Parameters:
        editorData - - the data object.
        attributeName - - the attribute name
        attributeValue - - new attribute value
      • getOrCreateEditorData

        protected D getOrCreateEditorData​(java.util.Map<java.lang.Object,​D> mapping,
                                          java.lang.String key)
      • createEditorData

        protected abstract D createEditorData()
      • setAsConfigurationService

        public void setAsConfigurationService​(AsConfigurationService asConfigurationService)
      • setAsUidGenerator

        public void setAsUidGenerator​(AsUidGenerator asUidGenerator)