public class DefaultRendererManager extends Object implements RendererManager
Constructor and Description |
---|
DefaultRendererManager(com.atlassian.plugin.PluginAccessor pluginAccessor) |
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.
|
void |
onJiraPluginCacheResetEvent(JiraPluginCacheResetEvent event) |
public DefaultRendererManager(com.atlassian.plugin.PluginAccessor pluginAccessor)
@EventListener public void onJiraPluginCacheResetEvent(JiraPluginCacheResetEvent event)
public List<JiraRendererPlugin> getAllActiveRenderers()
RendererManager
getAllActiveRenderers
in interface RendererManager
public JiraRendererPlugin getRendererForType(String rendererType)
RendererManager
Note: 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 RendererManager
rendererType
- a string identifier that uniquely identifies a renderer in the system.public JiraRendererPlugin getRendererForField(FieldLayoutItem fieldConfig)
RendererManager
getRendererForField
in interface RendererManager
fieldConfig
- is the configuration object for the given field.public String getRenderedContent(FieldLayoutItem fieldConfig, Issue issue)
RendererManager
getRenderedContent
in interface RendererManager
fieldConfig
- 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)
RendererManager
getRenderedContent
in interface RendererManager
rendererType
- 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 RendererManager
Copyright © 2002-2021 Atlassian. All Rights Reserved.