com.atlassian.plugin.web.model
Interface WebPanel

All Known Implementing Classes:
AbstractWebPanel, EmbeddedTemplateWebPanel, ResourceTemplateWebPanel

public interface WebPanel

The module that is responsive for providing the raw content for a Web Panel. Whatever is returned by getHtml(java.util.Map) is inserted into the host application's page, so it has to be valid HTML.

Since:
2.5.0
See Also:
DefaultWebPanelModuleDescriptor.getModule()

Method Summary
 String getHtml(Map<String,Object> context)
          Returns the HTML that will be placed in the host application's page.
 void writeHtml(Writer writer, Map<String,Object> context)
          Writes the HTML for this panel into the supplied writer.
 

Method Detail

getHtml

String getHtml(Map<String,Object> context)
Returns the HTML that will be placed in the host application's page.

Parameters:
context - the contextual information that can be used during rendering. Context elements are not standardized and are application-specific, so refer to your application's documentation to learn what is available.
Returns:
the HTML that will be placed in the host application's page.

writeHtml

void writeHtml(Writer writer,
               Map<String,Object> context)
               throws IOException
Writes the HTML for this panel into the supplied writer. This method should be preferred over getHtml(java.util.Map) for large panels or for applications that make frequent use of panels, to avoid creating a lot of large garbage buffer strings.

Parameters:
writer - the writer to append the panel output to
context - the contextual information that can be used during rendering. Context elements are not standardized and are application-specific, so refer to your application's documentation to learn what is available.
Throws:
IOException - if there is some problem writing to the supplied writer
Since:
2.11


Copyright © 2013 Atlassian. All Rights Reserved.