com.atlassian.jira.plugin.projectpanel.impl
Class AbstractProjectTabPanel

java.lang.Object
  extended by com.atlassian.jira.plugin.projectpanel.impl.AbstractProjectTabPanel
All Implemented Interfaces:
TabPanel<ProjectTabPanelModuleDescriptor,BrowseContext>, ProjectTabPanel
Direct Known Subclasses:
ComponentsProjectTabPanel, ComponentsVersionsProjectTabPanel, GenericProjectTabPanel, ImportantProjectTabPanel, PopularIssuesProjectTabPanel, VersionsProjectTabPanel

public abstract class AbstractProjectTabPanel
extends java.lang.Object
implements ProjectTabPanel

Abstract tab panel for browse project.


Field Summary
protected  JiraAuthenticationContext authenticationContext
           
protected  ProjectTabPanelModuleDescriptor descriptor
           
 
Constructor Summary
protected AbstractProjectTabPanel()
          This constructor is for the benefit of plugins which may be expecting there to be a no-arg constructor for this and sub classes.
protected AbstractProjectTabPanel(JiraAuthenticationContext jiraAuthenticationContext)
           
 
Method Summary
protected  java.util.Map<java.lang.String,java.lang.Object> createVelocityParams(BrowseContext ctx)
          Creates new map of velocity parameters.
 java.lang.String getHtml(BrowseContext ctx)
          Used to render the tab.
 void init(ProjectTabPanelModuleDescriptor descriptor)
          Initialize the tab panel panel with the plugins ProjectTabPanelModuleDescriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.plugin.browsepanel.TabPanel
showPanel
 

Field Detail

descriptor

protected ProjectTabPanelModuleDescriptor descriptor

authenticationContext

protected final JiraAuthenticationContext authenticationContext
Constructor Detail

AbstractProjectTabPanel

protected AbstractProjectTabPanel(JiraAuthenticationContext jiraAuthenticationContext)

AbstractProjectTabPanel

protected AbstractProjectTabPanel()
This constructor is for the benefit of plugins which may be expecting there to be a no-arg constructor for this and sub classes.

Method Detail

init

public void init(ProjectTabPanelModuleDescriptor descriptor)
Description copied from interface: TabPanel
Initialize the tab panel panel with the plugins ProjectTabPanelModuleDescriptor. This is usually used for rendering velocity views.

Specified by:
init in interface TabPanel<ProjectTabPanelModuleDescriptor,BrowseContext>
Parameters:
descriptor - the descriptor for this module as defined in the plugin xml descriptor.

getHtml

public java.lang.String getHtml(BrowseContext ctx)
Description copied from interface: TabPanel
Used to render the tab.

Specified by:
getHtml in interface TabPanel<ProjectTabPanelModuleDescriptor,BrowseContext>
Parameters:
ctx - The current context the tab is rendering in.
Returns:
Escaped string with the required html.

createVelocityParams

protected java.util.Map<java.lang.String,java.lang.Object> createVelocityParams(BrowseContext ctx)
Creates new map of velocity parameters. By default this map contains the context params from BrowseContext. Note that it does not explicitly add the default velocity params or the i18n bean, since these are added in JiraResourcedModuleDescriptor.getHtml(String, java.util.Map). Extenders of AbstractProjectTabPanel should override this method to specify precise parameters required for their velocity template.

Parameters:
ctx - browse context
Returns:
new velocity parameters map


Copyright © 2002-2010 Atlassian. All Rights Reserved.