com.atlassian.jira.sharing.type
Class VelocityShareTypeRenderer

java.lang.Object
  extended by com.atlassian.jira.sharing.type.VelocityShareTypeRenderer
All Implemented Interfaces:
ShareTypeRenderer
Direct Known Subclasses:
GroupShareTypeRenderer, ProjectShareTypeRenderer

public abstract class VelocityShareTypeRenderer
extends Object
implements ShareTypeRenderer

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
 
Constructor Summary
VelocityShareTypeRenderer(EncodingConfiguration encoding, com.atlassian.velocity.VelocityManager velocityManager)
           
 
Method Summary
protected  String renderVelocity(String template, Map<String,?> 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, wait
 
Methods inherited from interface com.atlassian.jira.sharing.type.ShareTypeRenderer
getShareTypeEditor, getShareTypeLabel, getSimpleDescription, getTranslatedTemplates, isAddButtonNeeded, renderPermission
 

Constructor Detail

VelocityShareTypeRenderer

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

renderVelocity

protected final String renderVelocity(String template,
                                      Map<String,?> 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.


Copyright © 2002-2012 Atlassian. All Rights Reserved.