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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Class<?>
getAttributeType(D data, java.lang.String attributeName)
Extracts an attribute class from a specific editor data object.java.lang.Object
getAttributeValue(D data, java.lang.String attributeName)
Extracts an attribute value from a specific editor data object.V
getItemValue(D data)
Returns the value for a single item.java.lang.String
getTypeCode()
Returns the type code for the model.java.util.Collection<V>
getValue(org.zkoss.zul.ListModel<D> data)
Returns the value.org.zkoss.zul.ListModel<D>
loadData(java.util.Collection<V> initialValue, SearchResultData searchResult, java.util.Map<java.lang.String,java.lang.Object> parameters)
Initializes the data handler with new data.void
setAttributeValue(D data, java.lang.String attributeName, java.lang.Object attributeValue)
Sets an attribute value to a specific data object.
-
-
-
Method Detail
-
getTypeCode
java.lang.String getTypeCode()
Returns the type code for the model.- Returns:
- the type code
-
loadData
org.zkoss.zul.ListModel<D> loadData(java.util.Collection<V> initialValue, SearchResultData searchResult, java.util.Map<java.lang.String,java.lang.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
java.util.Collection<V> getValue(org.zkoss.zul.ListModel<D> data)
Returns the value.- Parameters:
data
- - the data object- Returns:
- the current value
- Since:
- 6.7
-
getItemValue
V getItemValue(D data)
Returns the value for a single item.- Parameters:
data
- - the data object- Returns:
- the current value
- Since:
- 6.7
-
getAttributeType
java.lang.Class<?> getAttributeType(D data, java.lang.String attributeName)
Extracts an attribute class from a specific editor data object.- Parameters:
data
- - the data objectattributeName
- - the attribute name- Returns:
- the attribute class
-
getAttributeValue
java.lang.Object getAttributeValue(D data, java.lang.String attributeName)
Extracts an attribute value from a specific editor data object.- Parameters:
data
- - the data objectattributeName
- - the attribute name- Returns:
- the attribute value
-
setAttributeValue
void setAttributeValue(D data, java.lang.String attributeName, java.lang.Object attributeValue)
Sets an attribute value to a specific data object.- Parameters:
data
- - the data object.attributeName
- - the attribute nameattributeValue
- - new attribute value
-
-