Class ShareTypeRendererBean

java.lang.Object
com.atlassian.jira.web.bean.ShareTypeRendererBean

public class ShareTypeRendererBean extends Object
Helper class that is used to render share types.
Since:
v3.13
  • Constructor Details

  • Method Details

    • getShareType

      public String getShareType()
    • getShareTypeEditor

      public String getShareTypeEditor()
      Return the HTML of the component that is used to configure the ShareType when necessary.
      Returns:
      The HTML component to render the ShareType.
    • getShareTypeSelector

      public String getShareTypeSelector()
      Return the HTML of the component that is used to select the ShareType instance when necessary.
      Returns:
      The HTML component to render the ShareType selector.
    • isAddButtonNeeded

      public boolean isAddButtonNeeded()
      Return whether or not the component needs a button.
      Returns:
      true if the HTML component needs a button or false otherwise.
    • getShareTypeLabel

      public String getShareTypeLabel()
      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.
      Returns:
      A ShareType description.
    • isAvailable

      public boolean isAvailable()
      Return true if the share types is available to be used.
      Returns:
      true if the share types is available to be used.
    • getTranslatedTemplates

      public Map getTranslatedTemplates()
      Return a map of key-> message templates for inclusion in the Javascript that renders the shares.
      Returns:
      map of key->message for inclusion in the Javascript that renders the shares.
    • getShareTypeRendererBeans

      public static Collection<ShareTypeRendererBean> getShareTypeRendererBeans(JiraAuthenticationContext authCtx, ShareTypeFactory shareTypeFactory, ShareType.UsageContextType usageContextType, SharedEntity.TypeDescriptor typeDescriptor)
      Return a collection of renderer beans which can be used in specified context
      Parameters:
      authCtx - used to initialize the bean
      shareTypeFactory - used to get share types
      usageContextType - used to filter share types by specified context
      typeDescriptor - used to initialize the bean
      Returns:
      Collection of filtered beans which can be used in specified context
      Since:
      v7.12