com.atlassian.confluence.search
Class DelegatedSearchResultRenderer

java.lang.Object
  extended by com.atlassian.confluence.search.DelegatedSearchResultRenderer

public class DelegatedSearchResultRenderer
extends java.lang.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
DelegatedSearchResultRenderer()
           
 
Method Summary
 java.lang.String render(SearchResult searchResult, SearchResultRenderContext renderContext)
          Render the given search result.
 void setDefaultRenderer(SearchResultRenderer defaultRenderer)
           
 void setSearchResultRendererCache(SearchResultRendererCache cache)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatedSearchResultRenderer

public DelegatedSearchResultRenderer()
Method Detail

render

public java.lang.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


Copyright © 2003-2010 Atlassian. All Rights Reserved.