Class AbstractFragment
java.lang.Object
com.atlassian.jira.projects.legacy.projectpanel.fragment.impl.AbstractFragment
- All Implemented Interfaces:
ProjectTabPanelFragment
- Direct Known Subclasses:
AbstractMultiFragment,ActivityStreamFragment,CreatedVsResolvedFragment,IssueFiltersFragment,NoIssuesFragment,ProjectDescriptionFragment,ProjectGetStarted,VersionDescriptionFragment
This abstract class implements the standard way of rendering this fragment's HTML in
getHtml(com.atlassian.jira.project.browse.BrowseContext)
method and base Velocity parameters creation via createVelocityParams(com.atlassian.jira.project.browse.BrowseContext) method.- Since:
- v4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final JiraAuthenticationContextprotected static final org.slf4j.Loggerprotected final VelocityTemplatingEngine -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractFragment(VelocityTemplatingEngine templatingEngine, JiraAuthenticationContext authenticationContext) -
Method Summary
Modifier and TypeMethodDescriptionCreates new map of velocity parameters.getHtml(BrowseContext ctx) Renders the fragment.protected longprotected abstract StringReturns the path to the template directoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.jira.projects.legacy.projectpanel.fragment.ProjectTabPanelFragment
getId, showFragment
-
Field Details
-
log
protected static final org.slf4j.Logger log -
velocityManager
-
authenticationContext
-
-
Constructor Details
-
AbstractFragment
protected AbstractFragment(VelocityTemplatingEngine templatingEngine, JiraAuthenticationContext authenticationContext)
-
-
Method Details
-
getTemplateDirectoryPath
Returns the path to the template directory- Returns:
- the path to the template directory
-
createVelocityParams
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
- fragid - value returned by
-
getHtml
Renders the fragment. It uses Veocity parameters created bycreateVelocityParams(com.atlassian.jira.project.browse.BrowseContext)method. If you need to pass in more parameters, please overridecreateVelocityParams(com.atlassian.jira.project.browse.BrowseContext)method.- Specified by:
getHtmlin interfaceProjectTabPanelFragment- Parameters:
ctx- the context that this fragment is being rendered in.- Returns:
- the escaped HTML to include.
-
getIssueCountInSearch
-