public class

ContentRenderingInstruction

extends Object
java.lang.Object
   ↳ com.atlassian.jira.web.component.ContentRenderingInstruction

Class Overview

Represents an instruction that the container uses to decide whether to render the associated web component or not during any given rendering cycle. It also instructs the container to either send or not send the output to the requesting client.

The decision is made based on content ID values which are calculated based on the associated web component content. Depending on the instruction type these ID values can be calculated from the rendered content or custom custom values can be used to avoid unnecessary rendering.

Instances of this class are returned by ContentRenderingInstructionsProvider implementations.

Summary

Public Methods
static ContentRenderingInstruction customContentId(String contentId)
Instruction to use the passed content ID value to make a desicion.
static ContentRenderingInstruction dontRender()
The associated component will not be rendered and output will not be sent to the client.
String getContentId()
boolean isDontRender()
boolean isRenderHtml()
static ContentRenderingInstruction renderHtml()
The associated component will be rendered.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static ContentRenderingInstruction customContentId (String contentId)

Instruction to use the passed content ID value to make a desicion. The component will be rendered if the new content ID doesn't match the current content ID. In this case the rendered output and the new content ID will also be sent to the client.

Returns
  • instruction to use the passed content ID in order to make a decision about whether to render the component and send output to client.

public static ContentRenderingInstruction dontRender ()

The associated component will not be rendered and output will not be sent to the client. It indicates that the current content ID must continue to be used.

Returns
  • instruction to not render the associated component and use the current content ID.

public String getContentId ()

public boolean isDontRender ()

public boolean isRenderHtml ()

public static ContentRenderingInstruction renderHtml ()

The associated component will be rendered. The new content ID will be calculated from the rendered output. The output and the new content ID will be sent to the client if the new content ID doesn't match the current content ID.

Returns
  • instruction to render the associated component, calculate the new content ID from the output and send output to client if needed.