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 a
SearchModel
.-
Constructor Summary
ConstructorDescriptionSearchModelContentValuesExtractor
(SearchModel searchModel) Build a ContentValuesExtractor referencing aSearchModel
. -
Method Summary
Modifier and TypeMethodDescriptionGet the values from the given content.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.setFullValues
(boolean fullValues) Whether to return full values or not.
-
Constructor Details
-
SearchModelContentValuesExtractor
Build a ContentValuesExtractor referencing aSearchModel
.- Parameters:
searchModel
- theSearchModel
.
-
-
Method Details
-
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
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
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.
-