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 java.lang.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 Modifier and Type Field Description static java.lang.String
FORMAT_PARAM
static java.lang.String
FORMAT_PARAM_DEFAULT_VALUE
-
Constructor Summary
Constructors Constructor Description FormatValueFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
doFilter(IndexerBatchContext batchContext, IndexedProperty indexedProperty, java.lang.Object value)
protected java.lang.Object
formatValue(IndexerBatchContext batchContext, IndexedProperty indexedProperty, java.lang.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 java.text.Format
getValueFormatter(java.lang.String formatterBeanName)
void
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-
-
-
Field Detail
-
FORMAT_PARAM
public static final java.lang.String FORMAT_PARAM
- See Also:
- Constant Field Values
-
FORMAT_PARAM_DEFAULT_VALUE
public static final java.lang.String FORMAT_PARAM_DEFAULT_VALUE
-
-
Method Detail
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
- Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
-
getValueFormatter
protected java.text.Format getValueFormatter(java.lang.String formatterBeanName)
-
doFilter
public java.lang.Object doFilter(IndexerBatchContext batchContext, IndexedProperty indexedProperty, java.lang.Object value)
- Specified by:
doFilter
in 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 java.lang.Object formatValue(IndexerBatchContext batchContext, IndexedProperty indexedProperty, java.lang.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
-
-