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 Type
Method
Description
`boolean`
`appliesTo(TestSelector selector)`
True if this renderer applies to supplied request
`void`
`cleanup()`
Called once rendering is done
`String`
`getExtension()`
Return the extension that triggers this renderer
`org.junit.runner.notification.RunListener`
`getRunListener()`
Provide a RunListener for JUnit tests
`void`
`info(String role, String info)`
Render general information
`void`
`link(String info, String url, String method)`
Render a link to specified URL using specified HTTP method
`void`
`list(String role, Collection<String> data)`
Render a list of things
`void`
`setup(javax.servlet.http.HttpServletResponse response, String pageTitle)`
Called first to setup rendering
`void`
`title(int level, String title)`
Render a title of a specified hierarchical level

## Method Details

### appliesTo

boolean appliesTo(TestSelector selector)
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

void setup(javax.servlet.http.HttpServletResponse response, String pageTitle) throws IOException
Called first to setup rendering

Parameters:
  `response` - the http response
  `pageTitle` - the page title
Throws:
  `IOException` - if an error occurs

### cleanup

void cleanup()
Called once rendering is done

### list

void list(String role, Collection<String> data)
Render a list of things

Parameters:
  `role` - describes the role of the list, must be a valid CSS class value
  `data` - the list to render

### info

void info(String role, String info)
Render general information

Parameters:
  `role` - describes the role of the list, must be a valid CSS class value
  `info` - the general information

### title

void title(int level, String title)
Render a title of a specified hierarchical level

Parameters:
  `level` - the level
  `title` - the title

### link

void link(String info, String url, String method)
Render a link to specified URL using specified HTTP method

Parameters:
  `info` - the info
  `url` - the link to render
  `method` - 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