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 Details

    • FORMAT_PARAM

      public static final String FORMAT_PARAM
      See Also:
    • FORMAT_PARAM_DEFAULT_VALUE

      public static final String FORMAT_PARAM_DEFAULT_VALUE
  • Constructor Details

    • FormatValueFilter

      public FormatValueFilter()
  • Method Details

    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
    • getValueFormatter

      protected Format getValueFormatter(String formatterBeanName)
    • doFilter

      public Object doFilter(IndexerBatchContext batchContext, IndexedProperty indexedProperty, Object value)
      Specified by:
      doFilter in interface ValueFilter
      Parameters:
      batchContext - - The Batch context
      indexedProperty - - The indexed properties that should contains the Bean Id of the formatter bean
      value - - 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 context
      indexedProperty - - The indexed properties that should contains the Bean Id of the formatter bean
      value - - The Object to be formatted
      Returns:
      String Object with the formatted value