Interface I_CmsSearchFieldMapping

    • Method Detail

      • getDefaultValue

        java.lang.String getDefaultValue()
        Returns the default value used for this field mapping in case no content is available.

        Returns:
        the default value used for this field mapping in case no content is available
      • getParam

        java.lang.String getParam()
        Returns the mapping parameter.

        The parameter is used depending on the implementation of the rules of the selected CmsSearchFieldMappingType.

        Returns:
        the mapping parameter
      • getStringValue

        java.lang.String getStringValue​(CmsObject cms,
                                        CmsResource res,
                                        I_CmsExtractionResult extractionResult,
                                        java.util.List<CmsProperty> properties,
                                        java.util.List<CmsProperty> propertiesSearched)
        Returns the String value extracted form the provided data according to the rules of this mapping type.

        Parameters:
        cms - the OpenCms context used for building the search index
        res - the resource that is indexed
        extractionResult - the plain text extraction result from the resource
        properties - 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
      • setDefaultValue

        void setDefaultValue​(java.lang.String defaultValue)
        Sets the default value for this field mapping in case no content is available.

        Parameters:
        defaultValue - the default value to set
      • setLocale

        default void setLocale​(java.util.Locale locale)
        Sets the locale, the mapping can examine when extracting the content. NOTE: This method is called by CmsDefaultXmlContentHandler when dynamic search field mappings are created. Overwrite this default implementation if you need to map locale specific in your dynamic mapping.
        Parameters:
        locale - the locale of the index field that is filled by the mapping.
      • setParam

        void setParam​(java.lang.String param)
        Sets the mapping parameter.

        The parameter is used depending on the implementation of the rules of the selected CmsSearchFieldMappingType.

        Parameters:
        param - the parameter to set
      • setType

        void setType​(java.lang.String type)
        Sets the mapping type as a String.

        Parameters:
        type - the name of the type to set