public class

BrowseProjects

extends JiraWebActionSupport
java.lang.Object
   ↳ webwork.action.ActionSupport
     ↳ com.atlassian.jira.action.JiraActionSupport
       ↳ com.atlassian.jira.web.action.JiraWebActionSupport
         ↳ com.atlassian.jira.web.action.browser.BrowseProjects

Class Overview

Action for Browse Projects

Summary

Nested Classes
class BrowseProjects.ProjectCategoryBean Simple bean that contains Project category information and its containing projects as GVS. 
[Expand]
Inherited Constants
From class com.atlassian.jira.web.action.JiraWebActionSupport
From interface webwork.action.Action
[Expand]
Inherited Fields
From class com.atlassian.jira.web.action.JiraWebActionSupport
From class com.atlassian.jira.action.JiraActionSupport
From class webwork.action.ActionSupport
Public Constructors
BrowseProjects(WebResourceManager webResourceManager, UserProjectHistoryManager projectHistoryManager, ProjectManager projectManager, PermissionManager permissionManager, SimpleLinkManager simpleLinkManager, WebInterfaceManager webInterfaceManager, AvatarManager avatarManager)
Public Methods
List<BrowseProjects.ProjectCategoryBean> getCategories()
Get the list of available categories as BrowseProjects.ProjectCategoryBean objects.
String getInfoPanelHtml()
Collection<SimpleLink> getOperationLinks()
String getSelectedCategory()
Get the currently active Category.
List<BrowseProjects.ProjectCategoryBean> getTabs()
void setSelectedCategory(String selectedCategory)
Places the given category in the session.
boolean showTabs()
Whether or not to show tabs.
Protected Methods
String doExecute()
[Expand]
Inherited Methods
From class com.atlassian.jira.web.action.JiraWebActionSupport
From class com.atlassian.jira.action.JiraActionSupport
From class webwork.action.ActionSupport
From class java.lang.Object
From interface com.atlassian.jira.util.ErrorCollection
From interface com.atlassian.jira.util.I18nHelper
From interface com.atlassian.jira.web.HttpServletVariables
From interface com.atlassian.jira.web.util.AuthorizationSupport
From interface webwork.action.Action
From interface webwork.action.CommandDriven
From interface webwork.action.IllegalArgumentAware

Public Constructors

public BrowseProjects (WebResourceManager webResourceManager, UserProjectHistoryManager projectHistoryManager, ProjectManager projectManager, PermissionManager permissionManager, SimpleLinkManager simpleLinkManager, WebInterfaceManager webInterfaceManager, AvatarManager avatarManager)

Public Methods

public List<BrowseProjects.ProjectCategoryBean> getCategories ()

Get the list of available categories as BrowseProjects.ProjectCategoryBean objects. These also contain the projects for that category.

We filter out categories with no visible projects.

We add a pseudo category for "none" No Category. We add a pseudo category for "Recent Projects" if there are 2 or more categories.

Returns
  • the list of available categories
Throws
GenericEntityException Sorry, yes we are using GVs.

public String getInfoPanelHtml ()

public Collection<SimpleLink> getOperationLinks ()

public String getSelectedCategory ()

Get the currently active Category. Looks for it in the session, if it is "all" return it. Else, check to see if the category exists and we can see projects in it. Else, return the first category.

Returns
  • the currently active category id, "all", "none" or "recent".
Throws
GenericEntityException Sorry, yes we are using GVs.

public List<BrowseProjects.ProjectCategoryBean> getTabs ()

Throws
GenericEntityException

public void setSelectedCategory (String selectedCategory)

Places the given category in the session.

Parameters
selectedCategory the currently active category id, "all", "none" or "recent".

public boolean showTabs ()

Whether or not to show tabs.

Returns
  • true if we would show more than one tab.
Throws
GenericEntityException Sorry, yes we are using GVs.

Protected Methods

protected String doExecute ()

Throws
Exception