public class ProjectShareTypeRenderer extends VelocityShareTypeRenderer
ShareTypeRenderer
for the ProjectShareType
.ShareTypeRenderer.RenderMode
BOLD_END, BOLD_START
Constructor and Description |
---|
ProjectShareTypeRenderer(EncodingConfiguration encoding,
VelocityTemplatingEngine templatingEngine,
ProjectManager projectManager,
ProjectRoleManager projectRoleManager,
PermissionManager permissionManager,
GlobalPermissionManager globalPermissionManager,
FeatureManager featureManager,
InternalProjectPermissionHelper projectPermissionHelper) |
Modifier and Type | Method and Description |
---|---|
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<String,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.
|
String |
renderPermission(SharePermission permission,
JiraAuthenticationContext authenticationContext)
Return HTML that shows the configured share.
|
renderVelocity
public ProjectShareTypeRenderer(EncodingConfiguration encoding, VelocityTemplatingEngine templatingEngine, ProjectManager projectManager, ProjectRoleManager projectRoleManager, PermissionManager permissionManager, GlobalPermissionManager globalPermissionManager, FeatureManager featureManager, InternalProjectPermissionHelper projectPermissionHelper)
public String renderPermission(SharePermission permission, JiraAuthenticationContext authenticationContext)
ShareTypeRenderer
permission
- the share to render.authenticationContext
- the context of the user calling this method.public String getSimpleDescription(SharePermission permission, JiraAuthenticationContext authenticationContext)
ShareTypeRenderer
permission
- the share to describe, containing permission params.authenticationContext
- the context of the user calling this method.public Map<String,String> getTranslatedTemplates(JiraAuthenticationContext authenticationContext, SharedEntity.TypeDescriptor<? extends SharedEntity> type, ShareTypeRenderer.RenderMode mode)
ShareTypeRenderer
authenticationContext
- the context of the user calling this method.type
- the type of the shared entity .mode
- the mode that should be rendered.public String getShareTypeEditor(JiraAuthenticationContext authenticationContext)
ShareTypeRenderer
authenticationContext
- the context of the user calling this method.public boolean isAddButtonNeeded(JiraAuthenticationContext authenticationContext)
ShareTypeRenderer
authenticationContext
- the context of the user calling this method.public String getShareTypeLabel(JiraAuthenticationContext authenticationContext)
ShareTypeRenderer
authenticationContext
- the context of the user calling this method.Copyright © 2002-2022 Atlassian. All Rights Reserved.