Package org.opencms.search.fields
Class CmsMacroResolvingSearchFieldMapping
java.lang.Object
org.opencms.search.fields.CmsSearchFieldMapping
org.opencms.search.fields.CmsMacroResolvingSearchFieldMapping
- All Implemented Interfaces:
Serializable,I_CmsSearchFieldMapping
Adopted version of the default
CmsSearchFieldMapping
that resolves macros via the CmsGalleryNameMacroResolver in the mapped value before returning it.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.commons.logging.LogLogger for the classFields inherited from class org.opencms.search.fields.CmsSearchFieldMapping
m_locale -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetStringValue(CmsObject cms, CmsResource res, I_CmsExtractionResult extractionResult, List<CmsProperty> properties, List<CmsProperty> propertiesSearched) Calls the super method and resolves macros in the returned value.Methods inherited from class org.opencms.search.fields.CmsSearchFieldMapping
equals, getDefaultDateExpired, getDefaultValue, getParam, getType, hashCode, setDefaultValue, setLocale, setParam, setType, setType
-
Field Details
-
LOG
Logger for the class
-
-
Constructor Details
-
CmsMacroResolvingSearchFieldMapping
public CmsMacroResolvingSearchFieldMapping()Default constructor.
-
-
Method Details
-
getStringValue
public String getStringValue(CmsObject cms, CmsResource res, I_CmsExtractionResult extractionResult, List<CmsProperty> properties, List<CmsProperty> propertiesSearched) Calls the super method and resolves macros in the returned value.- Specified by:
getStringValuein interfaceI_CmsSearchFieldMapping- Overrides:
getStringValuein classCmsSearchFieldMapping- Parameters:
cms- the OpenCms context used for building the search indexres- the resource that is indexedextractionResult- the plain text extraction result from the resourceproperties- the list of all properties directly attached to the resource (not searched)propertiesSearched- the list of all searched properties of the resource- Returns:
- the String value extracted form the provided data according to the rules of this mapping type
- See Also:
-