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

java.lang.Object
  extended by com.atlassian.jira.plugin.projectpanel.impl.AbstractProjectTabPanel
      extended by com.atlassian.jira.plugin.projectpanel.impl.VersionsProjectTabPanel
All Implemented Interfaces:
TabPanel<ProjectTabPanelModuleDescriptor,BrowseContext>, ProjectTabPanel

public class VersionsProjectTabPanel
extends AbstractProjectTabPanel

Displays the versions of a project.


Field Summary
 
Fields inherited from class com.atlassian.jira.plugin.projectpanel.impl.AbstractProjectTabPanel
authenticationContext, descriptor
 
Constructor Summary
VersionsProjectTabPanel(JiraAuthenticationContext authenticationContext, VersionManager versionManager, ApplicationProperties applicationProperties, PermissionManager permissionManager)
           
 
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.
protected  boolean isFixForVersionsFieldVisible(java.lang.Long projectId)
          Returns true if the fixfor versions field is visible in at least one scheme, false otherwise.
 boolean showPanel(BrowseContext ctx)
          Determine whether or not to show this.
 
Methods inherited from class com.atlassian.jira.plugin.projectpanel.impl.AbstractProjectTabPanel
init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionsProjectTabPanel

public VersionsProjectTabPanel(JiraAuthenticationContext authenticationContext,
                               VersionManager versionManager,
                               ApplicationProperties applicationProperties,
                               PermissionManager permissionManager)
Method Detail

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>
Overrides:
getHtml in class AbstractProjectTabPanel
Parameters:
ctx - The current context the tab is rendering in.
Returns:
Escaped string with the required html.

showPanel

public boolean showPanel(BrowseContext ctx)
Description copied from interface: TabPanel
Determine whether or not to show this.

Parameters:
ctx - The current context the tab is rendering in.
Returns:
True if the conditions are right to display tab, otherwise false.

createVelocityParams

protected java.util.Map<java.lang.String,java.lang.Object> createVelocityParams(BrowseContext ctx)
Description copied from class: AbstractProjectTabPanel
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.

Overrides:
createVelocityParams in class AbstractProjectTabPanel
Parameters:
ctx - browse context
Returns:
new velocity parameters map

isFixForVersionsFieldVisible

protected boolean isFixForVersionsFieldVisible(java.lang.Long projectId)
Returns true if the fixfor versions field is visible in at least one scheme, false otherwise.

Parameters:
projectId - project ID
Returns:
true if the fixfor versions field is visible in at least one scheme, false otherwise.


Copyright © 2002-2011 Atlassian. All Rights Reserved.