Class DelegatedSearchResultRenderer
- java.lang.Object
-
- com.atlassian.confluence.internal.search.DelegatedSearchResultRenderer
-
public class DelegatedSearchResultRenderer extends Object
The class includes the logic to loop through the available search result renderers and pick on that can render the result and use it to render.
-
-
Constructor Summary
Constructors Constructor Description DelegatedSearchResultRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
render(SearchResult searchResult, SearchResultRenderContext renderContext)
Render the given search result.void
setDefaultRenderer(SearchResultRenderer defaultRenderer)
void
setSearchResultRendererCache(SearchResultRendererCache cache)
-
-
-
Method Detail
-
render
public String render(SearchResult searchResult, SearchResultRenderContext renderContext)
Render the given search result. This method will return a rendered search result. If not plugin is found that can render the given search result it will fall back on a default renderer.- Parameters:
searchResult
- The search result to render.renderContext
- A render context that can hold more information related to the search result. Things like queryString is stored in the context.- Returns:
- a string of rendered html.
-
setDefaultRenderer
public void setDefaultRenderer(SearchResultRenderer defaultRenderer)
- Parameters:
defaultRenderer
- the defaultRenderer to set
-
setSearchResultRendererCache
public void setSearchResultRendererCache(SearchResultRendererCache cache)
- Parameters:
cache
- the cache to set
-
-