Package org.ametys.cms.search.content
Class ContentValuesExtractorFactory.SearchModelContentValuesExtractor
- java.lang.Object
-
- org.ametys.cms.search.content.ContentValuesExtractorFactory.SearchModelContentValuesExtractor
-
- All Implemented Interfaces:
ContentValuesExtractorFactory.ContentValuesExtractor
- Enclosing class:
- ContentValuesExtractorFactory
public class ContentValuesExtractorFactory.SearchModelContentValuesExtractor extends Object implements ContentValuesExtractorFactory.ContentValuesExtractor
A ContentValuesExtractor backed by aSearchModel
.
-
-
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 void
putPropertyValue(Map<String,Object> properties, ResultField column, Object value)
Put a result value at its right place in the properties map.ContentValuesExtractorFactory.SearchModelContentValuesExtractor
setFullValues(boolean fullValues)
Whether to return full values or not.
-
-
-
Constructor Detail
-
SearchModelContentValuesExtractor
public SearchModelContentValuesExtractor(SearchModel searchModel)
Build a ContentValuesExtractor referencing aSearchModel
.- Parameters:
searchModel
- theSearchModel
.
-
-
Method Detail
-
setFullValues
public ContentValuesExtractorFactory.SearchModelContentValuesExtractor setFullValues(boolean fullValues)
Description copied from interface:ContentValuesExtractorFactory.ContentValuesExtractor
Whether to return full values or not.- Specified by:
setFullValues
in interfaceContentValuesExtractorFactory.ContentValuesExtractor
- Parameters:
fullValues
- true to return full values, false otherwise.- Returns:
- The ContentValuesExtractor itself.
-
getValues
public Map<String,Object> getValues(Content content, Locale defaultLocale)
Description copied from interface:ContentValuesExtractorFactory.ContentValuesExtractor
Get the values from the given content.- Specified by:
getValues
in interfaceContentValuesExtractorFactory.ContentValuesExtractor
- 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)
Description copied from interface:ContentValuesExtractorFactory.ContentValuesExtractor
Get the values from the given content.- Specified by:
getValues
in interfaceContentValuesExtractorFactory.ContentValuesExtractor
- 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.
-
-