Class ReferenceJiraRenderer
java.lang.Object
com.atlassian.jira.dev.reference.plugin.renderer.ReferenceJiraRenderer
- All Implemented Interfaces:
JiraRendererPlugin
Reference JIRA renderer implementation. It returns raw text with a prefix
- Since:
- 4.4
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSimple accessor method for the module descriptor.Returns a unique identifier for this renderer plugin.voidinit(JiraRendererModuleDescriptor jiraRendererModuleDescriptor) This allows a plugin to get a handle on the module descriptor that spawned the plugin.protected Stringprefix()Prefix for rendered text, may be HTML.render(String value, IssueRenderContext context) This will render the provided value within the provided context and produce a rendered output.renderAsText(String value, IssueRenderContext context) This will render the provided value within the provided context and produce a rendered output that is text readable.transformForEdit(Object rawValue) This allows the renderer to perform a transformation on the raw value before populating an editable component with the value.transformFromEdit(Object editValue) This allows the renderer to perform a transformation on the submitted edit value before storing the value in the system.
-
Field Details
-
RENDERER_TYPE
- See Also:
-
-
Constructor Details
-
ReferenceJiraRenderer
public ReferenceJiraRenderer()
-
-
Method Details
-
render
Description copied from interface:JiraRendererPluginThis will render the provided value within the provided context and produce a rendered output.- Specified by:
renderin interfaceJiraRendererPlugin- Parameters:
value- the raw value to render.context- the issue context for this rendering- Returns:
- the transformed value having passed through the rendering process.
-
prefix
Prefix for rendered text, may be HTML.- Returns:
- prefix
-
renderAsText
Description copied from interface:JiraRendererPluginThis will render the provided value within the provided context and produce a rendered output that is text readable.- Specified by:
renderAsTextin interfaceJiraRendererPlugin- Parameters:
value- the raw value to render.context- the issue context for this rendering- Returns:
- the transformed value having passed through the rendering process, the value must be text readable.
-
getRendererType
Description copied from interface:JiraRendererPluginReturns a unique identifier for this renderer plugin.- Specified by:
getRendererTypein interfaceJiraRendererPlugin- Returns:
- the unique identifier for this renderer plugin implementation.
-
transformForEdit
Description copied from interface:JiraRendererPluginThis allows the renderer to perform a transformation on the raw value before populating an editable component with the value. This can be useful if the value being stored is a different format (i.e. wiki markup), than the edit component expects (i.e. wysiwig edit control that expects html). NOTE: this method need not do anything if the edit control can handle the value as stored in the system.- Specified by:
transformForEditin interfaceJiraRendererPlugin- Parameters:
rawValue- is the value stored in the system, before transform.- Returns:
- the value in a form that the renderers edit control expects.
-
transformFromEdit
Description copied from interface:JiraRendererPluginThis allows the renderer to perform a transformation on the submitted edit value before storing the value in the system. This can be useful if the value being submitted is a different format (i.e. html markup that the edit control generates), than the system expects to store (i.e. wiki markup). NOTE: this method need not do anything if the system is happy to store the value the edit control produces.- Specified by:
transformFromEditin interfaceJiraRendererPlugin- Parameters:
editValue- is the value produced by the edit control.- Returns:
- the value in a form that the system expects to store.
-
init
Description copied from interface:JiraRendererPluginThis allows a plugin to get a handle on the module descriptor that spawned the plugin.- Specified by:
initin interfaceJiraRendererPlugin- Parameters:
jiraRendererModuleDescriptor- is the module descriptor that spawned the plugin. If the plugin uses resources, such as velocity templates, then access can be gained through this descriptor.
-
getDescriptor
Description copied from interface:JiraRendererPluginSimple accessor method for the module descriptor.- Specified by:
getDescriptorin interfaceJiraRendererPlugin- Returns:
- the module descriptor that spawned this renderer.
-