Package org.opencms.search.fields
Class CmsMacroResolvingSearchFieldMapping
- java.lang.Object
-
- org.opencms.search.fields.CmsSearchFieldMapping
-
- org.opencms.search.fields.CmsMacroResolvingSearchFieldMapping
-
- All Implemented Interfaces:
java.io.Serializable
,I_CmsSearchFieldMapping
public class CmsMacroResolvingSearchFieldMapping extends CmsSearchFieldMapping
Adopted version of the defaultCmsSearchFieldMapping
that resolves macros via theCmsGalleryNameMacroResolver
in the mapped value before returning it.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Log
LOG
Logger for the class-
Fields inherited from class org.opencms.search.fields.CmsSearchFieldMapping
m_locale
-
-
Constructor Summary
Constructors Constructor Description CmsMacroResolvingSearchFieldMapping()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getStringValue(CmsObject cms, CmsResource res, I_CmsExtractionResult extractionResult, java.util.List<CmsProperty> properties, java.util.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 Detail
-
LOG
protected static final org.apache.commons.logging.Log LOG
Logger for the class
-
-
Constructor Detail
-
CmsMacroResolvingSearchFieldMapping
public CmsMacroResolvingSearchFieldMapping()
Default constructor.
-
-
Method Detail
-
getStringValue
public java.lang.String getStringValue(CmsObject cms, CmsResource res, I_CmsExtractionResult extractionResult, java.util.List<CmsProperty> properties, java.util.List<CmsProperty> propertiesSearched)
Calls the super method and resolves macros in the returned value.- Specified by:
getStringValue
in interfaceI_CmsSearchFieldMapping
- Overrides:
getStringValue
in 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:
CmsSearchFieldMapping.getStringValue(org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.search.extractors.I_CmsExtractionResult, java.util.List, java.util.List)
-
-