@PublicSpi public interface

IssueLinkRenderer

com.atlassian.jira.plugin.issuelink.IssueLinkRenderer
Known Indirect Subclasses

@PublicSpi

This interface is designed for plugins to implement.

Clients of @PublicSpi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicSpi as per each product's API policy (clients should refer to each product's API policy for the exact guarantee -- usually binary compatibility is guaranteed at least across minor versions).

Note: @PublicSpi interfaces and classes are specifically designed to be implemented/extended by clients. Hence, the guarantee of binary compatibility is different to that of @PublicApi elements (if an element is both @PublicApi and @PublicSpi, both guarantees apply).

Class Overview

Defines an issue link renderer to customise how issue links appear.

Summary

Public Methods
Map<StringObject> getFinalContext(RemoteIssueLink remoteIssueLink, Map<StringObject> context)
Returns the context used to render the final HTML.
Map<StringObject> getInitialContext(RemoteIssueLink remoteIssueLink, Map<StringObject> context)
Returns the context used by the template to render the initial HTML.
boolean requiresAsyncLoading(RemoteIssueLink remoteIssueLink)
Returns true if an AJAX call is required to retrieve the final HTML.
boolean shouldDisplay(RemoteIssueLink remoteIssueLink)
Returns true if the remote issue link should be displayed.

Public Methods

public Map<StringObject> getFinalContext (RemoteIssueLink remoteIssueLink, Map<StringObject> context)

Returns the context used to render the final HTML. This method will only be called if requiresAsyncLoading(RemoteIssueLink) returns true. The resulting HTML will be injected as follows: <dl class="links-list"> <dt>Relationship Text</dt> <!-- ... Other Issue Links ... --> <dd id="uniqueHtmlElementId" class="remote-link"> <div class="link-content"> <!-- ISSUE LINK RENDERER CONTENT HERE --> </div> <div class="delete-link" id="delete_uniqueHtmlElementId"> <a class="icon icon-delete" title="Delete Link" id="delete-link_uniqueHtmlElementId" href="delete_remote_issue_link_url"><span>Delete Link</span></a> </div> </dd> <!-- ... Other Issue Links ... --> </dl>

Parameters
remoteIssueLink remote issue link
context the contextual information that can be used during rendering.
Returns
  • velocity context used to render the final HTML

public Map<StringObject> getInitialContext (RemoteIssueLink remoteIssueLink, Map<StringObject> context)

Returns the context used by the template to render the initial HTML. Implementers of this method should not make remote calls, use getFinalContext(RemoteIssueLink, Map) for that purpose. The resulting HTML will be injected as follows: <dl class="links-list"> <dt>Relationship Text</dt> <!-- ... Other Issue Links ... --> <dd id="uniqueHtmlElementId" class="remote-link"> <div class="link-content"> <!-- ISSUE LINK RENDERER CONTENT HERE --> </div> <div class="delete-link" id="delete_uniqueHtmlElementId"> <a class="icon icon-delete" title="Delete Link" id="delete-link_uniqueHtmlElementId" href="delete_remote_issue_link_url"><span>Delete Link</span></a> </div> </dd> <!-- ... Other Issue Links ... --> </dl>

Parameters
remoteIssueLink remote issue link
context the contextual information that can be used during rendering.
Returns
  • context used to render the initial HTML.

public boolean requiresAsyncLoading (RemoteIssueLink remoteIssueLink)

Returns true if an AJAX call is required to retrieve the final HTML. If true is returned, then getFinalContext(com.atlassian.jira.issue.link.RemoteIssueLink, java.util.Map) will be called to retrieve the final HTML for the issue link.

Parameters
remoteIssueLink remote issue link
Returns
  • true if an AJAX call is required to retrieve the final HTML

public boolean shouldDisplay (RemoteIssueLink remoteIssueLink)

Returns true if the remote issue link should be displayed.

Parameters
remoteIssueLink remote issue link
Returns
  • true if the remote issue link should be displayed