Package com.atlassian.jira.projects.util
Interface FlushHeadEarlyService
- All Known Implementing Classes:
DefaultFlushHeadEarlyService
public interface FlushHeadEarlyService
A service that provides various utility methods for providing Flush Head Early support.
- Since:
- v7.2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidflush()Causes the servlet to render the <head> element of the document, including all resources that have been added to the page using thePageBuilderService.booleanvoidrequireResourcesOfItem(String item) Requires all resources defined in the item's<web-panel>.
-
Method Details
-
isFlushHeadEarly
boolean isFlushHeadEarly()- Returns:
- whether the current request is flushing the head early or not
-
requireResourcesOfItem
Requires all resources defined in the item's<web-panel>.Resources for a
Valid definitions for resources are<web-panel>can be defined in the<param name="flushHeadEarlyResources">parameter. These will be required and included in the<head>before it is flushed.wr!web-resource-keywrc!web-resource-context-key
wrstands for WebResource andwrcstands for WebResourceContext - the same style as used inWRM.requirein JavaScript. This also supports adding KeyboardShortcut contexts with:kb!keyboard-shorcut-context-name
KeyboardShortcutManager.ContextMultiple resources can be separated by,or just whitespace.- Parameters:
item-<web-item>key or corresponding<web-panel>location
-
flush
void flush()Causes the servlet to render the <head> element of the document, including all resources that have been added to the page using thePageBuilderService.Warning: No changes to the HTTP Response header can be made after this. This includes cookies, HTTP sessions, HTTP status code or anything else that would be sent in the HTTP header.
- Throws:
IllegalStateException- WhenisFlushHeadEarly()returnsfalseandflush()is called.
-