public class

GlobalShareTypeRenderer

extends Object
implements ShareTypeRenderer
java.lang.Object
   ↳ com.atlassian.jira.sharing.type.GlobalShareTypeRenderer

Class Overview

A renderer for the GlobalShareType.

Summary

Public Constructors
GlobalShareTypeRenderer()
Public Methods
String getShareTypeEditor(JiraAuthenticationContext authenticationContext)
Return the HTML of the component that is used to configure the ShareType when necessary.
String getShareTypeLabel(JiraAuthenticationContext authenticationContext)
Return a string that can be used to differentiate the associated ShareType.
String getSimpleDescription(SharePermission permission, JiraAuthenticationContext authenticationContext)
Return a simple text only description of the share.
Map<StringString> getTranslatedTemplates(JiraAuthenticationContext authenticationContext, TypeDescriptor<? extends SharedEntity> type, ShareTypeRenderer.RenderMode mode)
Return map of key -> template that can be used to show a configured shares in Javascript.
boolean isAddButtonNeeded(JiraAuthenticationContext userCtx)
Return whether or not the component needs a button.
String renderPermission(SharePermission permission, JiraAuthenticationContext authenticationContext)
Return HTML that shows the configured share.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.sharing.type.ShareTypeRenderer

Public Constructors

public GlobalShareTypeRenderer ()

Public Methods

public String getShareTypeEditor (JiraAuthenticationContext authenticationContext)

Return the HTML of the component that is used to configure the ShareType when necessary.

Parameters
authenticationContext the context of the user calling this method.
Returns
  • The HTML component to render the ShareType.

public String getShareTypeLabel (JiraAuthenticationContext authenticationContext)

Return a string that can be used to differentiate the associated ShareType. This string is used in the web component that selects a particular ShareType.

Parameters
authenticationContext the context of the user calling this method.
Returns
  • A ShareType description.

public String getSimpleDescription (SharePermission permission, JiraAuthenticationContext authenticationContext)

Return a simple text only description of the share.

Parameters
permission the share to describe, containing permission params.
authenticationContext the context of the user calling this method.
Returns
  • the text description of the share.

public Map<StringString> getTranslatedTemplates (JiraAuthenticationContext authenticationContext, TypeDescriptor<? extends SharedEntity> type, ShareTypeRenderer.RenderMode mode)

Return map of key -> template that can be used to show a configured shares in Javascript.

Parameters
authenticationContext the context of the user calling this method.
type the type of the shared entity .
mode the mode that should be rendered.
Returns
  • a map of key -> templates that can be used to render a share type.

public boolean isAddButtonNeeded (JiraAuthenticationContext userCtx)

Return whether or not the component needs a button.

Parameters
userCtx the context of the user calling this method.
Returns
  • true if the HTML component needs a button or false otherwise.

public String renderPermission (SharePermission permission, JiraAuthenticationContext authenticationContext)

Return HTML that shows the configured share.

Parameters
permission the share to render.
authenticationContext the context of the user calling this method.
Returns
  • the HTML that shows the passed share.