Class CmsHelpSearchResultView


  • public class CmsHelpSearchResultView
    extends java.lang.Object
    Displays the result of a CmsSearch.

    Requires the following request parameters (see constructor):

    • index:
      the String identifying the required search index.
    • query:
      the search query to run.

    Since:
    6.0.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.opencms.file.CmsProject m_offlineProject
      The project that forces evaluation of all dynamic content.
      protected org.opencms.file.CmsProject m_onlineProject
      The project that allows static export.
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsHelpSearchResultView​(javax.servlet.jsp.PageContext pageContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Constructor with arguments for construction of a CmsJspActionElement.
      CmsHelpSearchResultView​(org.opencms.jsp.CmsJspActionElement action)
      Constructor with the action element to use.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String displaySearchResult​(org.opencms.search.CmsSearch search)
      Returns the formatted search results.
      boolean isExportLinks()
      Returns true if the links to search results shall point to exported content, false else.
      void setExportLinks​(boolean exportLinks)
      Set wether the links to search results point to exported content or not.
      void setSearchRessourceUrl​(java.lang.String uri)
      Set a proprietary resource uri for the search page.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • m_offlineProject

        protected org.opencms.file.CmsProject m_offlineProject
        The project that forces evaluation of all dynamic content.
      • m_onlineProject

        protected org.opencms.file.CmsProject m_onlineProject
        The project that allows static export.
    • Constructor Detail

      • CmsHelpSearchResultView

        public CmsHelpSearchResultView​(org.opencms.jsp.CmsJspActionElement action)
        Constructor with the action element to use.

        Parameters:
        action - the action element to use
      • CmsHelpSearchResultView

        public CmsHelpSearchResultView​(javax.servlet.jsp.PageContext pageContext,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
        Constructor with arguments for construction of a CmsJspActionElement.

        Parameters:
        pageContext - the page context to use
        request - the current request
        response - the current response
    • Method Detail

      • displaySearchResult

        public java.lang.String displaySearchResult​(org.opencms.search.CmsSearch search)
        Returns the formatted search results.

        Parameters:
        search - the preconfigured search bean
        Returns:
        the formatted search results
      • isExportLinks

        public boolean isExportLinks()
        Returns true if the links to search results shall point to exported content, false else.

        Returns:
        true if the links to search results shall point to exported content, false else
      • setExportLinks

        public void setExportLinks​(boolean exportLinks)
        Set wether the links to search results point to exported content or not.

        Parameters:
        exportLinks - The value that decides Set wether the links to search results point to exported content or not.
      • setSearchRessourceUrl

        public void setSearchRessourceUrl​(java.lang.String uri)
        Set a proprietary resource uri for the search page.

        This is optional but allows to override the standard search result links (for next or previous pages) that point to getJsp().getRequestContext().getUri() whenever the search uri is element of some template and should not be linked directly.

        Parameters:
        uri - the proprietary resource uri for the search page