com.atlassian.jira.plugin.projectpanel.fragment.impl
Class AbstractFragment
java.lang.Object
com.atlassian.jira.plugin.projectpanel.fragment.impl.AbstractFragment
- All Implemented Interfaces:
- ProjectTabPanelFragment
- Direct Known Subclasses:
- AbstractMultiFragment, ActivityStreamFragment, ComponentDescriptionFragment, CreatedVsResolvedFragment, DueVersionsFragment, IssueFiltersFragment, NoIssuesFragment, ProjectDescriptionFragment, ProjectGetStarted, VersionDescriptionFragment
public abstract class AbstractFragment
- extends Object
- implements ProjectTabPanelFragment
This abstract class implements the standard way of rendering this fragment's HTML in getHtml(BrowseContext)
method and base Velocity parameters creation via createVelocityParams(BrowseContext)
method.
- Since:
- v4.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.log4j.Logger log
velocityManager
protected final VelocityTemplatingEngine velocityManager
authenticationContext
protected final JiraAuthenticationContext authenticationContext
AbstractFragment
protected AbstractFragment(VelocityTemplatingEngine templatingEngine,
JiraAuthenticationContext authenticationContext)
getTemplateDirectoryPath
protected abstract String getTemplateDirectoryPath()
- Returns the path to the template directory
- Returns:
- the path to the template directory
createVelocityParams
protected Map<String,Object> createVelocityParams(BrowseContext ctx)
- Creates new map of velocity parameters.
This map contains:
- fragid - value returned by
ProjectTabPanelFragment.getId()
- project - project got from the context passed
in
- i18n - i18n bean from the authentication context
- Parameters:
ctx
- browse context
- Returns:
- new velocity parameters map
getHtml
public String getHtml(BrowseContext ctx)
- Renders the fragment.
It uses Veocity parameters created by
createVelocityParams(BrowseContext)
method. If you need to pass in
more parameters, please override createVelocityParams(BrowseContext)
method.
- Specified by:
getHtml
in interface ProjectTabPanelFragment
- Parameters:
ctx
- the context that this fragment is being rendered in.
- Returns:
- the escaped HTML to include.
getIssueCountInSearch
protected long getIssueCountInSearch(BrowseContext ctx)
Copyright © 2002-2013 Atlassian. All Rights Reserved.