Class FormatValueFilter
java.lang.Object
de.hybris.platform.solrfacetsearch.provider.impl.FormatValueFilter
- All Implemented Interfaces:
ValueFilter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware
public class FormatValueFilter
extends Object
implements ValueFilter, org.springframework.beans.factory.BeanFactoryAware
Convert An Object or collection of Objects to a formatted String or collection of Strings based on the Bean ID from
the the format parameter which should be an instance of java.text.format
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoFilter(IndexerBatchContext batchContext, IndexedProperty indexedProperty, Object value) protected ObjectformatValue(IndexerBatchContext batchContext, IndexedProperty indexedProperty, Object value) Convert An Object to a formatted String based on the Bean ID from the the format parameter whcih should be an instance of java.text.formatprotected FormatgetValueFormatter(String formatterBeanName) voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-
Field Details
-
FORMAT_PARAM
- See Also:
-
FORMAT_PARAM_DEFAULT_VALUE
-
-
Constructor Details
-
FormatValueFilter
public FormatValueFilter()
-
-
Method Details
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) - Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware
-
getValueFormatter
-
doFilter
public Object doFilter(IndexerBatchContext batchContext, IndexedProperty indexedProperty, Object value) - Specified by:
doFilterin interfaceValueFilter- Parameters:
batchContext- - The Batch contextindexedProperty- - The indexed properties that should contains the Bean Id of the formatter beanvalue- - The Object or collection of Objects to be formatted- Returns:
- formatted Object or collection of formatted Object
-
formatValue
protected Object formatValue(IndexerBatchContext batchContext, IndexedProperty indexedProperty, Object value) Convert An Object to a formatted String based on the Bean ID from the the format parameter whcih should be an instance of java.text.format- Parameters:
batchContext- - The Batch contextindexedProperty- - The indexed properties that should contains the Bean Id of the formatter beanvalue- - The Object to be formatted- Returns:
- String Object with the formatted value
-