Interface DataHandler<D extends AbstractEditorData,V>
- Type Parameters:
D- - the type of the item dataV- - the type of the item value
- All Known Implementing Classes:
AbstractDataHandler,AsBoostRulesDataHandler,AsExcludedFacetsDataHandler,AsExcludedItemsDataHandler,AsExcludedSortsDataHandler,AsFacetsDataHandler,AsPromotedFacetsDataHandler,AsPromotedItemsDataHandler,AsPromotedSortsDataHandler,AsSortsDataHandler
public interface DataHandler<D extends AbstractEditorData,V>
Data handler for the generic configurable reference editor.
-
Method Summary
Modifier and TypeMethodDescriptionClass<?>getAttributeType(D data, String attributeName) Extracts an attribute class from a specific editor data object.getAttributeValue(D data, String attributeName) Extracts an attribute value from a specific editor data object.getItemValue(D data) Returns the value for a single item.Returns the type code for the model.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.voidsetAttributeValue(D data, String attributeName, Object attributeValue) Sets an attribute value to a specific data object.
-
Method Details
-
getTypeCode
String getTypeCode()Returns the type code for the model.- Returns:
- the type code
-
loadData
org.zkoss.zul.ListModel<D> loadData(Collection<V> initialValue, SearchResultData searchResult, Map<String, Object> parameters) Initializes the data handler with new data.- Parameters:
initialValue- - the initial valuesearchResult- - the search resultparameters- - the data handler parameters- Returns:
- the data
-
getValue
Returns the value.- Parameters:
data- - the data object- Returns:
- the current value
- Since:
- 6.7
-
getItemValue
Returns the value for a single item.- Parameters:
data- - the data object- Returns:
- the current value
- Since:
- 6.7
-
getAttributeType
Extracts an attribute class from a specific editor data object.- Parameters:
data- - the data objectattributeName- - the attribute name- Returns:
- the attribute class
-
getAttributeValue
Extracts an attribute value from a specific editor data object.- Parameters:
data- - the data objectattributeName- - the attribute name- Returns:
- the attribute value
-
setAttributeValue
Sets an attribute value to a specific data object.- Parameters:
data- - the data object.attributeName- - the attribute nameattributeValue- - new attribute value
-