public class MockRendererManager extends Object implements RendererManager
| Constructor and Description |
|---|
MockRendererManager() |
| Modifier and Type | Method and Description |
|---|---|
List<JiraRendererPlugin> |
getAllActiveRenderers()
Gets all the renderers in the system that have a RenderConfiguration in which the renderer is set as active.
|
String |
getRenderedContent(FieldLayoutItem fieldConfig,
Issue issue)
A convienience method that is the equivilant of calling the getRendererForField method and
then invoking the render method on the returned renderer, using the value of the field
that is associated with the issue.
|
String |
getRenderedContent(FieldRenderContext fieldRenderContext) |
String |
getRenderedContent(String rendererType,
String value,
IssueRenderContext renderContext)
A convienience method that is the equivilant of calling the getRendererForField method and
then invoking the render method on the returned renderer, using the value of the field
that is associated with the issue.
|
JiraRendererPlugin |
getRendererForField(FieldLayoutItem fieldConfig)
This will returned the correct renderer for a provided field and a provided issue.
|
JiraRendererPlugin |
getRendererForType(String rendererType)
Will return a field renderer for the given renderer type.
|
MockRendererManager |
setRendererForType(String rendererType,
JiraRendererPlugin jiraRendererPlugin) |
public List<JiraRendererPlugin> getAllActiveRenderers()
RendererManagergetAllActiveRenderers in interface RendererManagerpublic JiraRendererPlugin getRendererForType(String rendererType)
RendererManagerNote: if there happens to be two renderers in the system with the same name (for example due to conflicting plugins) then this method will return the first plugin encountered. Plugin developers beware!
getRendererForType in interface RendererManagerrendererType - a string identifier that uniquely identifies a renderer in the system.public JiraRendererPlugin getRendererForField(FieldLayoutItem fieldConfig)
RendererManagergetRendererForField in interface RendererManagerfieldConfig - is the configuration object for the given field.public String getRenderedContent(FieldLayoutItem fieldConfig, Issue issue)
RendererManagergetRenderedContent in interface RendererManagerfieldConfig - identifies the configuration of the System or Custom field that is the object of the
renderering.issue - identifies the unique instance container of the field that will be rendered.public String getRenderedContent(String rendererType, String value, IssueRenderContext renderContext)
RendererManagergetRenderedContent in interface RendererManagerrendererType - is the renderer to use, if not resolved will fall back to the system default.value - is the value to render.renderContext - is the context to use for rendering.public String getRenderedContent(FieldRenderContext fieldRenderContext)
getRenderedContent in interface RendererManagerpublic MockRendererManager setRendererForType(String rendererType, JiraRendererPlugin jiraRendererPlugin)
Copyright © 2002-2019 Atlassian. All Rights Reserved.