com.atlassian.jira.sharing.type
Class GroupShareTypeRenderer

java.lang.Object
  extended by com.atlassian.jira.sharing.type.VelocityShareTypeRenderer
      extended by com.atlassian.jira.sharing.type.GroupShareTypeRenderer
All Implemented Interfaces:
ShareTypeRenderer

public class GroupShareTypeRenderer
extends VelocityShareTypeRenderer

Renderer for the GroupShareType.

Since:
v3.13

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.sharing.type.ShareTypeRenderer
ShareTypeRenderer.RenderMode
 
Constructor Summary
GroupShareTypeRenderer(EncodingConfiguration encoding, com.atlassian.velocity.VelocityManager velocityManager)
           
 
Method Summary
 java.lang.String getShareTypeEditor(JiraAuthenticationContext authenticationContext)
          Return the HTML of the component that is used to configure the ShareType when necessary.
 java.lang.String getShareTypeLabel(JiraAuthenticationContext authenticationContext)
          Return a string that can be used to differentiate the associated ShareType.
 java.lang.String getSimpleDescription(SharePermission permission, JiraAuthenticationContext authenticationContext)
          Return a simple text only description of the share.
 java.util.Map<java.lang.String,java.lang.String> getTranslatedTemplates(JiraAuthenticationContext authenticationContext, SharedEntity.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 authenticationContext)
          Return whether or not the component needs a button.
 java.lang.String renderPermission(SharePermission permission, JiraAuthenticationContext authenticationContext)
          Return HTML that shows the configured share.
 
Methods inherited from class com.atlassian.jira.sharing.type.VelocityShareTypeRenderer
renderVelocity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupShareTypeRenderer

public GroupShareTypeRenderer(EncodingConfiguration encoding,
                              com.atlassian.velocity.VelocityManager velocityManager)
Method Detail

renderPermission

public java.lang.String renderPermission(SharePermission permission,
                                         JiraAuthenticationContext authenticationContext)
Description copied from interface: ShareTypeRenderer
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.

getSimpleDescription

public java.lang.String getSimpleDescription(SharePermission permission,
                                             JiraAuthenticationContext authenticationContext)
Description copied from interface: ShareTypeRenderer
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.

getShareTypeEditor

public java.lang.String getShareTypeEditor(JiraAuthenticationContext authenticationContext)
Description copied from interface: ShareTypeRenderer
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.

isAddButtonNeeded

public boolean isAddButtonNeeded(JiraAuthenticationContext authenticationContext)
Description copied from interface: ShareTypeRenderer
Return whether or not the component needs a button.

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

getShareTypeLabel

public java.lang.String getShareTypeLabel(JiraAuthenticationContext authenticationContext)
Description copied from interface: ShareTypeRenderer
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.

getTranslatedTemplates

public java.util.Map<java.lang.String,java.lang.String> getTranslatedTemplates(JiraAuthenticationContext authenticationContext,
                                                                               SharedEntity.TypeDescriptor<? extends SharedEntity> type,
                                                                               ShareTypeRenderer.RenderMode mode)
Description copied from interface: ShareTypeRenderer
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.


Copyright © 2002-2010 Atlassian. All Rights Reserved.