Class AbstractDataHandler<D extends AbstractEditorData,V extends ItemModel>
java.lang.Object
de.hybris.platform.adaptivesearchbackoffice.editors.configurablemultireference.AbstractDataHandler<D,V>
- Type Parameters:
D- - the type of the item dataV- - the type of the item value
- All Implemented Interfaces:
DataHandler<D,V>
- Direct Known Subclasses:
AsBoostRulesDataHandler,AsExcludedFacetsDataHandler,AsExcludedItemsDataHandler,AsExcludedSortsDataHandler,AsFacetsDataHandler,AsPromotedFacetsDataHandler,AsPromotedItemsDataHandler,AsPromotedSortsDataHandler,AsSortsDataHandler
public abstract class AbstractDataHandler<D extends AbstractEditorData,V extends ItemModel>
extends Object
implements DataHandler<D,V>
Base class for
DataHandler implementations.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract DClass<?>getAttributeType(D editorData, String attributeName) Extracts an attribute class from a specific editor data object.getAttributeValue(D editorData, String attributeName) Extracts an attribute value from a specific editor data object.getItemValue(D data) Returns the value for a single item.protected DgetOrCreateEditorData(Map<Object, D> mapping, String key) Returns the value.org.zkoss.zul.ListModel<D>loadData(Collection<V> initialValue, SearchResultData searchResult, Map<String, Object> parameters) Initializes the data handler with new data.protected abstract voidloadDataFromInitialValue(Map<Object, D> mapping, Collection<V> initialValue, Map<String, Object> parameters) protected abstract voidloadDataFromSearchResult(Map<Object, D> mapping, SearchResultData searchResult, Map<String, Object> parameters) protected voidpostLoadData(Collection<V> initialValue, SearchResultData searchResult, Map<String, Object> parameters, org.zkoss.zul.ListModelList<D> data) voidsetAsConfigurationService(AsConfigurationService asConfigurationService) voidsetAsUidGenerator(AsUidGenerator asUidGenerator) voidsetAttributeValue(D editorData, String attributeName, Object attributeValue) Sets an attribute value to a specific data object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.adaptivesearchbackoffice.editors.configurablemultireference.DataHandler
getTypeCode
-
Field Details
-
SEARCH_PROFILE_PARAM
- See Also:
-
-
Constructor Details
-
AbstractDataHandler
public AbstractDataHandler()
-
-
Method Details
-
loadData
public org.zkoss.zul.ListModel<D> loadData(Collection<V> initialValue, SearchResultData searchResult, Map<String, Object> parameters) Description copied from interface:DataHandlerInitializes the data handler with new data.- Specified by:
loadDatain interfaceDataHandler<D extends AbstractEditorData,V extends ItemModel> - Parameters:
initialValue- - the initial valuesearchResult- - the search resultparameters- - the data handler parameters- Returns:
- the data
-
loadDataFromSearchResult
-
loadDataFromInitialValue
-
getValue
Description copied from interface:DataHandlerReturns the value.- Specified by:
getValuein interfaceDataHandler<D extends AbstractEditorData,V extends ItemModel> - Parameters:
data- - the data object- Returns:
- the current value
-
getItemValue
Description copied from interface:DataHandlerReturns the value for a single item.- Specified by:
getItemValuein interfaceDataHandler<D extends AbstractEditorData,V extends ItemModel> - Parameters:
data- - the data object- Returns:
- the current value
-
postLoadData
protected void postLoadData(Collection<V> initialValue, SearchResultData searchResult, Map<String, Object> parameters, org.zkoss.zul.ListModelList<D> data) -
getAttributeValue
Description copied from interface:DataHandlerExtracts an attribute value from a specific editor data object.- Specified by:
getAttributeValuein interfaceDataHandler<D extends AbstractEditorData,V extends ItemModel> - Parameters:
editorData- - the data objectattributeName- - the attribute name- Returns:
- the attribute value
-
getAttributeType
Description copied from interface:DataHandlerExtracts an attribute class from a specific editor data object.- Specified by:
getAttributeTypein interfaceDataHandler<D extends AbstractEditorData,V extends ItemModel> - Parameters:
editorData- - the data objectattributeName- - the attribute name- Returns:
- the attribute class
-
setAttributeValue
Description copied from interface:DataHandlerSets an attribute value to a specific data object.- Specified by:
setAttributeValuein interfaceDataHandler<D extends AbstractEditorData,V extends ItemModel> - Parameters:
editorData- - the data object.attributeName- - the attribute nameattributeValue- - new attribute value
-
getOrCreateEditorData
-
createEditorData
-
getAsConfigurationService
-
setAsConfigurationService
-
getAsUidGenerator
-
setAsUidGenerator
-