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 TypeMethodDescriptionbooleanappliesTo(TestSelector selector) True if this renderer applies to supplied requestvoidcleanup()Called once rendering is doneReturn the extension that triggers this rendererorg.junit.runner.notification.RunListenerProvide a RunListener for JUnit testsvoidRender general informationvoidRender a link to specified URL using specified HTTP methodvoidlist(String role, Collection<String> data) Render a list of thingsvoidCalled first to setup renderingvoidRender a title of a specified hierarchical level
-
Method Details
-
appliesTo
True if this renderer applies to supplied request- Parameters:
selector- a test selector- Returns:
trueif this renderer applied to the provided selector,falseotherwise
-
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
-