com.atlassian.jira.web.component
Class DashboardPageWebComponent

java.lang.Object
  extended by com.atlassian.jira.web.component.AbstractWebComponent
      extended by com.atlassian.jira.web.component.DashboardPageWebComponent

public class DashboardPageWebComponent
extends AbstractWebComponent

A web component that renders single dashboard pages.

Since:
v3.13

Nested Class Summary
static class DashboardPageWebComponent.Configuration
          Represents the configuration options available when using the DashboardPageWebComponent.
 
Field Summary
 
Fields inherited from class com.atlassian.jira.web.component.AbstractWebComponent
applicationProperties, velocityManager
 
Constructor Summary
DashboardPageWebComponent(User user)
          Constructs the web component to display a dashboard page for the given User.
 
Method Summary
 String getHtml(Long dashboardPageId, DashboardPageConfigUrlFactory dashboardPageConfigUrlFactory, DashboardPageWebComponent.Configuration configuration)
          Renders the dashboard page (a.k.a.
 String getHtml(Long dashboardPageId, DashboardPageConfigUrlFactory dashboardPageConfigUrlFactory, List selectedPortlets, DashboardPageWebComponent.Configuration configuration)
          Renders the dashboard page (a.k.a.
 boolean isConfigurationNeeded(PortletConfiguration portletConfiguration)
          Determines whether the portlet is capable of being configured by the end user.
 String renderPortlet(PortletConfiguration portletConfiguration)
           
 
Methods inherited from class com.atlassian.jira.web.component.AbstractWebComponent
getHtml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DashboardPageWebComponent

public DashboardPageWebComponent(User user)
Constructs the web component to display a dashboard page for the given User.

Parameters:
user - the user trying to view the dashboard page or null for anonymous.
Method Detail

getHtml

public String getHtml(Long dashboardPageId,
                      DashboardPageConfigUrlFactory dashboardPageConfigUrlFactory,
                      DashboardPageWebComponent.Configuration configuration)
Renders the dashboard page (a.k.a. "portal page") with the given id that belongs to the given user. No portlets are selected.

Links to configure portlets and to move them about (as displayed in edit mode) will be created using the given dashboardPageConfigUrlFactory. If the user is not logged in (and JIRA is set up) the login prompt will also be displayed amidst any authorised portlets unless disabled through the configuration.

Parameters:
dashboardPageId - the id of the dashboard page must not be null.
dashboardPageConfigUrlFactory - instance of this factory used to construct urls back to the dashboard config in edit mode must not be null.
configuration - web component configuration
Returns:
the html for the dashboard page rendered into html will not be null.

getHtml

public String getHtml(Long dashboardPageId,
                      DashboardPageConfigUrlFactory dashboardPageConfigUrlFactory,
                      List selectedPortlets,
                      DashboardPageWebComponent.Configuration configuration)
Renders the dashboard page (a.k.a. "portal page") with the given id that belongs to the given user.

Individual portlets may be highlighted by including their IDs in the selectedPortlets list. Links to configure portlets and to move them about (as displayed in edit mode) will be created using the given dashboardPageConfigUrlFactory. If the user is not logged in (and JIRA is set up) the login prompt will also be displayed amidst any authorised portlets unless disabled through the configuration.

Parameters:
dashboardPageId - the id of the dashboard page must not be null.
dashboardPageConfigUrlFactory - instance of this factory used to construct urls back to the dashboard config in edit mode must not be null.
selectedPortlets - the list of portlets ids to highlight as selected must not be null.
configuration - web component configuration
Returns:
the html for the dashboard page rendered into html will not be null.

renderPortlet

public String renderPortlet(PortletConfiguration portletConfiguration)

isConfigurationNeeded

public boolean isConfigurationNeeded(PortletConfiguration portletConfiguration)
                              throws com.atlassian.configurable.ObjectConfigurationException
Determines whether the portlet is capable of being configured by the end user.

Parameters:
portletConfiguration - the PortletConfiguration of the portlet to check.
Returns:
true only if the portlet can be configured.
Throws:
com.atlassian.configurable.ObjectConfigurationException - if there is a problem obtaining information about the PortletConfiguration.


Copyright © 2002-2008 Atlassian. All Rights Reserved.