public class UserShareTypeRenderer extends VelocityShareTypeRenderer
ShareTypeRenderer
for the UserShareType
.ShareTypeRenderer.RenderMode
BOLD_END, BOLD_START
Constructor and Description |
---|
UserShareTypeRenderer(EncodingConfiguration encoding,
VelocityTemplatingEngine templatingEngine,
UserManager userManager,
GlobalPermissionManager globalPermissionManager) |
Modifier and Type | Method and Description |
---|---|
String |
getShareTypeEditor(JiraAuthenticationContext userCtx)
Return the HTML of the component that is used to configure the ShareType when necessary.
|
String |
getShareTypeLabel(JiraAuthenticationContext userCtx)
Return a string that can be used to differentiate the associated ShareType.
|
String |
getSimpleDescription(SharePermission permission,
JiraAuthenticationContext userCtx)
Return a simple text only description of the share.
|
Map<String,String> |
getTranslatedTemplates(JiraAuthenticationContext userCtx,
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 userCtx)
Return whether or not the component needs a button.
|
String |
renderPermission(SharePermission permission,
JiraAuthenticationContext userCtx)
Return HTML that shows the configured share.
|
renderVelocity
public UserShareTypeRenderer(EncodingConfiguration encoding, VelocityTemplatingEngine templatingEngine, UserManager userManager, GlobalPermissionManager globalPermissionManager)
public String renderPermission(SharePermission permission, JiraAuthenticationContext userCtx)
ShareTypeRenderer
permission
- the share to render.userCtx
- the context of the user calling this method.public String getSimpleDescription(SharePermission permission, JiraAuthenticationContext userCtx)
ShareTypeRenderer
permission
- the share to describe, containing permission params.userCtx
- the context of the user calling this method.public String getShareTypeEditor(JiraAuthenticationContext userCtx)
ShareTypeRenderer
userCtx
- the context of the user calling this method.public boolean isAddButtonNeeded(JiraAuthenticationContext userCtx)
ShareTypeRenderer
userCtx
- the context of the user calling this method.public String getShareTypeLabel(JiraAuthenticationContext userCtx)
ShareTypeRenderer
userCtx
- the context of the user calling this method.public Map<String,String> getTranslatedTemplates(JiraAuthenticationContext userCtx, SharedEntity.TypeDescriptor<? extends SharedEntity> type, ShareTypeRenderer.RenderMode mode)
ShareTypeRenderer
userCtx
- the context of the user calling this method.type
- the type of the shared entity .mode
- the mode that should be rendered.Copyright © 2002-2024 Atlassian. All Rights Reserved.