Package com.atlassian.jira.sharing.type
Class VelocityShareTypeRenderer
java.lang.Object
com.atlassian.jira.sharing.type.VelocityShareTypeRenderer
- All Implemented Interfaces:
ShareTypeRenderer
- Direct Known Subclasses:
GroupShareTypeRenderer,ProjectShareTypeRenderer,UserShareTypeRenderer
A partial implementation of
ShareTypeRenderer that can be used to generate
HTML using Velocity templates.- Since:
- v3.13
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.sharing.type.ShareTypeRenderer
ShareTypeRenderer.RenderMode -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVelocityShareTypeRenderer(EncodingConfiguration encoding, VelocityTemplatingEngine templatingEngine, GlobalPermissionManager globalPermissionManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected final StringrenderVelocity(String template, Map<String, Object> params, JiraAuthenticationContext authenticationContext) Get the text returned by running a velocity template.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.jira.sharing.type.ShareTypeRenderer
getShareTypeEditor, getShareTypeLabel, getSimpleDescription, getTranslatedTemplates, isAddButtonNeeded, renderPermission
-
Field Details
-
BOLD_START
- See Also:
-
BOLD_END
- See Also:
-
-
Constructor Details
-
VelocityShareTypeRenderer
public VelocityShareTypeRenderer(EncodingConfiguration encoding, VelocityTemplatingEngine templatingEngine, GlobalPermissionManager globalPermissionManager)
-
-
Method Details
-
renderVelocity
protected final String renderVelocity(String template, Map<String, Object> params, JiraAuthenticationContext authenticationContext) Get the text returned by running a velocity template. This can be used to create the view/editor of a ShareType from a Velocity template.- Parameters:
template- the filename of the velocity template to run. It is assumed to be located under 'templates/jira/sharing/'.params- the parameters that should be passed to the velocity template.authenticationContext- the authentication context the template should run under.- Returns:
- the text of the velocity template.
-