com.atlassian.jira.web.component
Class ContentRenderingInstruction

java.lang.Object
  extended by com.atlassian.jira.web.component.ContentRenderingInstruction

public class ContentRenderingInstruction
extends Object

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.


Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

dontRender

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.

renderHtml

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.

customContentId

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.

getContentId

public String getContentId()

isDontRender

public boolean isDontRender()

isRenderHtml

public boolean isRenderHtml()


Copyright © 2002-2014 Atlassian. All Rights Reserved.