Package org.ametys.cms.search.content
Class ContentValuesExtractorFactory.SearchModelContentValuesExtractor
- java.lang.Object
-
- org.ametys.cms.search.content.ContentValuesExtractorFactory.SearchModelContentValuesExtractor
-
- Enclosing class:
- ContentValuesExtractorFactory
public class ContentValuesExtractorFactory.SearchModelContentValuesExtractor extends Object
A ContentValuesExtractor backed by aSearchModel.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean_fullValuesprivate SearchModel_searchModel
-
Constructor Summary
Constructors Constructor Description SearchModelContentValuesExtractor(SearchModel searchModel)Build a ContentValuesExtractor referencing aSearchModel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>getValues(Content content, Locale defaultLocale)Get the values from the given content.Map<String,Object>getValues(Content content, Locale defaultLocale, Map<String,Object> contextualParameters)Get the values from the given content.protected voidputPropertyValue(Map<String,Object> properties, ResultField column, Object value)Put a result value at its right place in the properties map.ContentValuesExtractorFactory.SearchModelContentValuesExtractorsetFullValues(boolean fullValues)Whether to return full values or not.
-
-
-
Field Detail
-
_searchModel
private SearchModel _searchModel
-
_fullValues
private boolean _fullValues
-
-
Constructor Detail
-
SearchModelContentValuesExtractor
public SearchModelContentValuesExtractor(SearchModel searchModel)
Build a ContentValuesExtractor referencing aSearchModel.- Parameters:
searchModel- theSearchModel.
-
-
Method Detail
-
setFullValues
public ContentValuesExtractorFactory.SearchModelContentValuesExtractor setFullValues(boolean fullValues)
Whether to return full values or not.- Parameters:
fullValues- true to return full values, false otherwise.- Returns:
- The ContentValuesExtractor itself.
-
getValues
public Map<String,Object> getValues(Content content, Locale defaultLocale)
Get the values from the given content.- Parameters:
content- The content.defaultLocale- The default locale for localized values if the content's language is null. Can be null.- Returns:
- the extracted values.
-
getValues
public Map<String,Object> getValues(Content content, Locale defaultLocale, Map<String,Object> contextualParameters)
Get the values from the given content.- Parameters:
content- The content.defaultLocale- The default locale for localized values if the content's language is null. Can be null.contextualParameters- The search contextual parameters.- Returns:
- the extracted values.
-
putPropertyValue
protected void putPropertyValue(Map<String,Object> properties, ResultField column, Object value)
Put a result value at its right place in the properties map.- Parameters:
properties- the properties map to fill.column- the search column.value- the result value.
-
-