public class

HeaderFooterRendering

extends Object
java.lang.Object
   ↳ com.atlassian.jira.plugin.navigation.HeaderFooterRendering

Class Overview

This is called by the templating system to render most things header and footer. Originally this was in the header.jsp in its entirety but we moved it in here because Java code belongs in .java files. Sure its a ghetto but its a ghetto in the right place.

Summary

Constants
String META_X_UA_COMPATIBLE
Public Constructors
HeaderFooterRendering(ApplicationProperties applicationProperties, PluginAccessor pluginAccessor, PageBuilderService pageBuilderService, WebInterfaceManager webInterfaceManager, ProductVersionDataBeanProvider productVersionDataBeanProvider, WebResourceUrlProvider webResourceUrlProvider, GoogleSiteVerification googleSiteVerification)
Public Methods
void flushBigPipe(JspWriter out)
This is to be called just before the </body> of every decorator, and ensures the correct resources and bigpipe data is included at the bottom of the page.
String getKeyboardShortCutScript(HttpServletRequest httpServletRequest)
Returns the keyboard shortcut script
String getPageTitle(Page originalPage)
Called to to get the title of the web page
String getPageTitle(DecoratablePage.ParsedHead parsedHead)
Called to to get the title of the web page
String getRelativeResourcePrefix()
String getXUACompatible(Page originalPage)
Called to get the ua.compatible value
void includeFooters(JspWriter out, HttpServletRequest httpServletRequest)
void includeGoogleSiteVerification(JspWriter out)
Writes the Google site verification code to the page if it's available.
void includeMetadata(JspWriter out)
Includes the general meta data for JIRA in the page
void includeResources(JspWriter out)
Drains and writes web resources to the page as HTML tags.
void includeTopNavigation(JspWriter out, HttpServletRequest httpServletRequest, DecoratablePage.ParsedBody parsedBody)
Called from header-nodecorator.jsp to render top navigation plugin point
void includeTopNavigation(JspWriter out, HttpServletRequest httpServletRequest, Page page)
Called from header.jsp to render top navigation plugin point
void includeVersionMetaTags(JspWriter out)
Includes the version meta data for JIRA in the page
void includeWebPanels(JspWriter out, String location)
void requireCommonMetadata()
Populates the web resource manager's meta data pool with common meta data needed for the page.
void requireCommonResources()
Called to require the standard global web resources that jira used on most pages.
Protected Methods
void includeTopNavigation(JspWriter out, HttpServletRequest httpServletRequest, String selectedSection, Map<StringObject> webFragmentContext)
Renders top navigation plugin point

This code must be especially defensive against the plugin system, as failures here can result in blank pages being rendered.

[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String META_X_UA_COMPATIBLE

Constant Value: "meta.x.ua.compatible"

Public Constructors

public HeaderFooterRendering (ApplicationProperties applicationProperties, PluginAccessor pluginAccessor, PageBuilderService pageBuilderService, WebInterfaceManager webInterfaceManager, ProductVersionDataBeanProvider productVersionDataBeanProvider, WebResourceUrlProvider webResourceUrlProvider, GoogleSiteVerification googleSiteVerification)

Public Methods

public void flushBigPipe (JspWriter out)

This is to be called just before the </body> of every decorator, and ensures the correct resources and bigpipe data is included at the bottom of the page. This will block if necessary (up intil the WRM bigpipe deadline).

Throws
IOException

public String getKeyboardShortCutScript (HttpServletRequest httpServletRequest)

Returns the keyboard shortcut script

Parameters
httpServletRequest the request in play
Returns
  • the keyboard shortcut script

public String getPageTitle (Page originalPage)

Called to to get the title of the web page

Parameters
originalPage the decorated sitemesh page
Returns
  • the title to use

public String getPageTitle (DecoratablePage.ParsedHead parsedHead)

Called to to get the title of the web page

Parameters
parsedHead The parsed decorated page
Returns
  • the title to use

public String getRelativeResourcePrefix ()

Returns
  • returns the relative resource prefix to use

public String getXUACompatible (Page originalPage)

Called to get the ua.compatible value

Parameters
originalPage the decorated sitemesh page
Returns
  • the ua.compatible value

public void includeFooters (JspWriter out, HttpServletRequest httpServletRequest)

public void includeGoogleSiteVerification (JspWriter out)

Writes the Google site verification code to the page if it's available.

Parameters
out the JSP writer
Throws
IOException

public void includeMetadata (JspWriter out)

Includes the general meta data for JIRA in the page

Parameters
out the JSP writer
Throws
IOException

public void includeResources (JspWriter out)

Drains and writes web resources to the page as HTML tags.

This is called from head-resources.jsp

Parameters
out the JSP to write to

public void includeTopNavigation (JspWriter out, HttpServletRequest httpServletRequest, DecoratablePage.ParsedBody parsedBody)

Called from header-nodecorator.jsp to render top navigation plugin point

Parameters
out the JSP to write to
httpServletRequest the request in play
parsedBody the Parsed decorated body

public void includeTopNavigation (JspWriter out, HttpServletRequest httpServletRequest, Page page)

Called from header.jsp to render top navigation plugin point

Parameters
out the JSP to write to
httpServletRequest the request in play
page the SiteMesh original page

public void includeVersionMetaTags (JspWriter out)

Includes the version meta data for JIRA in the page

Parameters
out the JSP writer

public void includeWebPanels (JspWriter out, String location)

public void requireCommonMetadata ()

Populates the web resource manager's meta data pool with common meta data needed for the page.

public void requireCommonResources ()

Called to require the standard global web resources that jira used on most pages.

This is called from head-resources.jsp

Protected Methods

protected void includeTopNavigation (JspWriter out, HttpServletRequest httpServletRequest, String selectedSection, Map<StringObject> webFragmentContext)

Renders top navigation plugin point

This code must be especially defensive against the plugin system, as failures here can result in blank pages being rendered.

Parameters
out the JSP to write to
httpServletRequest the request in play
selectedSection the selected section