com.atlassian.confluence.search
Class DefaultSearchResultResultRenderer

java.lang.Object
  extended by com.atlassian.confluence.search.DefaultSearchResultResultRenderer
All Implemented Interfaces:
SearchResultRenderer

public class DefaultSearchResultResultRenderer
extends java.lang.Object
implements SearchResultRenderer

Loaded as a spring bean and is the default renderer that DelegatedSearchResultRenderer falls back on when no other renderer can be found.


Constructor Summary
DefaultSearchResultResultRenderer()
           
 
Method Summary
 boolean canRender(SearchResult searchResult)
          Indicates if this paricular plugin can (and want) to render the given search result.
 java.lang.String render(SearchResult searchResult, SearchResultRenderContext renderContext)
          Render the given search result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSearchResultResultRenderer

public DefaultSearchResultResultRenderer()
Method Detail

canRender

public boolean canRender(SearchResult searchResult)
Description copied from interface: SearchResultRenderer
Indicates if this paricular plugin can (and want) to render the given search result. Return true if and only if the plugin can render the given item without throwing exceptions. Note that several plugins can return true for the same SearchResult in which case one will be picked in an undefined order.

Specified by:
canRender in interface SearchResultRenderer
Parameters:
searchResult - Search result to render.

render

public java.lang.String render(SearchResult searchResult,
                               SearchResultRenderContext renderContext)
Description copied from interface: SearchResultRenderer
Render the given search result. A display ready html string should be returned. If rendering fails (maybe the attachment to render was removed between the call to canRender and render), the plugin should return null to indicate that it failed to render the result

Specified by:
render in interface SearchResultRenderer
Parameters:
searchResult - Search result to render.
renderContext - Render context that contains more information that the renderer may make use of.
Returns:
the rendered HTML ready to be sent to the requesting client.


Copyright © 2003-2014 Atlassian. All Rights Reserved.