Package org.apache.sling.junit
Interface Renderer
public interface Renderer
Renderer for our servlet output. Should not be used directly for rendering as it leads to non-reentrant renderers. Use only via
RendererFactory
as RendererSelectorImpl
does-
Method Summary
Modifier and TypeMethodDescriptionboolean
appliesTo
(TestSelector selector) True if this renderer applies to supplied requestvoid
cleanup()
Called once rendering is doneReturn the extension that triggers this rendererorg.junit.runner.notification.RunListener
Provide a RunListener for JUnit testsvoid
Render general informationvoid
Render a link to specified URL using specified HTTP methodvoid
list
(String role, Collection<String> data) Render a list of thingsvoid
Called first to setup renderingvoid
Render a title of a specified hierarchical level
-
Method Details
-
appliesTo
True if this renderer applies to supplied request- Parameters:
selector
- a test selector- Returns:
true
if this renderer applied to the provided selector,false
otherwise
-
setup
Called first to setup rendering- Parameters:
response
- the http responsepageTitle
- the page title- Throws:
IOException
- if an error occurs
-
cleanup
void cleanup()Called once rendering is done -
list
Render a list of things- Parameters:
role
- describes the role of the list, must be a valid CSS class valuedata
- the list to render
-
info
Render general information- Parameters:
role
- describes the role of the list, must be a valid CSS class valueinfo
- the general information
-
title
Render a title of a specified hierarchical level- Parameters:
level
- the leveltitle
- the title
-
link
Render a link to specified URL using specified HTTP method- Parameters:
info
- the infourl
- the link to rendermethod
- the HTTP method to use
-
getRunListener
org.junit.runner.notification.RunListener getRunListener()Provide a RunListener for JUnit tests- Returns:
- the run listener
-
getExtension
String getExtension()Return the extension that triggers this renderer- Returns:
- the extension that triggers this renderer
-