com.atlassian.plugin.web.model
Class ResourceTemplateWebPanel

java.lang.Object
  extended by com.atlassian.plugin.web.model.AbstractWebPanel
      extended by com.atlassian.plugin.web.model.ResourceTemplateWebPanel
All Implemented Interfaces:
WebPanel

public class ResourceTemplateWebPanel
extends AbstractWebPanel

This class is used for web panel declaration that do not have a custom class attribute in their descriptor, but do have a location attribute in their resource child element, which points to a template file on the (plugin's) classpath.

Since:
2.5.0
See Also:
DefaultWebPanelModuleDescriptor

Field Summary
 
Fields inherited from class com.atlassian.plugin.web.model.AbstractWebPanel
plugin
 
Constructor Summary
ResourceTemplateWebPanel(PluginAccessor pluginAccessor)
           
 
Method Summary
 String getHtml(Map<String,Object> context)
          Returns the HTML that will be placed in the host application's page.
 void setResourceFilename(String resourceFilename)
          Specifies the name of the template file that is to be rendered.
 
Methods inherited from class com.atlassian.plugin.web.model.AbstractWebPanel
getRenderer, setPlugin, setResourceType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceTemplateWebPanel

public ResourceTemplateWebPanel(PluginAccessor pluginAccessor)
Method Detail

setResourceFilename

public void setResourceFilename(String resourceFilename)
Specifies the name of the template file that is to be rendered. This file will be loaded from the (plugin's) classpath.

Parameters:
resourceFilename - the name of the template file that is to be rendered. May not be null.

getHtml

public String getHtml(Map<String,Object> context)
Description copied from interface: WebPanel
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.


Copyright © 2011 Atlassian. All Rights Reserved.